Brandonmxb Posted December 10, 2011 Share Posted December 10, 2011 Why would someone use a PHP framework? I've read about it and I always hear: it saves you time. But when I program, I've never used a framework (that wasn't mine). When I code, the code is 100% mine. Why use one? When would you use one? What limits does it have? Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/ Share on other sites More sharing options...
premiso Posted December 11, 2011 Share Posted December 11, 2011 It all depends on the project, and your preference. A framework can be good with multiple developers as the documentation and consistency with coding, etc can be a benefit. Especially with opensource software, as anyone can look up on it. With your framework, you would have to take the time to document it, and although you know it well, no one else would, and if you decided to give up on a project that has a bit of people on it, they would be at a loss for the most part. If it was using a framework that is known, well people could easily look up items online in their forums etc for more information about it. There are other reasons, but it is more or less down to your personal decision and perhaps the client you are working for. Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1296658 Share on other sites More sharing options...
Brandonmxb Posted December 11, 2011 Author Share Posted December 11, 2011 Well, what's it do? Does it just have built in functions? Like is it a series of files that you have to include when you're programming so you can use the variables and functions from the framework? Thank you for the reply by the way. Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1296668 Share on other sites More sharing options...
premiso Posted December 11, 2011 Share Posted December 11, 2011 A framework provides streamlined code, in most cases, for common functions etc. So you don't have to "re-invent" the wheel so to speak and have modules type systems to make it easily plugin. Like for instance, Zend Framework has a Doctrine library that is already built to integrate it with Doctrine, so you just have to include that library class for it to work. It also has validation library, mail library, form library, etc. And yes, it is basically including the libraries that you want to use, and it more or less can streamline it. Once you learn a framework they are dead useful, but they are not for every project, as frameworks tend to be heavy, Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1296677 Share on other sites More sharing options...
Brandonmxb Posted December 11, 2011 Author Share Posted December 11, 2011 That's exactly what I was wondering. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1296702 Share on other sites More sharing options...
scootstah Posted December 11, 2011 Share Posted December 11, 2011 but they are not for every project, as frameworks tend to be heavy, While I believe frameworks are not for every project, I don't agree on this reason. Most frameworks only use what you want it to use and therefore have a pretty small footprint. Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1296820 Share on other sites More sharing options...
premiso Posted December 11, 2011 Share Posted December 11, 2011 Most frameworks only use what you want it to use and therefore have a pretty small footprint. Not really what I was getting at, they can have a small footprint, but most of the time you are cloning the whole repository of a framework and tend to have all those files. You can remove them, but most people don't. More or less what I was getting at. Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1296855 Share on other sites More sharing options...
scootstah Posted December 13, 2011 Share Posted December 13, 2011 Sure, but that's only like 3MB give or take. I'm sure most people can spare 3MB on their hosting. Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1297528 Share on other sites More sharing options...
son.of.the.morning Posted December 18, 2011 Share Posted December 18, 2011 A framework is a library of re-usable bassline functions (methods) that can be genericaly invoked with a simplistic line of code, ultimately minimizing the development process. As a stand alone developer you would store re-usable code for futore work to speed up development (the faster the development the more money there is to be made!!) Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1299083 Share on other sites More sharing options...
delaiah Posted January 3, 2012 Share Posted January 3, 2012 Well, why use one. As others have already stated, it saves your time. Big time. Some years ago, while being a newb, I was in the very same position, thinking about wheather I really need to learn to work with a framework. My advice would be: just start learning one and see the advantage for your self. I started with Zend framework (probably not the easiest one for starters) and it's just so useful. Whether I work withing the MVC architecture or just use it as a library for a random project, it always saves me time. Also as a side effect, it makes you a better PHP programmer since you get to work with code written by some great PHP developers. Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1303622 Share on other sites More sharing options...
aricajwalker Posted January 7, 2012 Share Posted January 7, 2012 A framework isn't what it sounds like you think it is. You can use a framework regardless of CSS with CSSUI or MMUI. The framework is simply a way to package up your design/templates/images/etc. It is an independent function. You can take a virtual snapshot of your website when you save a framework. CSSUI gives you a little more flexibility mostly over MMUI. Otherwise, it isn't that much different and the framework works regardless. The options/flexibility are basically at the component level. Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1305186 Share on other sites More sharing options...
ignace Posted January 7, 2012 Share Posted January 7, 2012 You can take a virtual snapshot of your website when you save a framework. Wut? What are you talking about? Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1305219 Share on other sites More sharing options...
premiso Posted January 7, 2012 Share Posted January 7, 2012 You can take a virtual snapshot of your website when you save a framework. Wut? What are you talking about? You know, a virtual snapshot...duh? Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1305375 Share on other sites More sharing options...
WickedWolf Posted January 9, 2012 Share Posted January 9, 2012 I love the Yiiframework when working with Databases because I never have to write SQL statements. No matching single and double quotes for me! Quote Link to comment https://forums.phpfreaks.com/topic/252904-why-use-a-framework/#findComment-1305663 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.