Speed up your cross-platform app development - MCV

Speed up your cross-platform app development

Intel Developer Blog: Softtalkblog reports on Intel's free App Framework, as used by PayPal and Badoo
Publish date:
37_intel developer blog.jpg

As websites have morphed into online games and social networks, Javascript has transformed from being used for spot effects to powering the whole experience. There are many things to love about Javascript: it’s easy to code and test, and it runs on pretty much any modern platform.

There are a couple of important shortcomings, though: firstly, for a high level scripting language, it’s fairly limited: there aren’t built-in functions to take care of things like showing and hiding a box, or scrolling open a menu, things that people routinely want to do in web applications.

Instead, you have to bolt together a function for that from more primitive instructions. Secondly, the supported features vary across different browser versions and makes. This is less of a problem than it used to be, but in a world where many people still use ancient browsers, it still matters if you want to reach everyone. Apps distributed through app stores can use a wrapper so they run inside your choice of browser engine, but web apps can still be problematic.

Javascript libraries solve both these problems and accelerate cross platform development, by providing functions you can reuse for common app functions (such as scrolling, for example). The libraries themselves are tested to work across browsers. While that doesn’t excuse you from testing yourself, it does free you up from having to wrestle with debugging across multiple platforms. One such library is the Intel App Framework, formerly known as jqMobi.

The Intel App Framework was built especially for mobile devices – including Android, iOS and Blackberry devices – and has been independently found to be faster than jQuery and Zepto.

Testing by the MoSync development team, reported on its Codefessions blog, ran benchmark tests for creating, modifying and deleting DOM elements (which are typically page content elements) on various Android, iOS and Windows Phone devices.

The results show that the Intel App Framework (still called jqMobi then) loads slightly faster than the other libraries, but significantly outperforms them on manipulating content. If your app requires a lot of screen updates, and especially if these are required at speed in the context of a game, the Intel App Framework might be your optimal choice of framework.

There are three parts to the framework: as well as the jqMobi base engine, jqUI is the first cross platform HTML5 user interface and user experience library that works the same on Android, iOS and Blackberry devices. It can support elements such as fixed headers and footers, scrolling content areas, and vector icons.

The final part to the framework are the jqPlugins, which provides additional functions, such as a scroller and CSS3 animator. If you’re familiar with jQuery plugins, you should find your code is easy to port over, in most cases by just replacing “jQuery” with “jq”. You can find a quick start example of how jqMobi works here, including example code that shows how it binds to CSS selectors.

If you’re making HTML5 apps for cross platform compatibility, and you want optimal speed, this framework can help you to squeeze additional performance out of mobile devices, perhaps making some apps viable for the first time, and greatly improving the user experience on others. Get started with the Intel App Framework here.

• This blog post is written by Softtalkblog, and is sponsored by the Intel Developer Zone, which helps you to develop, market and sell software and apps for prominent platforms and emerging technologies powered by Intel Architecture.