Hi all!
Here's a rough draft of what I've been working on:
http://mojo.bueza.com/
(placeholder address until the API becomes more stable)
Source code:
https://github.com/jbueza/blastmojo
Key focus of this version of Blast Mojo:
1) Performance: weighs in at ~4kb with gzap (for web, mobile,
phonegap, titanium, tablets, and possibly nodejs)
2) Structure: controllers, aop, service locator
3) Simplicity:
-- How to write a controller:
https://github.com/jbueza/blastmojo/blob/master/example/js/ExampleApp/LoginController.js
-- How to write a SiteMap (bindings):
https://github.com/jbueza/blastmojo/blob/master/example/js/app.js
4) Flexibility: Automagically inject plugins by specification
-- app.configure('plugins', ['jcarousel', 'jqmodal', 'bbq', 'pubsub'])
Key differences between v1 and now:
- Extensive rewrite of core, most of the old API was replaced by
community plugins (pubsub, history, templating)
- No standard library, replaced by jQuery plugins (Carousel,
Validation, Lightbox, Twitter Clients, Omniture, etc)
- Service API has been changed to be more in line with NodeJS/CouchDB/
MongoDB callbacks: function(err, sucessResponse)
- Usage of "Application", "Service", "Controller" -- The reason for
this is because these components were specifically written to be in
line with the CommonJS Specification (
http://www.commonjs.org/)
Please do not migrate current projects yet to this version yet as I am
still looking for feedback. Older projects using Dojo (or Joose),
unfortunately, the core code base has been rewritten completely to be
native instead of being dependent on any class systems (Dojo, Joose)
to prepare for future platforms (mobile web, phonegap, titanium,
tablet, NodeJS). "Write once, run them in different universes"
approach.
The design of the API was heavily inspired by Sinatra (http://
www.sinatrarb.com/), SammyJS(
http://sammyjs.org/), and ExpressJS
(
http://expressjs.com/).
I'd like to hear some feedback from the community in regards to the
API design. I am also welcoming Pull Requests:
https://github.com/jbueza/blastmojo
;)
Regards,
Jaime