My last post was about rewriting pureMVC port with syntax suggested in mootools. The reasons behind this were not mentioned, so now i will post more information on this topic. One of my projects requires me to develop a multi-platform mobile application to work on all iOS devices plus android phones. Now since i cant code in objective C and Java is also not really appealing to me, the obvious choice was to use flash on all of the systems, as packager is available for iPhone/iPad and android already runs flash and AIR. Woohooo i thought to myself, peace of cake. However after a week of testing on iPod touch i figured that even with heavy optimization of the code and UI elements, the end product is just not good enough. So after scraping flash idea, Googling around found Titanium SDK by Appcelerator. Unbelievable tool when developing hand held device applications. Support all of the current devices, development language is JavaScript and the best part is, that all of the compiled applications are actually native apps.

Being a pureMVC fan-boy i immediately started experimenting with android emulators. Getting basic app to run was pretty easy and my emulator was loading twitter trends in no time. However, a big problem came around when i tried to compile the same application for iPhone, it was just not happening, after launching the emulator, right after loading screen, an error in ApplicationFacade.js, ‘The method “parent” cannot be called.’ and in facade constructor it is vital to call this.parent(); My first guess was that i missed some mootols components when building a file for myself (pureMVC JS port is mootools based). Ive tried to get it running for 2 hours, but that was not the problem. Second guess was, that the problem came from how the port was written, and that’s where my last blog post comes in. However, that was not the case either. Failed attempts to run the app have brought me to google yet again. And it turns out, there are some deprecated methods in webkit that handle $caller. Solution for the problem is not to use the latest mootools library which is 1.3.x but rather use 1.2.5 which you can find here. To run pureMVC you will need these components: Core, Array, Function, Number, String, Hash, Class, Class.Extras.

As for my port of pureMVC, you can stick with the official one or use mine. One is a bit faster the other one is in compliance with mootools Class syntax, your choice. Thanx for reading


5 Comments

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.