PHP Frameworks: Borrow or Build?
Moderator: General Moderators
-
robincanaday
- Forum Newbie
- Posts: 14
- Joined: Thu Nov 20, 2008 12:25 am
- Location: Portland Oregon USA
PHP Frameworks: Borrow or Build?
I'm learning PHP to be able to build the information systems for some companies I'm starting (I'm insolvent and I have the time.)
I'm trying to figure out if I should take the time to research and learn an existing PHP framework or frameworks to build my applications, or if I should just build my own. It seems to me that even if I *did* build my own I could benefit from learning how other frameworks work (by the end of building my own I expect I'd have my own framework anyway, better to do it right.) Can anyone recommend a starting place and a methodology for studying frameworks? What frameworks do you favor, and why?
Thanks,
Robin
I'm trying to figure out if I should take the time to research and learn an existing PHP framework or frameworks to build my applications, or if I should just build my own. It seems to me that even if I *did* build my own I could benefit from learning how other frameworks work (by the end of building my own I expect I'd have my own framework anyway, better to do it right.) Can anyone recommend a starting place and a methodology for studying frameworks? What frameworks do you favor, and why?
Thanks,
Robin
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: PHP Frameworks: Borrow or Build?
Are you trying to start a flame war? Haha.
I think it's probably best to use several existing frameworks before you go off rolling your own solution.
Start with a well documented and easy to use framework, like CodeIgnitor or CakePHP. It'll get you started with the basics very quickly and when you start disliking it because it gets in your way, at that point you can switch to something like Symphony or Zend.
I think it's probably best to use several existing frameworks before you go off rolling your own solution.
Start with a well documented and easy to use framework, like CodeIgnitor or CakePHP. It'll get you started with the basics very quickly and when you start disliking it because it gets in your way, at that point you can switch to something like Symphony or Zend.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: PHP Frameworks: Borrow or Build?
Remember that frameworks (and things like Graphics, PDF or Email libraries) just take care of a lot of the tedious part of an application. You still need to build the 80% that makes code a unique the application. Better to focus on where the value is.
(#10850)
Re: PHP Frameworks: Borrow or Build?
Is there anyone who can explain what is it?
I am a newbee in PHP.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: PHP Frameworks: Borrow or Build?
Design Patterns: A high level (abstraction) language agnostic catalogue of design suggestions/solutions/best practices for common (and not so common) development problems.
Framework: A technology/language specific implementation of design patterns. Typically a framework will give your application a foundation or architecture and quite possibly a structure/organization at the file system level.
Library: A collection of classes, modules or functions which assist in expediting development of common tasks, such as an encryption library, SMTP classes, etc, etc. They do not promote or enforce best practices, they just eliminate the need to re-inventing the wheel.
Algorithm: A high level sequence of finite steps to achieve an end result (calculation, compression, etc)
Implementation: A language/developer specific interpretation of an algorithm
Class: Something I hated taking in high school
p.s-Everyone's definition will vary slightly or completely...so take it for what it's worth...
Cheers,
Alex
Framework: A technology/language specific implementation of design patterns. Typically a framework will give your application a foundation or architecture and quite possibly a structure/organization at the file system level.
Library: A collection of classes, modules or functions which assist in expediting development of common tasks, such as an encryption library, SMTP classes, etc, etc. They do not promote or enforce best practices, they just eliminate the need to re-inventing the wheel.
Algorithm: A high level sequence of finite steps to achieve an end result (calculation, compression, etc)
Implementation: A language/developer specific interpretation of an algorithm
Class: Something I hated taking in high school
p.s-Everyone's definition will vary slightly or completely...so take it for what it's worth...
Cheers,
Alex
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
Re: PHP Frameworks: Borrow or Build?
Generally it's better to use an established framework unless you have specific needs for something else. At a minimum remember some frameworks (Zend Framework being an example) have independent components you can use within your own custom MVC framework.
Arborint is right, you know. Your time is more valuable spent working on the specifics of the application. Building a framework is time consuming and it has no monetary return in the short term since you can't sell a framework to clients!
Arborint is right, you know. Your time is more valuable spent working on the specifics of the application. Building a framework is time consuming and it has no monetary return in the short term since you can't sell a framework to clients!
Re: PHP Frameworks: Borrow or Build?
I believe you could...Maugrim_The_Reaper wrote:you can't sell a framework to clients!
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: PHP Frameworks: Borrow or Build?
Building a framework is almost a right of passage - you can learn a hell of a lot by doing it.
That being said, you should only do it once you have opinions on why they should be a certain way, and that comes with the experience of using existing ones.
Learn by using, then learn by doing.
That being said, you should only do it once you have opinions on why they should be a certain way, and that comes with the experience of using existing ones.
Learn by using, then learn by doing.
Re: PHP Frameworks: Borrow or Build?
Yep, IMO you should be able to explain what a framework is to a non-programmer, to test your own understanding. You should probably use 2 or 3 existing frameworks and maybe read a few books first too
Re: PHP Frameworks: Borrow or Build?
I built my own framework several years ago. I'm on revision 6 now, but I use it for every single project I do. Building it has been great, but the finished product is so much more integrated into my workstyle than anything else could be. I can write applications in a few weeks now that would have taken me months before. I'm so glad I built my own. It has payed for itself over and over and over again.
Re: PHP Frameworks: Borrow or Build?
Which existing frameworks did you use as a control before you made that assessment?jon23d wrote:I built my own framework several years ago. I'm on revision 6 now, but I use it for every single project I do. Building it has been great, but the finished product is so much more integrated into my workstyle than anything else could be. I can write applications in a few weeks now that would have taken me months before. I'm so glad I built my own. It has payed for itself over and over and over again.