lonelyplanet/ui-test — pull request #21 by derekblank (2013-11-27 03:10:36+00:00)
Title: derekblank/ui-test

My refactor focused on performance and scalability. A partial list of changes can be found below, but major additions include providing a solid foundation for this small Sinatra page to turn into a full-fledged Web application, in the form of improvements to code readability and file organization.

My personal coding style emphasizes organization, predictability, and comprehension, with a heavy dose of empathy toward other developers who may work on the codebase in the future. Code philosophies present include semantic HTML, object-oriented CSS, and Coffeescript's Class driven architecture. The decisions I made were driven by the notion of making future scalable development of this Web application much easier. For instance, some of the stylesheets may seem empty at the moment, or JavaScript objects may seem sparse, but I felt it was important to set precedents so that others may follow. Thanks for taking a look.

Derek Blank
derekpblank@gmail.com

**HTML/Haml**
- Added HTML5 doctype and meta tags
- Updated tags to be more semantic
- Moved scripts to bottom of layout and added offline jQuery fallback

**CSS/Sass**
- Modularized stylesheets for organization
- Alphabetized css selectors
- Added normalize.css
- Set base values and variables for consistency
- Converted all pixel values to use ems
- Implement breakpoints for responsive layout

**JS/Coffeescript**
- Removed non-semantic use of 'Read More' anchor tag, replaced with button
- Refactored to take advantage of Coffeescript's Class feature (and JavaScript's prototype)
- Reduced burden on global namespace by creating Tools object
- Improved readability and event access for testing