Forum Moderators: coopster
I've spent the last week reading Code Ignitor's manual and my head is kind of reeling. I've also tried to plod into Cake PHP's manual and now my head is pounding.
What php frameworks have you all found effective and why?
For those with experience with the MVC approach, do you think that this really makes sense for web dev?
Using a framework like CI brought back the initial enthusiasm I had for programming, and, even though I am a hobbyist, it made me use clearly laid out structures. Separation of logic,presentation and data retrieval made it much easier for me. It simply enabled me to build bigger and more complex websites in and I am able to do it faster as well.
I have the same objection to CMS'es as you do, they never quite fit my purposes. Difficulty to extend, tied to a restricting structure, unable to unleash my creativity and in the end always resorting to nasy hacks. Using a framework allowed me to keep the occasional creative outbursts with the opportunity of building a CMS quick and tailormade.
It sounds a bit like a commercial but I really find programming fun now, you don't have to focus on the details but instead simply make the application. So much is just already done, security, database abstraction, form validation, image manipulation, CRUD, scaffolding, table relations, file uploads, stuff I either had to build myself (and I have) or search for on the internet to find some properly programmed class to do it for me.
The choice of frameworks is more personal, I think. I took CI because of its flexibility, speed, its simple implementation and great documentation. CakePHP would probably have done as well though its documentation isn't as good, I hear. Symphony is for php5 which is presently not installed on my server (it looks very promising though, good documentation too).
PEAR is not really a framework although it takes away some work for you with its many classes. Documentation simply sucks and the classes are often bulky and less often buggy.
Zend framework is supposed to be lean and good, simply focussing on the MVC. I haven't tried it or seen screenshots/tutorials or anything so I don't know much about it.
I know of Symphony and Cake that they have advanced AJAX classes, I miss this in CI although I don't need it for the website I'm working on right now. It is relatively easy to implement a similar solution for CI and the community is working on it, so that shouldn't keep you.
I hope I cleared things up for you.
Thanks for your post, and your input. I appreciate it a lot.
I personally came to computers through an interest in web dev and not as a programmer orignially. So even though I could write code to do just about anything I wanted, I found I had a lot to learn about readability, extensibility, upgradability, and working on teams (which I don't do really).
I can see you've looked into the issue more than I have. CakePHP's documentation is confusing and limited and cursory at best. It seems to do the same things CI does, just not as intuitively and more restrictively. I've also looked at Drupal (CMS) and it seems very flexible and a possible candidate for certain projects. I've looked at Joomla and was appalled by the crappy unstandard table-filled html code it produces, but like the user management aspects.
I hadn't heard of Zend Framework (But I have heard of Zend). I thought it was an IDE. I'll check it out. Thanks for the tip. I'll also look into PEAR. This is code repository, right?
Cake's AJAX library seems very cool, but it wouldn' be hard to write my own and integrate it into CI. But if they're working on one, maybe I'll wait : ) That's one of the benefits I'm trying to plug into by using a popular framework that is updated frequently, upgrading it with increasingly better functionality. Also, it saves me from writing a code guide for people who work on the same projects with me. I just send them to CI's manual. Have you found any MVC frameworks that you like better than CI?
What I don't get in CI, is what to do with regular static pages that aren't exactly "applications". A site might have many forms or whatever, but not all pages are dynamic, as CI's manual shows perfectly. It would be silly to have a controller for each page. I guess I can make a controller for static pages called "pages" or something, and pass it the name of a "view", but a static page isn't really a view, though.
What I don't get in CI, is what to do with regular static pages that aren't exactly "applications". A site might have many forms or whatever, but not all pages are dynamic, as CI's manual shows perfectly. It would be silly to have a controller for each page. I guess I can make a controller for static pages called "pages" or something, and pass it the name of a "view", but a static page isn't really a view, though.
You can have normal static pages residing besides your index.php in the root folder. A proper .htaccess file should recognize its existence and not use the CI way of doing things. I myself would use a controller for static pages, the layout is set using templates and bypassing CI for this would make the application lose its structure.
If the URL becomes ugly because you have an unnecessary controler you can use the routing function to make it look good.
My experience is mainly with CI, as said it has good documentation, easy learning curve and does not enforce its own structure upon me too much (unlike most CMSes). The next best candidate would be Symphony, again good documentation, community but php5 only. (Yahoo uses it :) )
I heard recently of Seagull framework, but I don't know much about it.
You can have normal static pages residing besides your index.php in the root folder. A proper .htaccess file should recognize its existence and not use the CI way of doing things. I myself would use a controller for static pages, the layout is set using templates and bypassing CI for this would make the application lose its structure.
Yea, it won't only loose it's structure, but you won't be able to benefit from the built in classes or helpers.