Railslike PHP Framework: Code Igniter
codeigniter.com
codeigniter.com
The good stuff:
* GREAT documentation * Code was designed around performance, and it is pretty darn quick. * PHP4 based. (This, btw, is only a plus for a tiny few people. There's no need to be on PHP4 any more.)
The bad:
* The "model" layer is not really an ORM at all. It's just a slightly fancy way of wrapping SQL statements. This is better than no separation of concerns, but it's not really an object oriented way of accessing the model layer. * It misses out on all the great things that are going on with PHP5. * It's open source but privately developed. The pace of evolution is glacially slow, and decisions about the direction of the framework are made closed doors.
To me, CI is a HUGE advance over throwing code together in php files, but it doesn't really have enough abstractions to qualify as a true MVC framework.
If you do decide you like CI, check out kohana php. This is an open source, community developed fork of CI -- that's built for PHP5.
For what it's worth, I'm far happier coding in Rails (and the little bit of django I've tried), and would probably recommend those if you're not afraid of abandoning php.
I don't really like the Rails comparison that people make. It's PHP and it's significantly less "magical" than rails.
many php servers do not have the option to run a cron job, and i think ruby can hold a state, where php runs the script for each request.
what do other YC'ers think about Code Igniter?
So I decided to tinker with the framework and fork my own implementation.
My framework is now built on top of CI and is able to use functional programming idioms such as anonymous functions and the like. Pretty awesome stuff.
Is it efficient? well according to the original author you take a minor hit it performance (as of yet he has not provided any solid numbers) in exchange for programmer happiness.
The implementation of anonymous functions is quite clever. Please consider this library was created 4 years ago and has remained stagnant up until now. To put it shortly he uses a eval based approach in order for use of anonymous functions.
while (true) { create_function('', ' return 0; '); }
Quick question how good is PHPMailer compared to CI's native Email lib? Was planning to use the latter for our company's web app.
Love it, love it. Has its issues, but I can't really put into words how useful it has turned out to be for our team.
We may very well go with Django long-term, but I've never spent a day regretting that we're using CI. And this from a guy who has always had a fairly low hacker opinion of PHP. CI kinda changed that a good bit once I pushed back my skepticism.
I highly recommend it for PHP developers who want to move to the MVC model and get a lot of ROI on their development time.
If you're comfortable with Ruby or Python, you'll enjoy the other frameworks more, of course. But I wouldn't use PHP on its own without Code Igniter.
in the "RAILS MVC" pattern i have only tutorial experience and now the code ignite tutorial behind me. I come from a C# world, so a lot of this is still new to me. We decided to move from C# because php5.2 is so awesome, and mono was becoming a scary rabbit hole. Code Igniter is an exciting idea.
I am curious what the best way is to extend a model in CI. it looks like a few days work just to think about it. i think if we bring in 4braham in Madison, WI we might be able to build a decent set of classes though. ThruDB also launched today for ubuntu, so i would like to build in the hooks for thrudb and memcache on s3 objects so that it is built for scalability and simplicity.
we have a smart client so as long as i can publish xml, smart widget can read it, and since we are not using javascript, we can read XML so effortlessly in flash.
Haven't tried it yet.
And, I choose to use the PHP5 fork of CI, Kohana -- http://kohanaphp.com