Php framework, a must?

Discussion in 'PHP' started by slaydragon, Jul 28, 2008.

  1. #1
    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
     
    slaydragon, Jul 28, 2008 IP
  2. Mozzart

    Mozzart Peon

    Messages:
    189
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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.
     
    Mozzart, Jul 28, 2008 IP
    slaydragon likes this.
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    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.
     
    jestep, Jul 28, 2008 IP
  4. slaydragon

    slaydragon Banned

    Messages:
    1,403
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thank you for those detailed advices.. green on the way

    so do sites like digg and facebook uses framework?
     
    slaydragon, Jul 28, 2008 IP
  5. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #5
    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.
     
    jestep, Jul 28, 2008 IP
  6. Mozzart

    Mozzart Peon

    Messages:
    189
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    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 :)
     
    Mozzart, Jul 28, 2008 IP
  7. slaydragon

    slaydragon Banned

    Messages:
    1,403
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #7
    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?
     
    slaydragon, Jul 28, 2008 IP