douganbi7686 2010-12-03 13:12
浏览 54
已采纳

数据库驱动的Web应用程序的最佳解决方案 [关闭]

I have been planning out the development of a web application written in PHP using the CakePHP framework. This application will be heavily dependent on a SQL database. The primary intent of the application is to provide HTML forms for adding, managing, and removing data from this database. It will be a descent sized database (1-2 dozen tables) and there will be a good number of links between them. There may also be some reporting on the data (would like to export to Excel/CSV or similar).

So here is my question, does anyone know what solution would be best for this type of situation? If this application was developed fully in PHP/CakePHP it would take quite awhile to develop by a single person and require the input of a developer to add/remove/update the database structure/fields. However I can provide much more custom interface tailored for the needs of the application and it will be web based (accessible anywhere). But there are also solutions such as Filemaker Pro that can provide a similar solution. Does anyone have experience with such applications and solutions?

  • 写回答

2条回答 默认 最新

  • dongxin1980 2010-12-03 13:27
    关注

    I develop web applications using CakePHP and MySQL Full time for my current employer, so I'll try to answer your questions from experience:

    does anyone know what solution would be best for this type of situation?

    Any PHP Framework is a great solution for your problem model. I prefer CakePHP because it allows me to rapidly deploy applications, and it favors convention over configuration.

    If this application was developed fully in PHP/CakePHP it would take quite awhile to develop by a single person and require the input of a developer to add/remove/update the database structure/fields.

    From what you're telling me, your application will be mainly a CRUD app. A CakePHP installation comes standard with the features you need for this. Even better, you can use the CakePHP Console to "Bake" your application. This will automagically generate all of your Models and Controllers, and all of the views you will need to add/update/delete records from the tables.

    The only preparation you need to Bake the app will be:

    1. Creating the Database
    2. Naming all of your tables following conventions from the documentation.
    3. Ensuring you have all of your foreign keys in the proper place, following naming conventions.

    At this point the Bake Console will get to work building models, discovering relationships, and generating code for CRUD operations. That's right, you'll be 70-90% DONE (based on your current, vague specifications) with the functionality in about 10 minutes after building the database. From there you will need to flesh things out with your own designs, security, and functionality like reporting.

    It really is easy.

    Now that I've said all of that, you'll need to know a couple of things:

    1. To properly optimize CakePHP configuration takes a bit of experience and/or magic. Getting your application up and running is a veritable piece of cake. Making it run well takes some effort to make sure you use best practices. Search for variations on "Optimize CakePHP" in google and review the blogs you find.
    2. The Containable Behavior is a blessing and a curse. By all means, put it in your AppModel to make everything "Containable." But, try not to use containable to find data from deeply associated models. Cake will barf out a few hundred (or thousand) Select queries, and your app will start to crawl/fail.
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?