-
Notifications
You must be signed in to change notification settings - Fork 4
/
README-DEV
34 lines (21 loc) · 1.5 KB
/
README-DEV
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
A few comments for developers on this project. In order to keep things consistent and clean and avoid the mess that so
many other frameworks have become, here are the rules:
* Alphabetize all methods inside classes. This will help other people find them quickly when browser via the web
or anywhere else without search capabilities (this is rare I know, but it helps).
* If there is another function that is similar to yours, duplicate the method signature as closely as you possibly
can.
* Use good names that have meaning.
* Document everything (except tests - unless you want to).
* Don't define all the variables for a function at the top of the function. This should NOT be a performance concern
at this point.
* Don't inline variables (var foo, bar, baz)
* Follow get, set, is, has method naming when appropriate
* Avoid relying on events. Pretend your classes are outside of the browser first and then add the necessary event
listeners at the end to make it work in the browser
Testing --
You can run all of the tests using the IntelliJ embedded HTTP server. Just open the test.html file and then click the
Safari, Chrome and Firefox icons inside IntelliJ.
If you want to do mobile testing, install the Node http-server module and use that to create an externally accessible
web server that your phone can connect to. Follow these instructions to install and run the server for testing.
1) Run `npm install http-server -g`
2) Run `http-server src` from the project directory