Languages

From WebOS101

Jump to: navigation, search

Contents

Introduction

Programming with the webOS SDK is very straightforward. Applications are written in the traditional web languages of javascript, html, and css. The underlying programming is done in javascript, with user interface structure in html and layout/styling done with css (this is a straight MVC model). The SDK also has Mojo, which is a toolkit for interacting with device services, events, and provides widget templates that you can use. Prototype.js is also available to use when programming in javascript on the device.

With the PDK, applications can be programmed in C/C++, along with OpenGL ES 1.1 or 2.0, and libraries can be included by statically building/linking them to the executable.

Javascript

Javascript, also known as ECMAScript, is a surprising powerful programming language. Javascript should not be confused with Java. Javascript is relatively fast, interpreted language, that uses prototype inheritance, but can also take advantage of classes using Prototype.js' Class.Create() method. Read more about it on the Javascript page.

HTML

HTML, which stands for Hyper Text Markup Language, is the de facto language of the Web. Nearly all Web pages are composed of some for of HTML. In the Mojo SDK HTML is used for building the scenes that are displayed. Read more about it on the HTML page.

CSS

CSS, or Cascading Style Sheets, is a method of describing the presentation of information contained in an HMTL scene. CSS is used to change the appearance of your scenes. Not only can you style all the HTML you add to scene but also the styling of Mojo widgets. Read more about it on the CSS page.

C/C++

C/C++ is a compiled language, contrary to javascript which is interpreted. It is much more strict in variable type declarations. You build an executable to include in the device package. Read more about it in the PDK Section. Also recommended: [1]

Personal tools