PureMVC native JavaScript port

PureMVC native JavaScript port

Now that I have implemented a Unit Tests Suite for PureMVC JavaScript ports I couldn't resist to create a native JavaScript PureMVC port. By "native" I mean that this port doesn't use any external library but PureMVC classes themselves. The port uses "org.puremvc.js.standard" as namespace because I think this is a good thing to refer to it as the JavaScript standard port.

When I started to work with PureMVC in JavaScript in 2008 I thought this was not possible to use PureMVC alone with JavaScript to develop maintainable projects. My main fears were class name collision and class declaration order. But time passed, I worked since on JavaScript projects with near 300 classes using only a micro-architecture (my Objs library) to maintain class namespaces for reflection on rare cases. All of this worked pretty well, I thought last week to create a PureMVC port to native JavaScript only.

But this is not only a personal challenge. Now that we have an agnostic Unit Test Suite and an agnostic PureMVC port, we can easily create applications using jQuery as User Interface (I mean avoiding any UI components compatibility with others libraries). And what I really wanted to create was a PureMVC EmployeeAdmin for jQueryMobile as few applications already exists for and I need to learn how to use it. I'm already working on it and I think to be able to release it for the next week-end.

Next step will be to create a PureMVC EmployeeAdmin Demo with this standard port using jQuery UI (the standard jQuery version, so not the mobile one). My hope is that it will help in creating future Employee Admin port to other frameworks.

Continue reading PureMVC native JavaScript port

PureMVC port to Prototype JavaScript Framework

PureMVC port to Prototype JavaScript Framework

As to give an answer to Cliff Hall asking: "JavaScript Port Branches to Support ExtJS, MooTools, Objs... What's Next?" on a PureMVC blog post, I announced on Twitter last week that I had in idea to port PureMVC to Prototype.js as soon as possible.

As you may know, I made the first PureMVC port to JavaScript using a micro-architecture of mine called Objs. The goal of this project was to show that PureMVC could be used in JavaScript and to demonstrate with the PureMVC EmployeeAdmin demo that it even works great. Even if some people have been a little pessimistic in that it uses a micro-architecture instead of a well known JavaScript framework, I like to think that my goal was achieved as Justin Wilaby created a PureMVC for Mootols (for which I made the PureMVC Employee Admin demo too) and more recently Tony DeFusco the PureMVC for ExtJS.

I said it on my blog or on the PureMVC forums, I'm a partisan of having a PureMVC port for each mainframe JavaScript framework. One of the reason is that, as each JavaScript developer knows, we don't always have choice of the framework we can use on the product we are working for. This is why I decided to port PureMVC to Prototype which was the next mainstream JavaScript framework in which we need to port PureMVC.

Another thing I want to do for months was to add an agnostic JavaScript Unit Test suite to PureMVC for JavaScript. This is why I have not taken the time to make a demo for the Prototype port but preferred to add an Unit Test Suite.

I will port PureMVC Employee Admin or BoxSplash demo in a later blog post I assume that this part will be valuable for PureMVC developers only, but for the moment I prefer to describe which Unit Test framework I used and how I implemented it to test PureMVC.

Continue reading PureMVC port to Prototype JavaScript Framework

Android currency converter using PureMVC

Android currency converter using PureMVC

I'm working on an Android Froyo application in the goal of better learn Android development while developing a real Android application. It uses PureMVC for Java. I initially have planned to make it public here only when the application would have been pushed on the Android Market. But when I occasionally talk about this project here on my blog and on the PureMVC forums, some folks were really interested and ask me to give some help on how I achieved my PureMVC app development with Android. So today I decided to publish the application in its alpha stage even if it's still not ready.

The application is a currency converter that uses a webservice hosted on my website for several years that deliver currencies rate for 40 currencies with a daily update. Currencies rate are obtained from the European Central Bank. I recently have worked a on the webservice (PHP 5/ MySQL 5) to deliver currencies name in all existing languages supported by Android. I used a Java project based on the IBM International Components for Unicode project to fill the database with the I18N informations I needed.

The Android application itself uses threads, multiple activities, PreferenceActivity, SQLite local storage, Json and a call to a webservice and has unit tests associated to it. So this is what I think to be a good example to start with Android and PureMVC. I will commit its sources to the PureMVC website when it will be committed to the Android market as well.

Continue reading Android currency converter using PureMVC