5 ms·
No matter how much PHP is improved upon, until there is a serious contender framework for it like Rails or Django, PHP will continue its route to extinction. I
by mootothemax 14y ago
No matter how much PHP is improved upon, until there is a serious contender framework for it like Rails or Django, PHP will continue its route to extinction.
I'm not sure if you're serious, but there are plenty of frameworks on a par with Rails at least (nb: I have zero experience with Django).
At the enterprise level, there's Symfony or Zend:
http://symfony.com/ http://symfony.com/
http://www.zend.com/ http://www.zend.com/
If Rails is your thing, CakePHP shares some concepts (although I'll be the first to admit CakePHP has many flaws):
http://cakephp.org/ http://cakephp.org/
Want something lightweight that's easy to jump into? CodeIgniter's the one for you!
http://codeigniter.com/ http://codeigniter.com/
And finally, my favourite, Kohana. Absolutely infuriating since they essentially stopped writing documentation for new versions, but if I need to get something written quickly and reliably, this is my go-to call:
http://kohanaframework.org/ http://kohanaframework.org/
There are tonnes of "serious" frameworks for PHP (I've certainly missed out a few), and frankly, if you're going to try to attack PHP, this is the wrong angle from which to do so.
- giulianob 14y agoI've been using Cake since around 1.1 and it started with a decent base but was not very consistent. I just recently upgraded to 2.2 and I was extremely surprised with the amount of refactor and polish in order to make it a very consistent and powerful framework. It's really top notch nowadays. The performance is also better (used to have to do some "hacks" to get good performance before) but I'm not sure how it compares to others.
- mootothemax 14y agoTo be fair, the biggest problem I have with Cake is its ORM; it just feels unnatural to me. You ask for some data, and get back an associative array of values, which you can't do anything with but pass elsewhere. It just lacks a certain sense of OOPiness for me :)
- harisenbon 14y agoI feel the same way, and I've been trying to get away from Cake for a while, but the fact that everything except the quirkiness of the ORM is so nice that I stick with it. Also, the next version is supposed to redo the ORM to return actual models.
- giulianob 14y agoI wonder if the performance will be better or worst though. Creating tons of objects might impact it but they might be able to do more lazy loading to help.
- dt7 14y agoThere's also Slim: http://www.slimframework.com/ http://www.slimframework.com/ ...which you could equate to something like Python's Flask (I think... I only have limited experience with Flask).
- polyfractal 14y agoWe used Slim to build a RESTful API for our product. It was a great experience. Really lightweight, yet the perfect amount of structure to make an easily extensible API.
- ZoFreX 14y agoPlease don't recommend CodeIgniter. I'm not normally one for swathing "x is bad" judgements, but CI is simply not in the same league as the other frameworks you mentioned.
- mootothemax 14y agoPlease don't recommend CodeIgniter. I'm not normally one for swathing "x is bad" judgements, but CI is simply not in the same league as the other frameworks you mentioned. I wouldn't have a few years ago, but the current version seems decent enough. Out of interest, what're your main complaints with it? I'm not a huge fan of CI, but would prefer it to my personal bugbear, CakePHP.
- andrewjshults 14y agoHaving taken over a project that uses CI at it's core, I've found a number of things that definitely put it in a league below frameworks that were built with PHP 5.3 in mind. * Way too much magic - everything (libraries, models, etc.) is globbed onto a superglobal class, which breaks auto-complete in IDEs and in general makes debugging harder * No proper autoloader (PSR-0 style) - the built in autoloader can't autoload anything that doesn't fit into the CI world which tends to lead to unnecessarily large classes (anything that isn't a model gets lumped into a library) * Setting up routes gets messy fast (it's all defined as a single associative array) * No built in template system (which, in my experience, encourages bad behavior in views)
- Killswitch 14y agoOkay, so a bunch of personal preferences that don't actually matter in the real world? Thanks for your insight, but it does not make CodeIgniter bad. > frameworks that were built with PHP 5.3 in mind. Well no crap, CodeIgniter is built for newbies in mind, people who don't have up to date PHP installs because their shared hosting doesn't keep it THAT up to date. The newest versions of CodeIgniter are VERY good, and just like the haters of PHP, you're just hating on versions of CodeIgniter that are at least 3 versions old. Learn the updated system, then base your claims on that, not something you looked at 2+ years ago.
- Destroyer661 14y agoI've found that Laravel is quite a bit nicer than most other frameworks in PHP. It uses some stuff from Symfony as well. I don't think it's contending with Django quite yet, but it's extremely nice to use and work with. I honestly don't feel like I'm writing PHP when using it. http://laravel.com http://laravel.com