https://github.com/dimitarchristoff/cp
currency pair demo via epik
https://github.com/dimitarchristoff/cp
Last synced: 8 months ago
JSON representation
currency pair demo via epik
- Host: GitHub
- URL: https://github.com/dimitarchristoff/cp
- Owner: DimitarChristoff
- Created: 2014-02-10T15:34:54.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-11-18T18:32:25.000Z (over 10 years ago)
- Last Synced: 2025-03-23T03:32:40.912Z (about 1 year ago)
- Language: JavaScript
- Size: 46.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
cp
==
A tiny currency pair demo via [epik](http://dimitarchristoff.github.io/epik), a micro MVC framework for the web.
## Installing
Clone the repo, cd into it, then:
```sh
$ npm install
$ bower install
$ grunt
```
This will add all dependencies and start the express server on [http://localhost:8000/](http://localhost:8000/). It will
also compile the `pairs.less` file for you and try to open a web browser.
## Rationale
The aim is to demonstrate how code can be shared between epik components on the client and on the server, as well as
being able to create a fast, responsive app with multiple DOM updates per second and bi-directional data bindings.
You can tweak the server tick rates, by default a currency ticks at random every 100 to 1000ms. The app should remain
with minimal CPU usage even with 50 or 100 currency pairs.
## Implementation
There are only two view controllers - one for all the pairs (adding and instantiating) and one view per pair. However,
you can easily have a single VC for all currencies of the same type and implement it via markup, letting `rivets.js`
bindings take care of things.
Notable dependencies are:
- requirejs - module loading
- [epik](http://dimitarchristoff.github.io/epik) - MVC framework
- [primish](http://dimitarchristoff.github.io/primish) - Class inheritance
- [rivets.js](http://www.rivetsjs.com/) - DOM bindings
- [big.js](https://github.com/MikeMcl/big.js/) - Working with floats
Internally, `lodash` and `jquery` are also available through epik.
It is in no way supposed to be representative of how an actual FX pair is supposed to work.