What is SmartJs?It is a project I have developed over the past few months to learn how to apply design patterns in JavaScript. It is a place to demonstrate their usage in a full Enterprise JavaScript solution that serves as a model for other projects.
I will be posting a Blog entry for each of these, and more, in the weeks ahead. More information is posted on the project's github site: https://github.com/hughanderson4/smartjs What are the features of the demo app? |
- Realtime chatrooms
- Dynamic memberlist
- Persistent topics
- Realtime feedback on chat room member list
- Event based: Client to Server, Server to Client, Client to Client, Client to Group, Server to Group
- Segregate network traffic into subscriber groups
- Virtual event pub/sub
- Queueing network events in case of latency/unavailability of server
- Persistent local device member
- Implement 100% height jQuery mobile view as Amd module
- Implement Js "Schema" module to prevent fragmentation of data model
- Implement naming conventions to reliably identify dependencies
- Client can connect to a different Server technology with 1 file change
- Narrow Client/Server interface consisting of only 2 extensible functions, implements OCP
- Knockout binding helper to keep jQueryMobile listview refreshed, separates View concerns from ViewModel
- Facade pattern for improved Pubsub traffic logging
- Facade pattern for intuitive localStorage interface
- Facade pattern for logging to console if config.isTest
- Enterprise ready starter project, easy to customize or build upon
- Free license, anybody can use and contribute
What Open Source Libraries are used?
SmartJs aims to skillfully assemble and orchestrate several off the shelf pieces of open source JavaScript technologies:
- Require Js - implements AMD for DI and IOC patterns
- Knockout Js - implements MVVM, UI Binding, Observer, and LSP
- Jquery Mobile with markup generated by Codiqa UI - implements SPA User Interface with minimal coding
- nowjs running inside Node.js - implements cloud based webserver with realtime communication capability
- mongoDB with the node-mongodb-native driver - implements JSON object based persistence, with an interface usable by the nowjs realtime webserver
- Cordova (Phonegap )- targets 95% devices
- Lodash - implement model projections
- Jasmine - implement Unit Testing
What is Included?
The SmartJs github project contains an entire end to end enterprise solution for mobile realtime communication. From the database, to the webserver, to the client, it is all implemented with asynchronous, object oriented JavaScript. A quality assurance initiative is also included, with unit tests and build scripts.
But more than that, the pieces are assembled in a logical and orderly way such as to provide a SOILD foundation to build upon. Therefore, developers who derive their mobile applications from the SmartJs framework can abstract the infrastructure machinery and focus on developing rich realtime functionality.
But more than that, the pieces are assembled in a logical and orderly way such as to provide a SOILD foundation to build upon. Therefore, developers who derive their mobile applications from the SmartJs framework can abstract the infrastructure machinery and focus on developing rich realtime functionality.
Setting up the Environment
This is where you should get started.
Running SmartJs
Got the prerequisites done? Here's how to run it and test it.
SmartJs Blog
Helpful articles on MVVM related topics, demonstrated via SmartJs.