SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Guru
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using a PHP Framework?

    I had a discussion yesterday with my new coordinator in regards to frameworks. I told him that I was working on my own framework/code base for which to base all future projects off. His argument was that it would be better to go with one of the many free PHP frameworks available like Zend, CakePHP, etc, as they've already been thoroughly tested and have well established support communities. All of which is valid, but Frameworks to me have always seemed like massive bloat, and possibly an amateurs tool. So, I've once again come to the sitepoint forums seeking wisdom.

    What are your thoughts on using a PHP framework for development of web applications (on an intranet) and public facing websites? And on what scale does a project have to be for a framework to become useful/time saving/etc?

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2009
    Location
    Lexington, KY
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tend to use frameworks for everything. I've really taken a liking to CakePHP, although the documentation leaves much to be desired.

    I'm not sure I would describe a framework as an "amateur's tool." Most frameworks are fully customizable and easily extensible to fit my needs.

    I think frameworks can be instrumental in helping you create optimal, compartmentized code in less time. Sure, the first project is going to be rough because you have to learn the framework. But after that, the time saved is *very* noticeable. Why reinvent the wheel?

  3. #3
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have to be honest and say i've never tried out any php frameworks, but I do have my own "framework" of sorts that has evolved over the last year or so. It is very re-usable, very straightforward and flexible.

    While I might be pleasantly surprised once I get used to using a framework, I really like knowing that I have everything I need and nothing else. I also am a bit skeptical how much faster I could work with another framework.

    On the subject of frameworks though, I do love Mootools the javascript framework. Here is a perfect example of where you can do loads of neat things, find heaps of resources, and not have to worry about all the cross browser compatibility problems that come with js.

    I think the fact that I suck at js and know quite alot about php has alot to do with using a framework for one and not the other.
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development

  4. #4
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Arent Drupal and Joomla framework?

  5. #5
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm like wheeler, I don't use a PHP framework as I feel I can write the code much faster myself rather than relying on a framework. Sure you might be a able to this or than with the framework a little faster but generally you'll need to write the code so I just stick to the good old txt editor - although I have been looking to some PHP frameworks and reviewing there use.

  6. #6
    SitePoint Addict
    Join Date
    Jan 2007
    Location
    Romania
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The biggest two advantages of using a framework are that 1) you don't have to invest time to write one yourself and 2) the framework is in most cases already tested in a lot of projects.

    The disadvantage (depends on how you see it) is that the learning curve may be steep, but for sure it takes you far less time than building a new framework yourself.

    Quote Originally Posted by Wardrop View Post
    ...but Frameworks to me have always seemed like massive bloat...
    In Zend_Framework, for example, you are not required to use all the functionality the framework offers you. For example, you can use Zend_Mail only, without any other dependencies.

  7. #7
    Web development Company chrisranjana's Avatar
    Join Date
    Jan 2001
    Location
    chennai , tamil nadu , India
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes for any framework the learning curve is steep.
    Atleast if a framework is available in the public domain someone will be there to maintain it.
    What will happen to your OWN framework once you leave the company ?
    Chris, Programmer/Developer, Chrisranjana.com
    Chennai, Tamil Nadu, India.
    Php Developers

  8. #8
    SitePoint Guru
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by chrisranjana View Post
    What will happen to your OWN framework once you leave the company?
    That's always a question of concern. I think like this... as long as you put some effort into ironing out most, if not all, bugs in a system, then in theory, as long as a detailed list of requirements is provided with detailed instructions on how to re-install the, configure and recover data from the system, is included, then it's really not much different to looking after a discontinued piece of software.

    I can't really see how using your own framework to create an application, is much different to using a 3rd party frameworks, in relation to leaving a company. Assuming the custom framework is documented at least to some extent, the chances are anyone taking over the systems I've created is going to have to learn a framework anyway. The only difference is the level of documentation.

  9. #9
    SitePoint Member
    Join Date
    Apr 2009
    Location
    Belfast, NI
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't see how frameworks are an amateurs tool? Their use promotes good software design and practices, so I'd say they were quite the opposite.

    If you've been building sites for a while the chances are you have a library of common functions and patterns. What's the difference between that and any of the frameworks? Does using your own framework make you an amateur?

    Using a framework lets me concentrate on building the logic of my application rather than wasting time on housekeeping or wheel-inventing tasks; the framework maintainers do that for me. I wouldn't consider NOT using a framework for any non-trivial web application, in PHP or any language.

    For the record, my weapon of choice (for PHP) is CodeIgniter with a couple of my own utility libraries thrown in. It has good docs, an active community, is pretty easy to learn and doesn't feel like bloat.

  10. #10
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Wardrop View Post
    The only difference is the level of documentation.


    There you go, I think you've hit the nail on the head there. From a business point of view, why would I invest in a custom framework when I can have one that's fully documented, tested and supported.

    When I come to replace you, or add to my team, I can advertise for a Zend, Cake or Symfony experienced candidate. I'm pretty sure I couldn't ask for a 'Wardrop' experienced one.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  11. #11
    Web development Company chrisranjana's Avatar
    Join Date
    Jan 2001
    Location
    chennai , tamil nadu , India
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes unless a framework is maintained continuosly, some bugs are sure to creep up..So in case of an open source framework like cakephp etc it continues to be maintained, But if it is your own framework the moment your boss decides to use someother framework it stops unless you have made it totally 100% bug free and future proof.
    Chris, Programmer/Developer, Chrisranjana.com
    Chennai, Tamil Nadu, India.
    Php Developers


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •