📜 ⬆️ ⬇️

Introducing Intel XDK - Mobile Cross-Platform Development Tool


Of course, our regular readers know that Intel provides a rich set of tools for high-performance computing developers — compilers, math libraries, and more. In this article we will talk about a very unusual topic 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 turn to Apple for development tools using Objective C. If you have an Android phone, 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 — a combination of HTML (markup language), CSS (styles), and JavaScript (a scripting programming language). It is widely known that HTML5 is used for programming web pages. But it is still somewhat less known that HTML5 code can be packaged in a so-called hybrid application, which from the user's point of view 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, only without the browser user interface.

Using HTML5, of course, has its limitations. Virtually any interesting mobile application works with sensors, cameras, etc. - i.e. with what we are not used to seeing through the web pages. HTML5 is an open industry standard, so any additions take time. Numerous APIs for working with sensors are now in development and in a few months or years will become part of the standard. After that, not only hybrid HTML5 applications, but also ordinary web pages will be able to work with sensors as soon as browser vendors implement the standard in their products. The natural question that arises is whether or how soon it will be implemented. No one knows for sure, but the “newest” browser history speaks in favor of HTML5. The delay in supporting innovations 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 is the site , which is widely used by web programmers as documentation on the support of certain aspects of HTML5 by various browsers. From the information presented on this site it is very easy to see how quickly HTML support, CSS and JavaScript API support evolve and add.
')
Well, well, you will say, but until these new features are implemented, I cannot do anything interesting on HTML5. This is not true. There are technologies that allow linking HTML5 code with platform dependent code in a convenient form. At the same time, the required platform-specific code for common cases (including, in particular, access to sensors) already exists and is available as libraries through the JavaScript API. For example, the project Cordova provides open source plug-ins for all occasions - more than 200 ...

But back finally to Intel. The company is working on many aspects of HTML5. The most interesting are the HTML5 runtime (about this sometime next time) and, of course, a tool for Intel XDK developers.

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 an emulator and on a real device, debugging, profiling and, finally, building for subsequent publication in the app store. Here's how, for example, the XDK code editor (built on the basis of the open source Brackets project) looks like:

image

Mobile 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 need to be physically accessible. For example, the picture below shows the Rolling Can demo shipped with the XDK. This program works with the acceleration sensor of the mobile device in such a way that the bank “rolls” on the screen in the direction of inclination. Pay attention to the XDK panel on the left, where the programmer can emulate the tilt of the device in space. All common sensors are supported - for example, on the panel on the right you can see how you can set the virtual position of the device for GPS emulation.

image

Another very 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 feature. 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 to change the code so that the bank 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, even if you are a specialist in High Performance Computing and do not know anything about mobile programming.

The final step in developing a mobile application is to build for publishing in the app store. The picture below shows the XDK screen that controls the builds. When you click on one of the options, you will be asked to fill in 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 software for the build (XCODE for iOS, Android SDK, etc.). Instead, the code is sent to the Intel server, where the necessary software is preinstalled, it is being assembled, and you get the assembled application back (for example, for Android, an apk-file). The picture shows how many target platforms are supported by XDK today.

image

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

Source: https://habr.com/ru/post/221187/


All Articles