PureMVC for Javascript

PureMVC Conceptual Diagram by Cliff Hall

I often use PureMVC in my projects. One of its best features is it can be used in all OOP languages. It only needs a specific port for each language. As it lacked a port in Javascript, I found that it would be a good idea to do it myself for the benefice of the PureMVC community. I've so made the PureMVC and EmployeeAdmin demo port to Javascript in November last year.

You can read the original post PureMVC Framework for JavaScript Available from Cliff Hall the author of PureMVC himself on the PureMVC blog.

All source code, libraries and documentation are available on the homepage of the port of the PureMVC website. You can even play with a live demo.

As I have never taken the time to post the news on my own blog to highlight it, you'll have some details here.

The port (currently still beta) uses a small (4KB) Javascript library I wrote to support pseudos-classes and pseudo-interfaces. It also helps to work with Javascript classes in separate files and distribute files by package in different folders. The library is called Objs on GoogleCode. It is accompanied by ObjsComp, a Java tool I wrote to create a single JavaScript file with all the Javascript files of a project needed when deploying the project in production environment.

Objs does not require a specific Javascript code format. It uses the standard JavaScript prototype object for inheritance. The port, the demo EmployeeAdmin and any projects created with, could be easily transformed to projects that use libraries like Prototype, ExtJS, Mootools, Dojo, JQuery etc ...

Malte who is working on the Joose project has even created a gateway to allow PureMVC Javascript to work with Joose.

If you want any help specific on Objs, ObjsComp, PureMVC Javascript Standard port, you can ask here in comments, ask for improvements, log issues on Objs GoogleCode project, or even on the PureMVC Javascript Standard port forum, no problem.

To be honest I would need more time or some help to work on this project. Example given, I have never found the time to unit test the Javascript port itself. When I start to create the project there were few tools for JavaScript unit tests. None convince me or were compatible with prototyping, but I've seen a lot recently, one of those would probably be the one.

In the same way, a good thing might be to use the foundations of this port to convert it to one of the most popular frameworks like Prototype, ExtJS. Maybe is there an intelligent solution to continue to edit classes in separate files and merge into one, even with these libraries there. I could help on ObjsComp and even on PureMVC port to one of those libraries if anyone want to help on this work.

Leave a Reply

Your email address will not be published. Required fields are marked *


* Please Add the Values