Introducing stackJS, or how to take your code one step further
stackJS is loosely based on Nicholas Zakas proposed architecture. Here the features stackJS attempt to fill :
- Move DOM focused code to functionality focused code
- Better Code organization
- Handles plugin dependencies globally and per module separately
- Stop module accessing other modules (loose couple them (pub/sub yay!))
- Library agnostic
What it look like on paper
The dependencies are handled by requireJS in stackJS, this make for a nice opportunity. With the framework is bundled the optimization tool of requireJS. Which make it pretty easy to optimize all your js files in a production folder and only change a variable in stackJS configuration to access the optimized version on your live server.
This is still in beta, but I am currently integrating it in a production project and hope to release a 1.0 version in 1 month or 2.
I am currently for working on a symfony helper for loading modules, I will bundle it with the project once it’s finished.