coxmediagroup/uidevtest — pull request #72 by leisms (2012-10-14 07:44:09+00:00)
Title: Le Zhang - Submission with Node, Require, Backbone and CoffeeScript. BDD/TDD style development.

Hi! Off the bat I just wanted to thank everyone who contributed to this opportunity. The challenge was a pleasure to work on and complete, and I had a lot of fun running through it.

I approached this challenge from the viewpoint of a project manager, and essentially breaking everything down into four separate groups:

1. **Requirements Elicitation** - Gather "user stories" et al. and write a [requirements document](https://github.com/leisms/uidevtest/blob/master/REQUIREMENTS.md).
2. **Product Development** - Develop the product in a BDD/TDD manner using the acceptance requirements.
3. **Product Design and Styling** - Style the functionally complete product.
4. **Quality Assurance** - Test the product robustness with a variety of use cases and browsers.

The web server and testing suite requires Node.js. The current 0.8.12 stable version of Node can be found [here](http://nodejs.org).

To install production and development dependencies, run ```npm install``` in the src directory.
To start the web server, run ```coffee app.coffee``` in the src directory.
The testing suite is located in src/tests/suite.coffee. You can run it with ```npm test``` in the src directory.

I've tested and verified the web pages against latest versions of Chrome, Firefox, Internet Explorer, Safari, and Mobile Safari. The pages seem to work best on Chrome, Firefox and Safari.

Demo: [http://leisms-uidevtest.herokuapp.com/uidevtest/src/html/index.html](http://leisms-uidevtest.herokuapp.com/uidevtest/src/html/index.html)

Additional Comments:

* I was referred to this position by Kirt Kreutzer, Cypress HCM.
* My contact is le (at) rapidlabs.lc
* The pages use HTML5 pushstate through Backbone's history module. This retains browser history regardless of the single-page design.
* The pages were built with a custom Node/Require/Backbone MVC framework I'm working on and planning to release open source (I haven't gotten around to naming it yet).

```
> mocha --compilers coffee:coffee-script --reporter spec tests --slow 1000

Server listening on port 8888

Unit tests:
StoryCollection
✓ fetch()
✓ parseDate()

Acceptance tests:
User visiting /uidevtest/src/html/index.html
✓ should receive status code 200 (549ms)
✓ should see a list of news headlines
✓ should see Headline Text, Picture, Categories, Posted Date and Updated Date in news headline list items
✓ should browse to the full article when a news headline is clicked
User visiting /uidevtest/src/html/index.html?story=stoXX
✓ should receive status code 200
✓ should see a full news article
✓ should see Headline Text, Picture, Picture Caption, Picture Credit, Article Text, Author, Posted Date and Updated Date in full article view
✓ should see action bar with comment, share, favorite and vote buttons, and navigation bar

✔ 10 tests complete (683 ms)
```