Web Frameworks: Pros And Cons

Get Started. It's Free
or sign up with your email address
Web Frameworks: Pros And Cons by Mind Map: Web Frameworks: Pros And Cons

1. The best of both worlds

1.1. Wrap-up

1.2. Why not build your own custom framework?

1.3. Most frameworks are open source, so take some time and examine the code that they use. What specific parts do you like? Take inspiration and select parts from frameworks that you like. Say you like the way Bootstrap names their styles. If so, use that naming convention in your framework. Take inspiration from the buttons, or the forms, or anything else for that matter, and roll it into your own framework.

1.4. In the end, you'll have a site that you built and understand. It'll likely be much smaller, faster and built with a purpose. You'll also be able to take pride in the custom work you're done.

2. pros:

2.1. Quick and easy

2.1.1. Frameworks shine the brightest when your main concern is getting a site online and functional. Say you've got a great idea for a new web app, but you're a backend developer who needs something on the front end to work with. Or alternately, say you've got the specs for a site, but the design hasn't made it to you just yet. In both of these cases, in less than a two days of work, you can have the front end up and running while you concentrate on making the back end work.

2.2. Tested

2.2.1. Another great advantage to using a framework is well-tested code. A team of developers has worked on a framework long before you got to it, and put in the time to make sure that the code is tested and works without question. Even on browsers older than IE8 in some cases. This is a HUGE advantage to anyone who wants to make sure their site runs smoothly on most browsers.

2.3. Easy decisions

2.3.1. Building a website is about making thousands of tiny decisions that add up to your finished product. What's the base font size? What's the best way to make this navigation horizontal? What happens when the site is viewed on a smartphone or a tablet?

2.3.2. With a framework, all of these tiny decisions have been made by people that came before you. There's no need to think about the best way to clear a float, just add a style like ".clearfix" and you're done.

2.4. Efficiency

2.4.1. Tasks that usually would take you hours and hundreds of lines of code to write, can now be done in minutes with pre-built functions. Development becomes a lot easier, so if it’s easier it’s faster, and consequently efficient.

2.5. Security

2.5.1. A widely used framework has big security implementations. The big advantage is the community behind it, where users become long-term testers. If you find a vulnerability or a security hole, you can go to the framework’s website and let the team know so they can fix it.

2.6. Cost

2.6.1. Most popular frameworks are free, and since it also helps the developer to code faster, the cost for the final client will be smaller.

2.7. Support

2.7.1. As any other distributed tool, a framework usually comes with documentation, a support team, or big community forums where you can obtain quick answers.

3. cons

3.1. Customization

3.1.1. At some point during the build process, you're going to want to customize something about your site. Frameworks certainly allow you to do this: just create a customizations.css file, call it after the framework CSS file in the <head> tag, and begin overriding. As anyone who has ever done this before knows, these little customizations can add up very quickly. It's not uncommon to take a step back after a few hours and realize that you're overriding a lot of default styles. This leads to code bloat and flies directly in the face of the old DRY acronym mantra: Don't Repeat Yourself.

3.2. Know your code

3.2.1. A framework is not your code. With that knowledge comes the fact that you may not understand why things are working (or not working) as they are. Granted, not everyone that puts up a website needs to know exactly how it's working, but any developer with a sense of curiosity will want to dive deeper to try and figure things out. If you’re a web developer who builds custom sites for clients, a framework is not the way to go. You’re going to need to know your code and when you go with a framework, you’re leaving a lot of decisions to somebody else.

3.3. Updating

3.3.1. When it comes to updating a framework, you could be left in a lose-lose situation. If you don’t update to the latest version, you could fall out of step with current web standards, or if you update it, you run the risk of breaking things.

3.3.2. When you're using someone else's code, you leave it up to their discretion as to what standards and methods to use for the next release. Web best practices change constantly, and it's your job as a developer to stay up-to-date. You could opt to ignore future framework updates altogether and stick with what you've got, but then you run the risk of falling behind future web methods and standards.

3.3.3. For example, changes made to Bootstrap 3 included dropping support for IE7, and going mobile first (using min-width vs using max-width on media queries). These are HUGE changes that could break a site updated from 2.x. No one knows what’s next. But more importantly, you have no control over it.

3.4. Collaboration

3.4.1. When you’re building with a framework, you’re either making a decision to stay with the default theme (which is usually boring), or to customize it by extending the classes. If you’re in a team environment, it may be best to keep the customizations to a minimum. Lots of customizations could create issues down the line. Not only do the next team members need to learn the defaults of the framework, but they also need to learn the ways that you extended them. A style guide can go a long way in preventing confusion, but in a team environment it’s best to avoid a framework altogether, in order to avoid these kind of future pitfalls.

3.5. You learn the framework, not the language

3.5.1. I believe this to be the major problem. If you’re using a framework and you know very little about the language behind it, you will learn the framework and not the language itself. The way you code jQuery is different from the way you code javascript. Simple put, if you know jQuery, it doesn’t mean you know javascript.

3.6. Limitation

3.6.1. The framework’s core behaviour can’t be modified, meaning that when you use a framework, you are forced to respect its limits and work the way it is required. Make sure you choose a framework that suits your needs.

3.7. Code is public

3.7.1. Since the framework is available to everyone, it is also available to people with bad intentions. It can be studied in order to know how things work and to find flaws that can be used against you.