I am serious about php programming, till now, i had been using the traditional php coding method.. with no frameworks.. is php frameworks a must? do those pros there use php frameworks for their projects? do those big startups like digg, stumbleupon use frameworks? please advises, green given. thanks
It's not really a must, but from the perspective of a developer a framework allows you to write less and introduces you to new ways of handling logic and views. Sites like pownce.com is powered by django framework *well this is a php related question, but you get the idea that many developers uses and extends these frameworks to some extend*. There is a drawback though, if you don't know much about OOP and at least a little bit of patterns it will be a problem extending the framework (as in customizing it using the same classes, classes childs etc etc). Well, it depends at what you are aiming for and knows where to start hacking in. Well, take it as another tool to develop your web applications. I really like frameworks quite a lot, although I can write web scripts from the scratch I just notice that with a framework I can cut off 50% of the work.
It really depends on whether you want your application to be portable and easily editable by programmers with different backgrounds. I have a few projects using symfony, and I think that frameworks are great, but they definitely are not for every situation or programmer. If you are planning on working on large applications where there is a good chance that additional programmers will get involved, then a framework may be a good way to go. For smaller projects it's often complete overkill. Here's my quick comparison: Positives of using a framework: Faster development (Once you get through a nasty re-learning curve) MVC makes understanding an application much easier Code is much more programmer friendly Very stable Most have easy ajax / javascript integration and built-in functionality Very portable Negatives of frameworks: Slower Often very difficult to learn Way overkill for many/smaller projects Additional programmers need to know the framework to effectively write on it Often have strict php install requirements/configuration I think to me the biggest problem is re-learning everything you know. This is especially true if you do not use MVC pattern for your current projects. Also, database connectivity usually switches to propel or something similar. Framework applications tend to be very stable once debugged, but they are significantly slower than most non-framework applications. This can become a major problem with applications that see a lot of traffic and a website become hardware limited in a hurry.
thank you for those detailed advices.. green on the way so do sites like digg and facebook uses framework?
I know that Yahoo bookmarks uses one. I think those sites definitely could be using a framework. Most likely they are using some proprietary MVC framework that was build specifically for their needs, especially in the case of facebook which has it's own framework built in.
Yahoo bookmarks uses symfony I think... *remembers a digg about it * As for small projects with frameworks, I tend to keep the requirements as low as possible and just use a subset of what I need. (This is kinda another reason to like frameworks, you can re-use part of the framework without initializing it completely). Then again I guess it's bad on my side for being a bit lazy =/ Cheers, wish you luck in your development
i am looking at codeigniter now, i am new to the MVC, wondering if its worth it to learn it or just stick to the traditional php.. any advices whether i should go to it?