A13: An Introduction to Twitter Bootstrap
This week, we were introduced to Twitter Bootstrap; a collection a tools used to create websites with a “mobile first” approach. With Twitter Bootstrap, web designers build a single page that adjusts its format based on the size of the users display.
I prepared for this weeks WODs by watching the assigned screencasts, fiddling the examples on Github and reading the Twitter Bootstrap documentation. All WODS, as well as Dr. Johnson’s lectures on Bootstrap, can be found at the ICS SE course website here.
WOD 1: BootstrapBrowserHistory
Goal: Recreate last week’s 3 column, browser history WOD using Twitter Bootstrap to implement a responsive layout.
While reading the requirements of this WOD, I immediately recognized that the 3 column format of the browser history page was similar to the format of the “Theses are Us” example provided by Dr. Johnson. So to begin, I imported the “Theses are Us” project into Eclipse and used it as a starting point for this exercise. Although most of the code was already written, I spent a lot of time exploring how changes to the index .html and CSS files affected the format of the page and ended up completing this WOD in SD time of 20:21. I learned a lot about using Bootstrap during my first attempt and decided to immediately try it again, this time completing it in Rx time of 13:25.
WOD 2: Responsive Kamanu
Goal: Recreate a portion of the Kamanu website implementing a responsive layout using Twitter Bootstrap.
After having completed the first WOD in Rx time, I felt confident going into this WOD considering the page we were recreating consisted of 3 sections; A nav bar at the top, an image occupying the entire body of the page and a simple footer. However, after toiling away for half an hour and still not having completed any of the sections, I no longer felt quite so confident. I struggled most with positioning the brand logo in the upper left hand corner of the nav bar; there was a padding around the image that I just couldn’t remove! Eventually, I gave up on the nav bar and decided to work on the rest of the page. After a total of 59 minutes and 21 seconds, I had a page that looked similar to the original, with the exception of the stubborn logo, and a DNF on the assignment. After watching the solution posted by Dr. Johnson, I attempted this WOD a second time and completed it in Rx time of 20 minutes and 24 seconds.
WOD 3: Responsive Castle High School
Goal: Recreate Castle High School’s webpage using Twitter Bootstrap. Hide the middle section of the page when resizing to a small screen.
Although my first attempts at WODs 1 and 2 weren’t great, I felt that I had learned a lot about Twitter Bootstrap by completing and repeating them and again felt confident going into this exercise. Overall, I found it was pretty easy to recreate the Castle High School webpage in a responsive layout and finished in Av time of 38 minutes and 17 seconds. The only requirement of this WOD that I hadn’t done before was hiding the middle section when the screen was resized to smaller dimensions, however, the information was easy to find as we bookmarked the related section of the Bootstrap documentation in a previous WOD. I redid this WOD a few hours later and improved my time by approximately 10 minutes, barely making Rx time in 29 minutes and 10 seconds.
My experience in working with HTML and CSS is very limited. In fact, I’ve done more with HTML and CSS in the last 2 weeks than ever before. In my limited experience, it seems as though programming in HTML is somewhat imprecise and involves quite a bit of trial and error. Luckily, Google Chrome Developer Tools makes it easy to inspect elements of a page to determine exactly what properties are inherited, overridden and applied. This makes debugging so much easier! And while I’m confident that as I become more familiar with the language, I will rely less on trial and error, but until that time I’ll be relying heavily on Chrome’s Developer Tools.