PureMVC for TypeScript

PureMVC for TypeScript

As you may already know, TypeScript is a new programming language announced on October 1st,2012. It is written at Microsoft by Anders Hejlsberg (designer of C#, Delphi, Turbo Pascal) with specifications published under an Apache License. Its goal is to output JavaScript from a superset of the language which allows compile-time type checking, classes, interfaces, modules and more while still understanding vanilla JavaScript.

In the week TypeScript was announced I contacted Cliff Hall to tell him I was ready to port TypeScript to PureMVC. He immediately told me that he was ok, probably because he's a well known supporter of «languages that compile-to-JavaScript».

I first tried to develop using Visual Studio 2012 and its dedicated TypeScript module which may had helped a lot to start with TypeScript, but I'm on Windows XP at home and VS 2012 simply doesn't run on it. As a resulting consequence, I made my work using Webstorm for JavaScript and the Node version of the TypeScript compiler (let me know if I missed something specific to Visual Studio 2012).

For the rest, I was lost at least one hour or two before starting the work because of lack of any existing documentation, but using stackoverflow.com and examples from the official TypeScript website, I quickly found all I needed to start with this new language.

Port to PureMVC

For the work on the framework itself, I decided to merge PureMVC ActionScript 3 Standard Framework and my own PureMVC JavaScript for Objs Standard Framework so it has typing from AS3 and required idioms from JavaScript.

As a result of this work I produced three PureMVC TypeScript repositories:

The PureMVC EmployeeAdmin demo can of course also be tested live.

Update: Cliff Hall made the official announce for it on the PureMVC website.

Continue reading PureMVC for TypeScript

PureMVC Employee Admin demo for jQuery Mobile

PureMVC EmployeeAdmin Demo for jQuery Mobile

I started this project last year when jQuery Mobile was still in alpha stage. The first version of Employee Admin demo I made with alpha version of jQuery Mobile was interesting but not fully functional. I so have waited near a year to work on it again. Now that jQueryMobile is final and even passed version 1.0.1 few days ago it was worth it to try to finish the project completely. As recalled for my recent Employee Admin demo for jQuery (call it desktop so) that demo does not use a port of the PureMVC framework for jQuery Mobile. It is not necessary. The two are compatible but independent one from the other.

jQuery Mobile

For those who do not yet know much how jQuery Mobile works, it is loaded in addition to the jQuery framework on a mobile HTML page. The library, once loaded render the HTML page (with some minor jQuery Mobile specific additions) to make it identical to any native mobile application. The framework supports a maximum mobile platforms.

Multi-page template

All pages of a jQuery Mobile application must be hosted on a single HTML page. This is the so called jQuery Mobile multi-page template. Using address bar anchors, the framework is responsible to navigate between different pages of the application without changing the root HTML page hosting the application. For the demonstration I chose to only have two pages. One to manage the list of users, one to manage the form to enter data related to each user. In this demo, there is no dedicated page to manage user roles, it would have been ridiculous to make navigation so complex only to have a page hosting a panel when it can be made with a simple multiple select box.

Continue reading PureMVC Employee Admin demo for jQuery Mobile

PureMVC Employee Admin demo for jQuery

PureMVC EmployeeAdmin Demo for jQuery

More and more people ask me to finish the job I started in 2011 on the PureMVC Employee Admin demo for jQuery. So I recently took the time to finish it completely.

The project uses:

Before continuing note that using PureMVC Standard or PureMVC JS Native Port (Cliff spoke recently on Twitter ) instead of Objs would be really easy. It is only syntactic sugar. The libraries used, the architecture, implementation choices will be kept the same.

Also note that this project does not depend on any specific PureMVC for jQuery framework, here jQuery only provides the UI layer, PureMVC and UI layers always stands to be two distincts entities. I found this port illustrate this perfectly.

Continue reading PureMVC Employee Admin demo for jQuery