Getting Started with Intel’s App Framework and XDK

Tweet about this on TwitterShare on LinkedIn0Share on Google+0Share on Reddit0Buffer this pageFlattr the authorEmail this to someonePrint this page

Getting Started with Intel’s App Framework

First impression, “A Comprehensive Hybrid Mobile App development kit!“.

The guys at Intel have done an awesome job in packing everything we need to build a Hybrid Mobile app in most convenient workflow possible. In this post, we will take a look at the App framework, its components, theme’s and the invaluable XDK to build Hybrid mobile apps.

App Framework

App Framework is comprised of three parts

App Framework – a query selector library
UI – a UI/UX library for smartphone and tablets
Plugins – plugins built on top of App Framework

App Framework was built from the ground up to excel on mobile devices by being light and fast. It takes advantage of new browser features and supports valid W3C CSS selectors. User generated performance tests at jsperf.net have shown it to be faster than every other JavaScript* library available.

App Framework UI, also known as AFUI, is the only mobile framework that treats Android*, iOS*, Blackberry* and Win8* the same. In other words, AFUI does not degrade features or performance in order to resolve conflicts or bugs. For example, most frameworks consider Android* to be “broken” and ignore specific versions of that operating system or take shortcuts that perform poorly. App Framework solves these key issues to provide a clean and responsive HTML5 user interface.

Plugins are separate JavaScript libraries created to augment apps written using App Framework App Framework. Plugins provide useful features or functionality that may be outside the scope of basic applications. App Framework UI harnesses a few of the core plugins like af.scroller.js and af.css3animate.js.

Getting Started

First, Navigate to the Intel’s App f/w home page. We will explore a couple of things before digging into the code. Around mid-way in the page, you will see a section, where you can customize the app.

Screen Shot 2014-08-23 at 10.37.59 am

Out of box, you can get device specific styles, which is a pretty cool option. You can also customize your styles by clicking on “Style Builder”. Screen Shot 2014-08-23 at 10.39.48 amIf you go back to the top of the page, you can see the download button. Click on download and unzip the contents. If you have Python installed, you can open new terminal/prompt inside the unzipped folder and trigger Python’s http server. This will host the current folder on port 8000. Run,

Windows Mac/*nix
python -m http.server    python -m SimpleHttpServer

PS : This is the simplest way to host any folder locally!

And you can launch http://localhost:8000 to see kitchen sink app. Alternatively you can also launch the   index.html  from the unzipped folder. But this way, AJAX features would not work.

The launched page would look like

Screen Shot 2014-08-23 at 11.18.58 am

As you can see, you will find everything you need to develop an app using Intel’s app f/w. The menu bar on the left hand side and the tabs at the bottom segregate the complete app components into styles, structure and plugins.

You can play around with the features and check out how easy it is to use the f/w.

Now that we have a decent idea about the app f/w, let us build a “Hello World” app. There are 3 ways you can do it

  1. Create a new folder for your app, copy paste the related code from Kitchen sink folder and build the app, by authoring HTML/CSS and JS.
  2. Using the web based App Starter
  3. Downloading the Intel XDK “studio”.

If you are planning to use the browser interface, you can click on “App Starter” on the home page

Screen Shot 2014-08-23 at 11.28.11 amThen you can login/create a new account into the “Web” XDK. Once you are in, you can either create a new app, or upload your own app. I have dragged and dropped a few things and built the app below

Screen Shot 2014-08-23 at 12.33.58 pm

You can click on the preview icon above the layout canvas and you can see a live preview of the app. Once you are happy with the design, you can download the zip. You can find links below that shows how to use the App Starter. 

With the zip downloaded, you can use the Intel’s App Center to manage your app on the web. Once you are logged in, you can click on “Start a new app”. Then you can select “Create your own from scratch” as shown below and click next

Screen Shot 2014-08-23 at 12.45.07 pmIn the next screen, you can select the project bundle we just downloaded and upload it here

Screen Shot 2014-08-23 at 12.45.55 pmOnce the upload is successful, You can click next till you see the home screen again with the project added. Here you will have a  bazillion options to manage your app

Screen Shot 2014-08-23 at 12.47.58 pm

You can make changes to your code and upload the bundle back and issue builds.

The second method is to download XDK on your machine and I would recommend this approach. Navigate to Intel XDK home page and you can download the XDK for your OS.

Once you have downloaded, installed and launched the app, you will be asked to login. Once you are logged in, you will be shown a page, where you can create a new project

Screen Shot 2014-08-23 at 12.56.28 pm

You can pick any of the templates and get started. I am going to choose “Use App Starter” and create an App. I am going to name it “helloWorldXDKApp”

Screen Shot 2014-08-23 at 1.07.08 pm

and click on create (bottom righthand corner).  Once the project is successfully created, you will be shown a tour of XDK. I recommend taking it. And then you will see something like

Screen Shot 2014-08-23 at 1.08.51 pmThis window has practically everything you need to develop a Hybrid App. Once you are done with the development, you can click on the “Emulate” tab on the top.

Screen Shot 2014-08-23 at 1.11.28 pm

As you can see, the emulation environment is pretty comprehensive. You can emulate your app locally and then following the instructions on “Test” tab, you can test on an actual device as well!

And when you click on “Build” tab, you issue a build to the generate the selected platform installer

Screen Shot 2014-08-23 at 1.15.50 pmAnd then you can manage all your builds and releases right from here!! Pretty sweet right?!!

Next steps

I would highly recommend watching this 9 part series by Connie Berardi to get well acquainted with developing apps with Intel’s App F/W & XDK.

I would also recommend checking out XDK’s app designer, which you can find when you create a new project in XDK

Screen Shot 2014-08-23 at 1.24.22 pm

This can be used to design and develop apps using other Mobile Web frameworks like Bootstrap, Topcoat etc.

Screen Shot 2014-08-23 at 1.27.40 pm

You can find a good tutorial on the same below

Hope this post has provided you a decent idea on how to get started with Intel’s XDK.


Thanks for reading! Do comment.
@arvindr21

Tweet about this on TwitterShare on LinkedIn0Share on Google+0Share on Reddit0Buffer this pageFlattr the authorEmail this to someonePrint this page
  • Jorge

    I played a couple of weeks with Intel XDK but I got a bad feeling with it because it was very unstable. The application crashed very often and had weird behaviours like sometimes hide for no reason the button to associate the custom script to the click event of the buttons.

    • / Arvind Ravulavaru

      Is it? I have not used it so extensively, but it seemed fine to me. Do you have any code samples that caused issues?

    • Saad

      I agree with you,i got same experience while designing my app. Tool crashing, not applying the changes i made.

      • / Arvind Ravulavaru

        Can you share some specifics? I can take a look at it too.

  • Shalaby

    from your experience do you prefer intel framework or ionic?

    • / Arvind Ravulavaru

      Helo Shalaby, The answer to that question depends on what kind of application you are building?

      From what I have seen, I would use Ionic when working with service layer heavy apps, scenarios where you are relying on network to send data and then bind them to objects, perform DOM manipulation based on that data etc. + you prefer an Angular way of building the application.

      App f/w is can also do the above things, but the amount of code you need to write to achieve the same would be more. App f/w internally uses a jQuery like API with $.get() $.post() methods, which can be used to fetch data and you can use any micro templating engine to bind the received response to a template and build the UI.

      I would prefer Intel’s APP f/w when dealing with less network intensive applications. I am still exploring Intel’s App f/w.

      Thanks.