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
Julius M
991 PointsWhen to code all by myself, and when to use a framework or even a flat-file cms?
Ok WARNING this is a total beginner question. I am just building my first website, and its fun :-)
So here is my question: if someone can code html, css and php, he can build a whole website. So here I wonder, why one would use a framework (like bootstrap), or even a flat-file cms (like statamic or getkirby), when he can build the whole site on his own code? AND important question: is there a contra, a disadvantage, of using a framwork or flat-file css, instead of building the whole site with own code?
Would be glad if someone could give me the "missing link" here, and explain me what meaning frameworks and flat-file cms have, in confront to coding everything alone!
Thanx a lot :)
3 Answers
Kevin Korte
28,149 PointsWhy would you use a framework
- Shortens development time
- Focus less on legacy browser support
- Not reinventing the wheel to accomplish relatively common tasks
- Usually have better cross browser support and handling of unique browser issues
- Help establish basic design principles such line heights, font rhythm, etc
- Help establish a basic UX that users will understand
- Allow someone else to keep updating as some things are depreciated, and others are added
The negatives
- Usually leave a ton of bloat or unused code
- Too easy to have a site that looks like many others
- Can be limited to what the grid can or can't do
- Same note, you let the framework control your design, instead of the design controlling the framework
- As nice as allowing someone else to update the framework, framework updates can cause unexpected issues
- HTML or classes are not usually semantic, or as semantic as your site should be
- You can have name space collisions
I kinda went through this cycle. When I first started I hand coded everything in a very rude and crude way, but it worked. I then starting picking up on all the frameworks and plugins out there, and used those for a while to start doing more advance things, in a shorter amount of time. Basically harnessing the power of people smarter than me. I wasn't satisfied with using frameworks and plugins and not understanding how they worked, so I've been moving away from using them again, and more toward lean, mean, custom code, but having dissected a lot of the frameworks and how they do things, I've been stealing their "best practice" ways of doing some things, adapting it to fit my own.
Stephanie Cunnane
7,073 PointsNot my question, but Kevin gave a great answer above!
Julius M
991 PointsThx Kevin! That explained it well!