📜 ⬆️ ⬇️

Review Tizen SDK. Web

Hi, Habr!

The most curious of you managed to get acquainted with the OS Tizen , look at Tizen in action, and even dig into the SDK using our Tizen Live SDK based on Ubuntu .

Watching all those rumors that are hovering around Tizen, it has already become clear to many that the official announcement of the first Tizen devices is just around the corner and now is the time to start developing or porting your mobile application for this platform. If you treat these many (or even pondering), welcome to the cat, where we will introduce you to the Tizen SDK and its tools.
')
image

We start today with the web part.

Introduction


So, we are dealing with Tizen, an open source Linux-based operating system designed for a wide range of devices, such as smartphones, tablet computers, car infotainment systems, ultrabooks, smart TVs, digital cameras, office, home and medical. equipment and other wearable electronics. The co-CEO of Samsung Electronics said: “We want to see Tizen on everything,” and Tizen is quite capable of that, since he has everything he needs for this, which we will see with you now.

Tizen architecture


image
As can be seen from the diagram above, the lowest layer of the architecture is the Linux kernel (for Tizen SDK 2.2 version 3.4+) with device drivers.

Just above are other subsystems of the kernel:


From the above, we can conclude that the implemented functionality is able to satisfy almost any need, giving Tizen flexibility and versatility.

At the highest level are user applications that are of three types in Tizen: web, native, and hybrid.

Access to the subsystems listed above from applications is carried out through two frameworks: the Web Framework and the Native Framework. And we will dwell on each one in more detail.

Web Framework


In Tizen, conditionally, there are 3 types of web applications:


For the latter two types, it is possible to publish them in the Tizen Store.

Below is the structure of the Tizen Web API.

image

For the simplicity of creating hosted applications, you have to pay because the Device API is not available for them. While for full-fledged web applications (also called packaged apps), there are no restrictions.

Today, Tizen is the leader in supporting the HTML5 standard among all existing mobile platforms. This is easily verified by going to html5test.com. Below is a screenshot of a web page with the results.

image

In addition to jQuery and jQuery Mobile, which is part of the SDK, in the arsenal of Tizen support frameworks such as angular.js, enyo.js, sencha.js, backbone.js, sprite.js, verlet.js, require.js, basis .js, zepro.js, box2d and many others.

The Tizen SDK includes many examples, after which you can easily start developing your own unique, world's best web application. Of course, only after we introduce you to the toolkit that Tizen SDK offers developers.

Tizen ide


The integrated development environment included in the Tizen SDK is based on Eclipse with a set of necessary additions and adaptations for developing applications for Tizen. The outlook for Tizen Web and Tizen Native is somewhat different. Below is a screenshot of the Tizen IDE with the Tizen Web perspective.

image

The IDE interface is intuitive and contains everything needed for developing, debugging, testing and profiling applications. Separately, we note the Event Injector, with which you can emulate various events, thus allowing you to get by with an emulator, which we will discuss later.

In general, Tizen IDE for web developers offers the following tools / helpers:


image


image


Another tool is UI Builder . It is designed to create a graphical user interface of web applications and is a WYSIWYG (What You See What is What You Get) editor.

image

The tool also allows you to associate code with UI events. It has a simple interface and therefore we will not dwell on it in more detail.

As you can see, the toolkit for a web developer is very rich. But that's not all.

Web Simulator


Another tool is Web Simulator . It is based on Google Chrome and allows you to check your application, simulating "combat" conditions and, if necessary, debug it in the Chrome developer tools.

image

Tizen Emulator


Finally, the latest tool from the Tizen SDK for web developers (and not only). This is Tizen Emulator. Based on QEMU, the emulator allows you to test / debug your application in even more “combat” conditions.

image

Command-Line Interface (CLI)


For those who need a command line (for example, to customize development processes, for example, Continuous Integration settings), a command-line interface is provided.
web-genGenerates a new project. For example:
web-gen –-name HelloTizenWorld --path /home/myproject
web-templateSearches for and installs a web template. If no options specified, found
pattern is applied. For example:
web-template –-search tizen
web-buildCreates a temporary directory for signing and packaging application files.
after performing some operations. The default output directory is .buildResult .
The output directory can be changed by specifying the --output option.
If a directory with the same name already exists, it is previously deleted.
For example:

  • Web application project:

- Working folder: /home/test/workspace/MyBasic
- Team: $ web-build. --optimize --exclude-uifw
- Result: the ~/MyBasic/.buildResult .

  • Hybrid Application Project:

- Main project folder (web): /home/test/workspace/MyWeb
- Service folder (native): /home/test/workspace/MyService
- Team: ~/MyWeb$ web-build . --optimize --exclude-uifw -rp /home/test/workspace/MyService ~/MyWeb$ web-build . --optimize --exclude-uifw -rp /home/test/workspace/MyService
or ~ / MyWeb $ web-build. --optimize --exclude-uifw -rp ../MyService
- Result: the folder ~/MyWeb/.buildResult created.

Next, run the web-signing and web-packaging commands to sign and
packaging the contents of the .buildResult folder.
web-packagingPacks files into a widget (.wgt file). For example:
web-packaging project.wgt project/
web-signingCreates a digital signature. For example:
web-signing --profile test:profiles.xml
web-listDisplays a list of widgets installed on the device (emulator). For example:
web-list -d emulator-26100
web-installInstalls the widget on the device (emulator). For example:
web-install -w hellotizen.wgt
web-uninstallRemoves a widget from a device (emulator). For example:
web-uninstall -i 91CSlOf9n
web-runRuns the widget on the device (emulator). For example:
web-run -i 91CSlOf9n5.hellotizen
web-debugStarts debugging the widget. For example:
web-debug -i 91CSlOf9n5.hellotizen

And of course, we can not fail to mention that the detailed documentation is also included in the Tizen SDK.

This concludes our review. We hope it was interesting and informative and will help you to further develop high-quality interesting applications for Tizen. A more detailed description of the Tizen SDK tools can be found here .

We provide technical support and answers to questions here: dev.cis@partner.samsung.com

All the best and see you in the next articles!

Tizen Eva Group

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


All Articles