PDA

View Full Version : PureMVC Adds Support for ExtJS



puremvc
11 Jan 2011, 5:43 PM
Hi Everyone!

I'm excited to announce release of the PureMVC Standard JavaScript Port for ExtJS.

PureMVC is a lightweight framework for creating applications based upon the classic Model-View-Controller (http://en.wikipedia.org/wiki/Model-view-controller) design meta-pattern. This is the specific implementation for the JavaScript language. This port stems directly from an ActionScript 3 Reference implementation that has been mature (no bugs reported) for several years. If you are a serious ExtJS developer looking to make your code more maintainable and portable, you should definitely look into PureMVC.

Read the announcement here:
http://puremvc.org/content/view/164/1/

Visit the project site here:
http://trac.puremvc.org/PureMVC_JS

Point your SVN Client at:
http://svn.puremvc.org/PureMVC_JS/tags/extjs/2.0/

Or simply download the .zip archive here:
http://trac.puremvc.org/PureMVC_JS/wiki/Downloads

Also check out the demo here:
http://trac.puremvc.org/Demo_JS_BoxSplash

Cheers,
-=Cliff>

dolittle
12 Jan 2011, 5:58 PM
Doesn't Extjs already follow the Model-View-controller pattern?

puremvc
13 Jan 2011, 10:09 AM
ExtJS provides a toolkit of UI components and classes to help with state and data management. That said, certainly you can separate the code you write with it into MVC tiers, but that doesn't infer that Ext is itself an MVC framework.

When you write a class, it can have any role, responsibilities and collaborations you wish. You can write one big class or a hundred to get the same job done. There are merits to both approaches. But the key is in deciding on clear roles for your classes, and using a collaboration pattern that enforces the key takeaway from MVC which is that the model-related classes in your app don't end up depending on the view-related classes, or to controller-related classes, which are often tied to view-related classes and thus by commutation tie the model to the view. If we separate our model classes from our view classes, we can reuse the model with a different view. This is increasingly important today with so many form factors from phones to tablets to tvs to desktops.

So, if it's just about 'sorting your laundry', why you could do that yourself, right? Sure, and if you don't use a framework to help you do it, it's still highly-recommended. The only problem is if others need to work on the same codebase, you really need to document well, or explain to those folks how it works. With PureMVC, there are docs, and lots of people out there who already know how it works. You achieve the separation you wanted, but you didn't have to do the work of figuring out how best to implement MVC while working in your project.

PureMVC helps you sort your code into the three tiers by implementing several other well known design patterns (proxy, mediator, command, facade, observer). It does so with the simplest possible language mechanisms so it's been easily ported to lots of other platforms and bug fixed into maturity. It's extended with utilities, but the framework code is frozen, so you won't go chasing the latest version and wondering if it's going to be a pain to implement whatever's been dreamed up this version. There's a healthy community using it and some great demos that show you how to implement it in different languages.

-=Cliff>

jay@moduscreate.com
18 Jan 2011, 12:43 PM
Should be interesting when Ext JS 4.0 comes out.