Домой United States USA — software The Definitive Guide to Developing Portable Tizen Apps

The Definitive Guide to Developing Portable Tizen Apps

122
0
ПОДЕЛИТЬСЯ

This article complements the online lecture series delivered at the annual Tizen Developer Conference and elsewhere.
Join the DZone community and get the full member experience. Russian (русский) Translation available
This article complements the online lecture series delivered at the annual Tizen Developer Conference and elsewhere. Titled “JavaScripting Tizen Web Apps” and “Tizen Application Portability,” these lectures serve to guide developers interested in Tizen and the benefits of portable development strategies. An analysis of the available Tizen API begins with the consideration of standards and portable web technologies. The Tizen architecture is reviewed, and contrasting its web and native frameworks, leads to an inspection of Tizen’s deployment approach and how it affects web logic and content of both server-based and locally installed apps. While evaluating strategies to leverage JavaScript libraries, a number of popular candidates are presented. Attention is given to the web framework embedded version of jQuery Mobile as well as third-party alternatives like Sencha Touch, Dojo Mobile, and Enyo JS. Along with a short explanation of native-to-JavaScript bridges and their potential in portably employing the Tizen Device API, code samples illustrate the utility of popular JavaScript libraries. As far as mobile-optimized operating systems are concerned, Tizen is certainly a new player. This unique platform arises from a partnership between Samsung, Intel, and the Linux Foundation and intends to soon power a wealth of devices. According to Samsung, “We plan to release new, competitive Tizen devices within this year and will keep expanding the lineup depending on market conditions.” As the Tizen OS and APIs mature, one thing is clear: Tizen architects are putting the concept of portable applications built on standard technologies first and foremost. In this article, we’ll cover the basics of how Tizen APIs support the development of portable apps. Regardless of whether the developer uses the official Tizen software development kit (SDK) or other development tools, apps written for Tizen’s web framework can be ported to other platforms leveraging web standards relatively easily. Being an emerging technology, Tizen stands to benefit even more from the porting of pre-existing web apps. List of Figures
Source Code Listings
Motivation behind portable development
The Worldwide soup
Tizen Architecture
Vendors and device segments
Web Runtime and Web Framework
WebKit adoption
GNU/Linux and sources
JavaScript Libraries
JQuery Mobile
Sencha Touch
Dojo Mobile
Enyo JS
HTML5 Boilerplate
Native-to-JavaScript bridges
Package standard
Store deployment
Tizen Development Tools
Tizen integrated development environment
Tizen emulator
Tizen simulator
Summary
Benefits of portability
Works Cited
W3C and other standards
Tizen layered architecture
Browser and Web Runtime
JavaScript library screenshots
Divergence of rich and reach
Web app installation structure
Web app file system layout
Tizen SDK icons
Eclipse-based IDE
Ripple-based WRT simulator
Dynamic performance analyser
Samsung made the Tizen device
Declarative programming with jQuery Mobile and multi-page encapsulation
A complete Sencha Touch index. html, suitable even for large projects
Implementation of the entry point to a Sencha Touch app
A small Dojo Mobile app implemented completely in index. html
A small Enyo JS app implemented completely in index. html
While developers and users alike profit from apps that work on a variety of operating systems, it’s interesting that those most influencing Tizen’s architecture value its portable nature with respect to the diverging user experiences coming in future Tizen devices. Sunil Saxena states, “The emphasis for Tizen architecture is WebAPI to ensure applications work across different architectures and different profiles,” meaning that a low-power navigation computer will execute and display a geographical app just as well as a higher-power notebook or tablet computer would. Portable APIs empower software reuse as well, which can drive down expensive engineering costs considerably. While considering the wealth of Tizen platform support for portable development, it’s important to remember that Tizen provides non-standard yet valuable infrastructure. Goodies lie between the sandwich of POSIX-friendly GNU/Linux kernel and Tizen frameworks. Namely, rather than Qt or Gtk, the Enlightenment Foundation Libraries (EFL) provides Tizen with widgets and supporting graphical building blocks. Although EFL-linked apps build on Unix-like kernels using portable and standard ISO C, it’s not reasonable to expect them to work on Windows Phone, iOS, or the Qnx-based Blackberry 10, to name a few. In this article, we narrow the definition of portable application development to focus our attention on web technologies like JavaScript, CSS, and HTML. Hyper buzzwords aside, most developers of modern web apps appreciate the rich feature set provided by the recent advancements in HTML5, CSS3, JavaScript, and related web technologies like XMLHttpRequest (XHR) or the variety of JavaScript libraries. In fact, web interfaces are so often mixed that many refer to this new web soup as simply being composed of HTML5 — not to mention that HTML5 is an emerging standard in itself. Standardized interfaces and implementations like HTML have accelerated the adoption of web technologies, which has, in turn, strengthened the very standards (W3C, ECMA, IETC, ISO) that foster portability. Meanwhile, development communities have overtaken the pace of standards production, which has given rise to a number of databases and utilities useful for evaluating standards compliance, API adoption, and general compatibility of web technologies. Some examples include:
http://www.html5test.com/
http://www.html5please.com/
http: //www. modernizr. com/
http://www.caniuse.com/
http: //www. fmbip. com/litmus/
http://www.markus-falk.com/mobile-frameworks-comparison-chart/
The Tizen work group’s stated objective in designing the kernel, core, framework, and application layers involves leveraging HTML5’s robust capabilities and cross-platform flexibility to empower developers of portable applications. “The Tizen SDK and API allows developers to use HTML5 and related web technologies to write applications that run across multiple device segments, including smartphone, tablet, smart TV, in-vehicle infotainment, and netbook.” [source]
The construction of Tizen differs from one device segment to the next. Vendors can take advantage of the open nature of Tizen’s development cycle to modify the OS to suit their needs, and several key system components deviate to demonstrate this. For example, Tizen’s official IVI image profile distributes the Qt library alongside EFL. Each finished Tizen image aggregates software packaged in the RPM format corresponding to a specific architecture (like IA32 or ARMv71) and device segment.

Continue reading...