Page 1 of 1

PHP Frameworks: Borrow or Build?

Posted: Sat Nov 22, 2008 3:22 pm
by robincanaday
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

Re: PHP Frameworks: Borrow or Build?

Posted: Sat Nov 22, 2008 4:16 pm
by alex.barylski
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.

Re: PHP Frameworks: Borrow or Build?

Posted: Sat Nov 22, 2008 4:59 pm
by Christopher
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.

Re: PHP Frameworks: Borrow or Build?

Posted: Wed Nov 26, 2008 3:27 am
by jurerick
:banghead: I dont know what framework is?


Is there anyone who can explain what is it?

I am a newbee in PHP.

Re: PHP Frameworks: Borrow or Build?

Posted: Wed Nov 26, 2008 10:12 am
by alex.barylski
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

p.s-Everyone's definition will vary slightly or completely...so take it for what it's worth...

Cheers,
Alex

Re: PHP Frameworks: Borrow or Build?

Posted: Thu Nov 27, 2008 3:17 am
by Maugrim_The_Reaper
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!

Re: PHP Frameworks: Borrow or Build?

Posted: Fri Nov 28, 2008 8:00 pm
by josh
Maugrim_The_Reaper wrote:you can't sell a framework to clients!
I believe you could...

Re: PHP Frameworks: Borrow or Build?

Posted: Sat Nov 29, 2008 6:20 am
by Kieran Huggins
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.

Re: PHP Frameworks: Borrow or Build?

Posted: Sat Nov 29, 2008 9:37 am
by josh
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?

Posted: Sat Dec 06, 2008 4:58 pm
by jon23d
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?

Posted: Sat Dec 06, 2008 6:53 pm
by josh
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.
Which existing frameworks did you use as a control before you made that assessment?