|
If you've followed the PureMVC project from its origins in AS3, you know that the overarching portability concept has been to port to a language, not to a platform. Thus the AS3 'reference implementation' served Flash, Flex and AIR equally well. We use the simplest possible language constructs so as to avoid reliance on language specific 'magic', and we avoid third-party framework dependencies altogether.
These decisions about portability were ironically made because of JavaScript and it's uncertain future in the early days of PureMVC design. At that time, it appeared that ActionScript 3 was going to be the next version of JavaScript. Adobe had built AS3 to a 'proposed' ECMAScript standard one rev ahead of JavaScript. That move made it seem certain that JavaScript would soon have classes and inheritence and so forth. Of course, that didn't happen. The proposal wasn't ratified and JS remains classless. Not that classy things can't be done with it mind you :) Fast forward to the time that PureMVC is stable, and the 'proposed' ECMAScript standard AS3 was based on has been discarded. JavaScript still doesn't have classes. So filling that void are a growing number of frameworks for class simulation. Unfortunately but predictably, they aren't all compatible. It looks like PureMVC isn't going to be possible for JavaScript. Which sucks because so many people use it. Then, PureMVC was ported to JavaScript by Frederic Saunier, and it depended on his own, perfectly sound, but not very well known at the time framework called Objs. In order to use PureMVC with JavaScript. He has done the previously unthinkable. Ported an OOP framework to a language without classes. Bravo, Frederic. He even ported the classic PureMVC EmployeeAdmin demo, but like many of us, at that moment, he didn't have the time to support Objs with docs and push the framework into the general memespace. This hampered adoption of the framework by the greater JavaScript community. Enter Justin Wilaby, who writes a whole new port from scratch, depending on the extremely popular MooTools class simulation and UI framework. And he delivered an eye-popping demo called BoxSplash. It was a tough decision to make, but the Objs port was deprecated in favor of the MooTools port. It was a matter of attempting to serve the greatest possible audience. That didn't end it, though. Hot on the heels of Justin, Tony DeFusco contacted me and had ported Justin's MooTools port over to Sencha's ExtJS, which has been gaining popularity with HTML 5 and mobile developers. Clearly it is time for the PureMVC JavaScript port to embrace the reliance on third-party frameworks for class simulation. Consequently, the JavaScript port and its demos (EmployeeAdmin and BoxSplash) have had their repositories reorganized into branches. The port still has a single Trac site, but it has multiple branches for each supported class-simulation framework; currently ExtJS, MooTools and Objs. You can visit that site, and the downloads area contains separate zip files for each branch of the framework, and the latest release for each branch has been tagged, so you can connect directly with your SVN client. The EmployeeAdmin demo has an Objs and MooTools branches, and the BoxSplash demo has MooTools and ExtJS ports. JavaScript isn't going away, but also the world is never going to agree on one class-simulation framework for it, so PureMVC is adapting. So, we welcome the ExtJS community, and if anyone out there feels like porting PureMVC to another popular class-simulation framework bring it on. We're ready. UPDATE
Frederic Saunier has now ported PureMVC for use with the Prototype JS framework. He has also produced both Standard and MultiCore versions. For those unfamiliar with PureMVC MultiCore, it affords modular progamming by using Multitons in place of the Standard version's Singletons. Frederic has also produced a full set of unit tests, included in the download. No sooner were the Standard and MultiCore Prototype JS ports announced, (seriously the tweets were no more three hours apart) Frederic produced a MultiCore version of the Objs port which he uses frequently and intends to support. And coming soon, David Foley of Trinity College in Dublin has produced a PureMVC JavaScript 'native' port, which doesn't rely upon any class-simulation framework - in parallel with Frederic. We're just reconciling the implmenentation details of the two ports to provide the highest quality code, and normalizing the unit testing and minification tools for production. Stay Tuned! The PureMVC JavaScript Port (all branches and versions): http://trac.puremvc.org/PureMVC_JS
Cheers, -=Cliff>
|