Results 1 to 18 of 18
Thread: why use frameworks ?
-
10-14-2009, 04:02 AM #1Web Hosting Master
- 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 ?
-
10-14-2009, 05:11 AM #2Junior Guru Wannabe
- Join Date
- Oct 2009
- Posts
- 38
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.
-
10-14-2009, 05:55 AM #3Newbie
- Join Date
- Sep 2009
- Posts
- 11
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.
-
10-14-2009, 08:31 AM #4Web Hosting Master
- 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...
-
10-14-2009, 09:01 AM #5Web Hosting Master
- 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
-
10-14-2009, 10:21 AM #6Web Hosting Master
- 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.
-
10-14-2009, 10:38 AM #7Web Hosting Master
- Join Date
- Feb 2006
- Location
- Buffalo, NY
- Posts
- 1,501
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
-
10-14-2009, 12:24 PM #8Newbie
- Join Date
- Sep 2009
- Posts
- 11
-
10-14-2009, 12:47 PM #9Junior Guru Wannabe
- Join Date
- Jan 2008
- Posts
- 84
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-14-2009, 12:51 PM #10Newbie
- Join Date
- Aug 2007
- Posts
- 19
-
10-14-2009, 01:23 PM #11Web Hosting Master
- 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.”
-
10-14-2009, 02:24 PM #12Web Hosting Master
- Join Date
- Feb 2003
- Location
- AR
- Posts
- 2,382
-
10-14-2009, 03:17 PM #13Junior Guru Wannabe
- 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).
Brian G.
Brian's Web Design - Temecula, CA
-
10-14-2009, 05:20 PM #14Web Hosting Master
- 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.
-
10-14-2009, 05:42 PM #15Junior Guru Wannabe
- Join Date
- Jan 2008
- Location
- Temecula, CA
- Posts
- 52
Brian G.
Brian's Web Design - Temecula, CA
-
10-15-2009, 03:20 AM #16Newbie
- Join Date
- Sep 2009
- Posts
- 11
-
10-15-2009, 10:24 PM #17Web Hosting Master
- 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/)
-
10-15-2009, 11:01 PM #18Junior Guru Wannabe
- 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.htmlBrian G.
Brian's Web Design - Temecula, CA
Similar Threads
-
CSS Frameworks
By alann in forum Web Design and ContentReplies: 2Last Post: 10-09-2009, 12:11 AM -
.net frameworks - install all?
By DCvoluwe in forum Web HostingReplies: 4Last Post: 12-07-2007, 09:58 AM -
Frameworks...
By That Guy in forum Programming DiscussionReplies: 4Last Post: 06-26-2007, 03:44 PM -
oh my g! Frameworks are so slow!
By grabmail in forum Programming DiscussionReplies: 4Last Post: 03-08-2006, 09:09 AM -
VPS Providers and Web Frameworks
By bljohnson in forum VPS HostingReplies: 4Last Post: 03-03-2005, 11:32 PM