Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azproduction/scalable-js-app
Scaleable JavaScript Application Architecture Example
https://github.com/azproduction/scalable-js-app
Last synced: 22 days ago
JSON representation
Scaleable JavaScript Application Architecture Example
- Host: GitHub
- URL: https://github.com/azproduction/scalable-js-app
- Owner: azproduction
- Created: 2011-07-03T16:50:08.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-09T08:55:06.000Z (almost 12 years ago)
- Last Synced: 2024-04-15T12:20:59.570Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 225 KB
- Stars: 49
- Watchers: 9
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Scalable JavaScript Application Example
=======================================This application architecture is base on this:
1. Andrew Dupont (Gowalla, Prototype.js, S2) **Maintainable JavaScript** http://channel9.msdn.com/Events/MIX/MIX11/EXT23
2. Nicholas Zakas (Yahoo!, YUI, YUI Test) **Writing Maintainable JavaScript** http://www.yuiblog.com/blog/2007/05/25/video-zakas/ Slides: http://www.slideshare.net/nzakas/maintainable-javascript-2011 http://www.slideshare.net/nzakas/maintainable-javascript-1071179
3. **Scalable JavaScript Application Architecture** http://developer.yahoo.com/yui/theater/video.php?v=zakas-architectureThe architecture of this application is described at Yandex.Subbotnik in Yekaterinburg
Video(ru): http://video.yandex.ru/users/ya-events/view/291/#hq
Slides(ru): http://www.slideshare.net/azproduction/making-scalable-javascript-application
Depends
-------- LMD v1.3.0+ (https://github.com/azproduction/lmd) `npm install lmd -g` - required for build
- jQuery or Zepto.js - required for core modules (see index.html)Build and run the example
-------------------------1. `cd build && make`
2. open `index.html`**Build makes only js files**
Running tests
-------------1. `cd test && make`
2. open `test/index.html`Changelog
---------**v2.0**
- **Modules as all application architecture are greatly simplified**
- This app is now depend on LMD so all modules are synchronous
- Added build system based on LMD (https://github.com/azproduction/lmd)
- Core is finally splitted on 4 logical parts: Core, EventManager, Sandbox and Template engine
- ModuleManager, loader and $script.js are wiped
- Part of ModuleManager logic is moved to Core
- All modules are loaded on startup (using lmd) so we no longer need a heavy loaders and $script.js
- All application modules (not lib modules) are totally sandboxed (cant require at all)
- Simple acl wildcards support `listen:*` and `*` but not `listen:ololo:*`**v2.1** (not compatable with v2.0)
- SJSA no longer depend on jQuery nor Zepto
- Sandbox#bind and Sandbox#trigger now accepts multiply event names
- Sandbox#getBox now returns HTMLElement instead of jQuery/Zepto instance
- Core.getBox uses getElementById instead of jQuery/Zepto selector
- Sandbox#getTemplate now accept elementId instead of selector (all templates should be marked with id)
- app descriptor can content list of safe modules (can require other modules) see `app/modules/Logger.js` for example
- EventManager totally refactored see `test/units/EventManagerTest.js` for detailsLicence
-------(The MIT License)
Copyright (c) 2011 Mikhail Davydov
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.