Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Michael Cook
Full Stack JavaScript Techdegree Graduate 28,975 PointsWhat is the difference between building a web app with a framework vs without a framework?
I am currently developing a web app locally with plain PHP, no framework. The application allows a user to create an account and then create events, invite people to the event, and keep track of who is and isn't coming. When someone gets invited, they get added to the guest list and they receive an email containing a link to a page with a form where they can RSVP. It's a pretty simple application that I have been working on for a bit and plan to continue working on, adding more and more features.
The thing is, despite it being a pretty simple application, it actually feels like a huge project. I have quite a few files, some with hundreds of lines of code already and I haven't even finished the project yet. Every little feature requires what seems like a fair bit of complexity, and that is even attempting to be as DRY as possible. I have not learned a PHP framework yet but I am wondering if using a framework for future projects will greatly improve development speed and reduce complexity, or if a framework is just for the purposes of allowing an application to scale, etc. I am still fairly new to PHP web development and I'm not exactly sure what the use of a framework is, but I am hoping that it will allow me to write things a little quicker because I just didn't realize how much work even a simple app would be.
Any pointers or guidance on development workflows or frameworks would be great, thanks.
1 Answer
adrian miranda
13,561 PointsA good web framework should help in many areas, not just in allowing your app to scale. It should provide quick, easy ways to handle most common web related functionality. Perhaps most usefully, it will hopefully have been used by many many people before you, and therefore most bugs should already be fixed. By contrast, if you are writing your own code to handle basic functionality, there is a greater chance of introducing new bugs.
Please note that there is a lot of variation between frameworks, some are more powerful and flexible, but also tend to be "heavier", meaning they require more setup on your part, and may have more overhead.
Also, how much difference the frameworks makes, will depend somewhat on the base language in use. A language like PHP (originally aimed at creating websites) probably provides more basic web functionality than a language like python. So, you could argue that using a web framework is more important with python than PHP.