Results 1 to 18 of 18
  1. #1
    Join Date
    Mar 2008
    Posts
    606

    why use frameworks ?

    i find that the time spent on mastering the learning curve of frameworks can be spent on developping. Am I the only one who feels this way ? Why and when should you use frameworks like Zend or Rails ? When you need to pump out many web app's a month ?

  2. #2
    It can take a while to learn a framework, but I found that once I learned a framework, I could finish projects in less than half of the time.

  3. #3
    It deals with all routine tasks, like url dispatching, working with database, templates etc. You don't have to think about routine and focus only on your application.

    If you don't use framework, you have to reinvent all this thing for every new project. Or reuse some your code from previous projects. And that reusable code is also framework of some kind. So maybe you are already using framework of your own and haven't even notice that.

  4. #4
    Join Date
    May 2009
    Posts
    766
    Not to mention, the use of a framework will put a severe dent in your defect backlog. If you use a framework correctly, odds are that things like basic data validation are taken care of under the hood. Nothing like having to revisit a script you wrote 4 months ago because that's how long it took for someone to cut and paste tab characters into a form field (which you never thought to check for the first time around.)

    Also, by abstracting your methods, you would only fix the above bug in one place, instead of having to hunt down every script that takes its inputs from a form. That saves countless hours. (Okay, they're probably not countless, and probably someone has actually counted them...)

    But hey...if you feel you save time by rewriting the same code over and over and over...

  5. #5
    Join Date
    Feb 2006
    Location
    Buffalo, NY
    Posts
    1,501
    Between all of the replies everyone has touched on the reasons to use a framework

    * Agile development
    * Recreating the wheel (CRUD)
    * Validations etc
    * Consistency across applications
    * Easily start an application with a nice logical structure (MVC)
    * Helpers
    * ORM (if you're that kind of guy, which I am )
    Cody R.
    Hawk Host Inc. Proudly Serving websites since 2004.
    Official Let's Encrypt Sponsor

  6. #6
    Join Date
    Jun 2006
    Location
    Europe
    Posts
    632
    something that isn't mentioned is that frameworks usually comes with certain "latency", e.g. more hardware hungry, so that is one of the important things to account when using frameworks.

  7. #7
    Join Date
    Feb 2006
    Location
    Buffalo, NY
    Posts
    1,501
    Quote Originally Posted by xtrac568 View Post
    something that isn't mentioned is that frameworks usually comes with certain "latency", e.g. more hardware hungry, so that is one of the important things to account when using frameworks.
    Absolutely! Though this day and age hardware is much cheaper and powerful so the overhead is quickly becoming a non-issue. That being said the larger frameworks (CodeIgniter, CakePHP, Symfony, etc) offer numerous levels of caching to offset the "heaviness" of the framework.
    Cody R.
    Hawk Host Inc. Proudly Serving websites since 2004.
    Official Let's Encrypt Sponsor

  8. #8
    Quote Originally Posted by xtrac568 View Post
    something that isn't mentioned is that frameworks usually comes with certain "latency", e.g. more hardware hungry, so that is one of the important things to account when using frameworks.
    Not all of them. Codeigniter is not very hungry for resources. Also there's a lot of fast lightweight frameworks (TinyVC, ELF, Picora), that have only 200-300kb of code and have not very much functionality comparing to Cake or Zend, but still help a lot.

  9. #9
    When working in a team, it's nice to have a certain convention in the code.

    Framework helps to enforce this.

    Imagine in a single web app, 10 people doing their own way/style of validation, db abstracting, templating, etc. That would be messy.

  10. #10
    Quote Originally Posted by Krupux View Post
    When working in a team, it's nice to have a certain convention in the code.

    Framework helps to enforce this.

    Imagine in a single web app, 10 people doing their own way/style of validation, db abstracting, templating, etc. That would be messy.
    Using a framework just for standards is pointless. It would be more beneficial to have a common standards document for code that is agreed on by everyone IMHO.

  11. #11
    Join Date
    Nov 2001
    Location
    Vancouver
    Posts
    2,422
    If you don't use a framework, almost certainly you are going to end up writing your own in time. For many novice programmers, it would be far safer to build upon the work of more experienced folks (framework developers) rather than to roll their own.

    That said it would be ideal for all would-be web developers to try to build their own simple framework - a good learning experience. Then go use a mature solution unless you have the staying power to refine your own.

    I use a fairly lightweight Python framework -- the average person can read through the entire thing in one sitting. That and it's older brother have been my constant companions for the better part of this decade.

    Features - that's why I chose one, and at the time Nice URLs (/product/laser-rifle/edit) and smart automatic quoting / protection from XSS was among the reasons I chose the framework and I've stuck with it all these years because it does those things and others well.

    In-vogue feature sets are usually what drives people to frameworks, like a nice ORM or perhaps an easy way to provide HTML views as well as a ReST API - some frameworks make short work of both, and writing each from scratch is non trivial for many, especially those starting out.
    “Even those who arrange and design shrubberies are under
    considerable economic stress at this period in history.”

  12. #12
    Join Date
    Feb 2003
    Location
    AR
    Posts
    2,382
    Quote Originally Posted by rhosternet View Post
    Also there's a lot of fast lightweight frameworks (TinyVC, ELF, Picora)...
    Thank you so much for mentioning these 3 small frameworks. I've been looking for a good framework that did the basics and nothing more and have not been able to find a single one. I'm reading about all 3 of these now, so thank you...

  13. #13
    Join Date
    Jan 2008
    Location
    Temecula, CA
    Posts
    52
    I use the CodeIgniter framework, and it has made my web development work so much more maintainable. The nature of a model / view / controller application is such that all of the code becomes very organized. Also, there are a lot of plugin type libraries that can be downloaded from their Wiki. I have used Kohana as well, but moved to CodeIgniter because of how well documented their framework is. Especially now that Kohana has moved to version 3, there is no documentation at all (unless you count the comments in the code).

  14. #14
    Join Date
    Apr 2009
    Location
    New York City
    Posts
    5,169
    I have never used it, but lately I've been craving to get a trial on it.

  15. #15
    Join Date
    Jan 2008
    Location
    Temecula, CA
    Posts
    52
    Quote Originally Posted by PerfectedHosting View Post
    I have never used it, but lately I've been craving to get a trial on it.
    I think if you already know php, you're going to be amazed at how fast you can program a site once you learn the framework.

  16. #16
    Quote Originally Posted by ThatScriptGuy View Post
    Thank you so much for mentioning these 3 small frameworks. I've been looking for a good framework that did the basics and nothing more and have not been able to find a single one.
    You're welcome.

    Picora site is dead, so I don't know is there a way to download it.

    And I made mistake earlier. There's no TinyVC, but TinyMVC and LightVC. Both are great.

  17. #17
    Join Date
    Mar 2008
    Posts
    606
    are there any PHP frameworks out there that makes creating API web services easier ? ruby on rails has Action Web Service (http://aws.rubyonrails.org/)

  18. #18
    Join Date
    Jan 2008
    Location
    Temecula, CA
    Posts
    52
    Take a look at this article about REST and CodeIgniter:

    http://philsturgeon.co.uk/news/2009/...deIgniter.html

Similar Threads

  1. CSS Frameworks
    By alann in forum Web Design and Content
    Replies: 2
    Last Post: 10-09-2009, 12:11 AM
  2. .net frameworks - install all?
    By DCvoluwe in forum Web Hosting
    Replies: 4
    Last Post: 12-07-2007, 09:58 AM
  3. Frameworks...
    By That Guy in forum Programming Discussion
    Replies: 4
    Last Post: 06-26-2007, 03:44 PM
  4. oh my g! Frameworks are so slow!
    By grabmail in forum Programming Discussion
    Replies: 4
    Last Post: 03-08-2006, 09:09 AM
  5. VPS Providers and Web Frameworks
    By bljohnson in forum VPS Hosting
    Replies: 4
    Last Post: 03-03-2005, 11:32 PM

Posting Permissions

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