Introducing Intel XDK - Cross-Platform Mobile Development Tool


    Our loyal readers, of course, know that Intel provides a rich set of tools for developers in the field of high-performance computing - compilers, math libraries, and much more. This article will discuss a topic that is very atypical for our blog - a tool for programming mobile applications on HTML5 Intel XDK .

    Imagine that you decided to make your first mobile application. If you are writing for the iPhone, then you will probably contact Apple for development tools using Objective C. If you have an Android phone, then your first step will be to install the Android SDK from Google. Other target platforms use their own programming languages ​​and development environments. Traditional development for mobile devices is highly fragmented: developers have to master various, often unrelated technologies.

    A cross-platform alternative for creating mobile applications is HTML5 programming - combinations of HTML (markup language), CSS (styles) and JavaScript (scripting programming language). It is widely known that HTML5 is used for programming web pages. But it’s still somewhat less known that HTML5 code can be packaged into a so-called hybrid application, which from the point of view of the user is no different from applications created using platform languages ​​such as Objective C on iOS or Dalvik on Android. During the execution of such applications, the same HTML5 runtime is usually used as in the browser, but without the browser user interface.

    Using HTML5, of course, has its limitations. Almost any interesting mobile application works with sensors, a camera, etc. - i.e. with what we’re not used to seeing through web pages. HTML5 is an open industry standard, so any add-ons take time. Numerous APIs for working with sensors are under development and will become part of the standard in a few months or years. After this, not only hybrid HTML5 applications, but also regular web pages will be able to work with sensors as soon as browser manufacturers implement the standard in their products. The natural question that arises is whether and how soon they will be implemented. Nobody knows for sure, but the "latest" browser history speaks in favor of HTML5. Delay in supporting innovation in this area is fraught with the loss of part of the market, which is clearly demonstrated by the dynamics of the popularity of various browsers in the past few years. Another confirmation isA site that is widely used by web programmers as documentation to support certain aspects of HTML5 with various browsers. From the information presented on this site, it is very easy to see how quickly support for HTML, CSS and JavaScript API is evolving and adding.

    Well, you say, but until these new features are implemented, I can’t do anything interesting with HTML5. This is not true. There are technologies that allow you to conveniently link HTML5 code with platform-specific code. At the same time, the necessary platform-specific code for common cases (including, in particular, access to sensors) already exists and is available in the form of libraries via the JavaScript API. For example, the Cordova project provides open source plugins for all occasions - more than 200 ...

    But finally, back to Intel. The company is working on many aspects of HTML5. The most interesting are the HTML5 runtime (more about that next time) and, of course, the Intel XDK developer tool.

    Intel XDK is available for free download and use. The tool is an IDE, in which there is support for all stages of development: code editing, testing through the emulator and on a real device, debugging, profiling and, finally, assembly for subsequent publication in the application store. Here is how, for example, the XDK code editor (built on the basis of the open source project of Brackets) looks like:

    image

    Mobile device emulator is one of the most popular features of XDK. In the emulator, the programmer can "try" his application on virtual devices with different screen sizes, which means that they do not have to be physically accessible. For example, the picture below shows the Rolling Can demo that ships with the XDK. This program works with the acceleration sensor of the mobile device so that the bank on the screen "rolls" in the direction of inclination. Pay attention to the XDK panel on the left, where the programmer can emulate the inclination of the device in space. All common sensors are supported - for example, the panel on the right shows how you can set the virtual position of the device for emulating GPS.

    image

    Another extremely interesting feature of XDK is the ability to test on a physical device. If you have a mobile device based on Android, iOS or Windows Phone, then you can easily try this opportunity. Start with one of the demo programs that come with the XDK, switch to the Test tab and follow the instructions (install App Preview, etc.). For example, try Rolling Can, which was already discussed above ... And then try changing the code so that the can rolls up. And all this right on your own device. If you have general programming knowledge, you will be amazed at how easy it is to do it, even if you are a specialist in High Performance Computing and do not know anything about programming mobile devices.

    The final step in developing a mobile application is to build it for publication in the application store. The image below shows the XDK screen that controls assemblies. When you click on one of the options, you will be asked to fill out the necessary information (for example, developer certificate), after which the application will be built by the XDK cloud service. This is very convenient for cross-platform development, since the programmer does not need to install additional build software (XCODE for iOS, Android SDK, etc.). Instead, the code is sent to the Intel server, where the necessary software is pre-installed, the assembly is carried out there, and you get back the assembled application (for example, for Android - the apk file). The picture shows how many target platforms are supported by XDK today.

    image

    In this article, we talked only about the very basic features of XDK. A lot of others are still behind the scenes: UI builder, static checker, work with version control of code, remote debugging on mobile devices, profiling, integration with online services ... We are planning additional articles about XDK in our blog. Stay tuned!

    Also popular now: