When creating a php script such as a CMS or a CRM, do you recommend using a php framework? Or should you just develop your own framework for that one script?
I've been looking around at php frameworks and the popular ones seem to be CakePHP, Zend and CodeIgniter...
What are your thoughts? If you agree php frameworks are the way to go, which one do you use or recommend?
Should I use a framework?
Moderator: General Moderators
Hi,
I'd definitely use a framework, unless I knew the application would be very specific, in which case I'd write my own. But for a CMS or CRM, this is probably not the case.
As for which framework to choose, it doesn't really matter. All of those you listed are fine, I'd just add Symfony to your list and take a brief look at all of them. Pay attention to the things you'll be doing the most and choose the one you like. Oh, and Zend is the least framework-ish, it's more like a library but in the end it doesn't matter.
regards
I'd definitely use a framework, unless I knew the application would be very specific, in which case I'd write my own. But for a CMS or CRM, this is probably not the case.
As for which framework to choose, it doesn't really matter. All of those you listed are fine, I'd just add Symfony to your list and take a brief look at all of them. Pay attention to the things you'll be doing the most and choose the one you like. Oh, and Zend is the least framework-ish, it's more like a library but in the end it doesn't matter.
regards
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
I use Zend and Symfony. Both are good in their own ways. I think it's always a good idea to use a framework of some description for any mid sized projects unless you can make a very good argument not to - otherwise you spend most of the time reinventing wheels instead of getting features added
. Of course, don't be afraid to decide which parts of any framework you dislike - for example, I never use Zend's DB component since I believe it's far too complex and diverging for its own good - so I substitute in something else entirely.
An important point is to pick a framework, and stick with it. You can try out others to see if they feel better - but the more you use one framework, the more efficiently you can get it to do your bidding, and the less time you spend learning all it's individual quirks and practices. Also be aware that learning any framework for the first time does take some time - factor the learning into any schedule you have!
An important point is to pick a framework, and stick with it. You can try out others to see if they feel better - but the more you use one framework, the more efficiently you can get it to do your bidding, and the less time you spend learning all it's individual quirks and practices. Also be aware that learning any framework for the first time does take some time - factor the learning into any schedule you have!
- kyberfabrikken
- Forum Commoner
- Posts: 84
- Joined: Tue Jul 20, 2004 10:27 am
I'd say it matters a lot. Problem is, that it's hard to give advice on. Most of the available frameworks are excellent, but they are so in different ways. What fits you depends on the application, you're building and on who you are.dbevfat wrote:As for which framework to choose, it doesn't really matter.
As I see it, frameworks can roughly be described as partially a canned architecture and partially a library to support this architecture. The scope of the architectural part varies between solutions; Some focus on specific parts, while others try to encompass the entire application, perhaps even influence the development process as a whole.dbevfat wrote:Oh, and Zend is the least framework-ish, it's more like a library but in the end it doesn't matter.
In a way, you can say that all libraries has an element of architecture in them, since their interface influences the rest of the system. By that measure, the choice of calling something a framework or a library is subjective. What identifies the popular solutions, such as those you mentioned, is that they have a very large scope. Symfony, for example, spans almost all aspects of an application. This gives some benefits, but also comes at a price. You generally can't easily change architecture (That's what makes it architectural in the first place), so the larger the scope, the more you're locked in.
Re: Should I use a framework?
I have tried installling several, including CodeIgniter.Mr Tech wrote:I've been looking around at php frameworks
and the popular ones seem to be CakePHP, Zend and CodeIgniter...
What are your thoughts?
If you agree php frameworks are the way to go,
which one do you use or recommend?
Right now my favorite framework is Solar PHP Framework.
It is young, but already the alpha release is very nice.
Have a look at it!
Some Features:
Locale, User, Auth, Access, Role, Form,
SQL_Adapter, Json, Http, Uri, Mail, Smtp
Here is a review article with code example:
http://blog.phpdeveloper.org/?p=62
Solar Framework Wiki - with tutorial and examples:Starting Simply with Solar
Posted in PHP, Solar, Web by enygma on the July 12th, 2007
In an effort to get to know as much of the technology out there,
I wanted to branch out in my framework knowledge and try something I hadn't looked much into yet
- the Solar framework (PHP5).
I've worked with both the Zend Framework and CakePHP on previous sites,
so I wanted to see how they compared.
http://solarphp.org/
Official Links:
http://solarphp.com/
http://paul-m-jones.com/blog/
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Well, I've made a few assumptions; the application is CRM/CMS and he's a person with no experience with frameworks. All of the listed ones are good enough and from that perspective, it doesn't matter, which one he chooses.kyberfabrikken wrote:I'd say it matters a lot. Problem is, that it's hard to give advice on. Most of the available frameworks are excellent, but they are so in different ways. What fits you depends on the application, you're building and on who you are.dbevfat wrote:As for which framework to choose, it doesn't really matter.
I disagree here; there is a huge and clear difference between a framework and a library, and libraries rarely have so strong architectural elements as to significantly influent the rest of the system. Also, determining what is a framework and what a library is not subjective; i.e. we're all sure that Symfony is a framework and SwiftMailer is a library. It's the ones in the grey area that we're not sure about. ZF maybe falls into that category (although probably more on the framework-side), since it doesn't enforce an application structure too strongly, and at the same time some of its modules are even usable in other frameworks as libraries.kyberfabrikken wrote:In a way, you can say that all libraries has an element of architecture in them, since their interface influences the rest of the system. By that measure, the choice of calling something a framework or a library is subjective.
I agree. You really fly until you hit the ceiling, but then you're almost forced to go on your own, unless you're willing to take serious compromises or even extend the framework on your own.kyberfabrikken wrote:What identifies the popular solutions, such as those you mentioned, is that they have a very large scope. Symfony, for example, spans almost all aspects of an application. This gives some benefits, but also comes at a price. You generally can't easily change architecture (That's what makes it architectural in the first place), so the larger the scope, the more you're locked in.
regards
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Should I use a framework?
You have three obvious choices on what foundation codebase you build you application on top of:Mr Tech wrote:When creating a php script such as a CMS or a CRM, do you recommend using a php framework? Or should you just develop your own framework for that one script?
1. Create new code
2. Use code that you have developed previously
3. Use code that someone else has developed
There are advantages and disadvantages. Depending on the project creating a greenfield codebase (#1) might make sense. However time is money, so the time you spend coding things that either you have already coded or can get elsewhere is costing someone money -- either you or your employer. Code you have developed has the advantage that you are familiar with it, though often the disadvantage that you don't realize the code sucks. Using someone else's code means you have to learn it and can customize it less, but it is probably better designed.
Those are three different styles of frameworks ... I can only recommend that you download them and give them a try. Most people's experience is that they can't stand most of them and fine one or two that are close, of which only one has the needed feature. So you are doomed to some framework out there.Mr Tech wrote:I've been looking around at php frameworks and the popular ones seem to be CakePHP, Zend and CodeIgniter...
What are your thoughts? If you agree php frameworks are the way to go, which one do you use or recommend?
(#10850)