Open hjzheng opened 9 years ago
Some ground rules:
- Self-contained module
- everything to do with my module is in my module
- no global variables
- if a module manages more than one thing it should be split up
- separation of concerns
- DRY code: Don't Repeat Yourself
- efficient DOM usage
- very few $(selection)
- no memory leaks
- all events can be unbound
- Converting jQuery to an Object Literal Module
- Revealing Module Pattern Javascript Tutorial
- PubSub Javascript Design Pattern
- PubSub Implementation
几个原生DOM方法 || Localizing Times in JavaScript
Things you can do with native DOM
Localizing Times in JavaScript