Based on experience which PHP framework makes implementing CRUD operations the easiest so that time can be spent on the more 'interesting' parts of the application?
Suggested
Based on experience which PHP framework makes implementing CRUD operations the easiest so that time can be spent on the more 'interesting' parts of the application?
Suggested
I highly recommend CrudPHP as you won't get the overhead of using a larger framework which wasn't intended specifically for CRUD operations.
CakePHP is very useful for rapid development of CRUD tools. Checkout the screencast of creating a blog.
While not specifically for CRUD, CodeIgniter has a nice database interface thing. Of the PHP web-dev frameworks I tried, I found it to be the most PHP-like (the rest seemed to try and emulate Ruby on Rails as much as possible, and enforced their own coding style quite strongly)
You might also check out CoughPHP. It's basically an ORM system that generates code from your database schema for you.
Of the Rails/Django-style frameworks people are mentioning, Symfony is my favorite. It can use either Doctrine or Propel (which sgherig mentioned) for ORM. It has a really nice admin backend interface generator, like Django's.
You can also use Symfony's helper utilities to sketch out your database schema and test data in easy YAML and have it autogenerate your Propel configuration (even if that's all you want to use it for). (Then Propel takes over and generates the SQL, inserts your test data, and creates all your model classes, which have their CRUD methods already baked in.)
Propel relies primarily on inheritance (it creates a whole structure of base classes, subclasses, and subsubclasses, where your "Person" class is the subsubclass, skeletoned out so you just add your business logic methods, and the subclass has all of the CRUD methods hard-coded), whereas Doctrine does less code generation and adapts better to more complicated business problems/table relationships.
Also worth a look is Zend's Zend_Db_Table
, particularly if you don't want/need an application framework or full ORM, and just want CRUD methods in your classes. It is basically a table gateway like PEAR's DB_Table
.
The ATK framework is a comprehensive PHP LGPL licensed framework that focusses specifically on building and maintaining business applications.
If you've ever seen the Achievo web based project management system you've seen the kind of functionality it has to offer.
Documentation could be a whole lot better and there is a learning curve (like a big frameworks) but once you get the hang of it wrinting a CRUD screen is one line of code, then you just get to worry about the parts that matter.
Disclaimer: I work at Ibuildings, the creator of ATK, and did a lot of work on ATK, but I don't get paid for saying this, it really does make developing CRUD screens incredibly easy.
For CRUD, you should probably look at database libraries such as Doctrine or Propel. They have both a Database Abstraction Layer (DBAL) and an Object-Relational Mapper (ORM) which implements ActiveRecord, in particular CRUD.
The framework I developed, PHP On Pie (http://phponpie.com) has a full DBAL and ORM, which can auto-generate models from schemas if you want. It's very flexible and easy to use. But it only works with MySQL.
Give a look at Yii Framework. Light, fast, simple to learn, and CRUD feature.
You should try PHP On Pie. Funny name, but it does what you say. http://phponpie.com
In fact, it promotes REST, so you probably would just want to tie PUT -> INSERT POST -> UPDATE (and possibly insert related) DELETE -> DELETE GET -> SELECT
Pie kind of lets you specify what you want to get back, so if you do a POST and you say you want to get "article" back then it will also select and return your article.