Skip to content

Commit

Permalink
add implementation approach to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
giamir committed Mar 21, 2016
1 parent 50b4a2f commit 16ad524
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,41 @@ Make a single web page to visualise the data in any format (graphs, tables etc.)

## How I approached this task

Not available yet
The application has been built with AngularJS, Bootstrap and Chart.js to implement the graphs. I have made use of NodeJS and ExpressJS just to serve the application.

I decided to use a frontend framework as AngularJS to complete the task cause I believe helps a lot to respect [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)) principles and keep the code clean.

I generally follow a test driven methodology to implement application features. I would write a failing feature test in protractor, then a new failing unit test. While I had a failing unit test I would write code to fix that and then once the feature test passed again from failing and passing multiple unit tests I would move on to the next feature.<br>
It was the first time I made use of the ChartJS library and I decided to start the project playing with it and then come back to test every features implemented and refactor my code.

### Scaffold

```
public
├── css
│   └── global.css
├── data
│   └── player.json
├── js
│   ├── app.js
│   ├── controllers
│   │   ├── globalStatsController.js
│   │   └── singleMatchStatsController.js
│   └── factories
│   ├── elaborateDataFactory.js
│   ├── refineDataFactory.js
│   └── resourceFactory.js
├── libs
│ └── [all the app dependencies]
└── views
├── index.html
└── partials
├── global-stats.html
└── match-stats.html
```

To have a better understanding on how the factories and the controllers works I recommend to check the related [tests](https://github.com/giamir/player_stats/tree/master/test/unit).


## Installation Instructions

Expand Down

0 comments on commit 16ad524

Please sign in to comment.