Why Bootstrap?

Since I’ve started writing my latest book, Sams Teach Yourself Bootstrap in 24 Hours, I’ve been asked a bunch of times “why Bootstrap?”

Bootstrap Makes Development a Lot Easier

Bootstrap is a framework that you can use to help speed up your page development time. A lot of the decisions that every web designer has to make for every website have already been made for you and the resulting calculations and programming decisions have been taken care of. Plus Bootstrap includes a lot of pre-made components that are easy to add into your website.

For example, I added a rotating carousel to a photo gallery site. When I was doing it myself, it took me several days of design and coding work to get a rudimentary carousel up. When I switched the site to Bootstrap, I was able to put up a much fancier carousel in about 10 minutes. I spent more time deciding what pictures to include and what the captions should say than I did building the HTML and JavaScript.

Responsive Grid

One of the coolest things about Bootstrap is the responsive grid system. It has four device sizes it supports and this lets you get fairly specific in how you want your pages to display in large, medium, small, and extra small screens.

With the Bootstrap grid you get up to 12 columns and you can divide your pages into any combination of columns and widths. What’s particularly nice is that you don’t have to do any math yourself. Bootstrap has the column and gutter space defined for each grid width and all you have to do is set a class (or several) on your elements.

Bootstrap is Not All Perfection

While I do like using Bootstrap, and I think it’s a great way to get a good looking site up quickly, there are some things I don’t like about it.

  • The default color scheme and other styles means many Bootstrap sites look identical.
  •  There are no fallbacks included if JavaScript is disabled.
  • Presentation and interaction are not separated from the content because many plugins and components are added using data attributes and style classes.

The first two issues can be fixed by taking more time to work on Bootstrap sites. It’s possible to adjust your Bootstrap defaults to colors and styles that fit your own aesthetic. And you can always add additional styles to overwrite the Bootstrap look and feel.

While Bootstrap doesn’t include JavaScript fallbacks by default, good designers provide their own. And even if you don’t want to do that, the fact is that very few users have JavaScript disabled, so it’s not going to impact most websites.

The last one is the one that bothers me the most. It is considered best practice to separate HTML (content layer) from the CSS (presentation layer) from the JavaScript (interaction layer). But Bootstrap relies on multiple CSS classes on nearly every element to define both what it is and how it should look. And there are a lot of classes in Bootstrap, many of which seem to do nothing or are redundant. This makes maintaining, reusing and scaling a Bootstrap site more challenging than it might need to be.

This last issue is the reason I don’t use Bootstrap for every site I manage. I use it when the ease of getting a good looking site up quickly is more important than whether it can be maintained by 10 different people, three of whom haven’t started working with me yet.

I Use Bootstrap Where it Makes Sense

And when it doesn’t make sense, I use something else, or nothing.

For instance, you might notice that this website does not use Bootstrap. And it is unlikely that I will be changing that any time soon. But I still like Bootstrap. And after you see my book you will too!

Leave a Reply

Your email address will not be published.