Wibbly Stuff

Why I like frameworks, and why I don't

Web development frameworks are all the rage now a days. Bootstrap, Foundation, Skeleton, and hundreds more, and I don't think if I've even discovered half of them. So, what are they? Why they are so much popular?

What are frameworks?

Frameworks are a collection of components you can use to build a website. You don't have to write all code from scratch. You can just take already existing code and reuse it. For example, Bootstrap contains a massive amount of reusable components like button styles, info boxes, grid system etc., making it the first choice for rapid web development.

Frameworks primarily include,
  1. A CSS reset
  2. A grid system
  3. Widget styles

Some of the most popular frameworks are,

Why do I like them

Frameworks reduce the work load on the web developer, so that he can focus on more cool stuff. But there is more.

Widely tested

Most high quality frameworks like Bootstrap and Foundation have been are used by millions of people and are heavily tested on different browsers. So you can be sure that the page you build will look and behave the same everywhere. It is most likely that the issues you would have come across have already been addressed. So you won't need to fix those pesky bugs different browsers might have.

Of course, if you are using a less popular framework, then you might not have this advantage.

Responsive grids

Responsiveness is a major concern now-a-days, and all popular frameworks have been built to address that. The grid systems included have been carefully designed for responsiveness.

Less writing

Frameworks are easy to use. Instead of writing styles yourself, you can just use some CSS classes, and you are done. They can greatly speed up development of large pages. Frameworks enable people having less knowledge on CSS to make beautiful websites, and can save money which could be spent for better stuff.

For example, if you are building a admin panel for your website, you better spend more time for functionality rather than the looks and layout.

Why I don't like them

Frameworks are awesome and all. They make it extremely easy to make complex layouts without having to learn lots of stuff. That's why I don't like them.

Less learning

Developers get lazy. They don't need to learn much, so they don't bother to learn. This is not the case for everyone, and everyone isn't even supposed to do that. But knowing the basics is important, even if you don't need to use them right now. CSS is an easy language, but its extremely tricky to use. There are lots of confusing concepts. No one can claim that he knows everything about CSS. You learn new things everyday. Using frameworks doesn't encourage you to learn more, usually.

Work in their way

The people who made the frameworks are intelligent people, and their coding style is certainly great. But we need to work in their way, even if we don't like some of them. If you code in one framework, it'll be difficult to switch, as different people do the same thing differently. Take a grid framework. There are several approaches for making grids. No one is perfect, no one is wrong. They are just different.

Also, it's not always true that they know everything. Recently, I've seen popular frameworks like Skeleton using -webkit-font-smoothing: antialiased; with a comment /* Fix for webkit rendering */. But it's not a bug that webkit uses sub-pixel smoothing. While antialiased text can make text look better at some places, like dark backgrounds, sub-pixel smoothing is crisper and better for readability. So, in essence, if there are bugs or mistakes in a framework, the page you built also has the same bug, even if you don't know.

Extra bloat

Frameworks include lots of components. Usually we only need a small part of it. But still we have the extra code sitting there, taking up space. Some frameworks like Foundation allow to choose only the components you want, but still some bloat is there.

Conclusion

Frameworks aren't evil, and they shine what they are supposed to do, make a developer's work easier. But they certainly have few disadvantages.

So? What do I do? Write all code from scratch each time? Nope. Certainly not.

I don't use any third party frameworks. But I have my own collection of less files which I use in every project. They are like a small framework, including a custom CSS reset, custom grid system, some CSS3 animations and filters, and very few widget styles. Much less bloat than classic frameworks, but still they make my work easier. I coded those myself, choosing what things I need, improving them over time. I know how they work, so I can fix bugs easily.

Then? I will say, use frameworks if you are on a tight schedule, but prefer coding manually so that you can improve your skills. Also, it's not a bad idea to have your own mini-framework to use in every project, so that you can get advantages of a framework, while avoiding it's disadvantages.

So, what do you prefer? Be sure to share your opinion.