Best solution for a database driven web application? [closed]
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?
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:
- Creating the Database
- Naming all of your tables following conventions from the documentation.
- 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:
- 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.
- 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.
You can try out the Agile Platform by OutSystems. You can model your web applications visually (including all database details, web pages, logic, ...) and then generate a standard .Net application using a SQL server database.
Once you define the database structure, you can drag&drop tables into the pages to automatically create CRUDs. This greatly simplifies the implementation of web pages that manipulate data. These " wizards" will also create all the pagination and column sorting (when you're listing data from a table), as well as the pop-up forms (with field input validations) needed for users to input data.
Last, but not least, if you make changes to the database structure, the platform will automatically update all pages and logic (like queries) that you are using, and will pin-point all the elements you need to manually change to ensure the app is consistent.
You can download the Agile Platform for free at http://www.outsystems.com/download/ and give it a try.
Cheers Michel
PS: I work at OutSystems
精彩评论