Enyo
From WebOS101
What is Enyo?
Enyo is a JavaScript framework for building touchscreen applications. Produced by HP-Palm, it's version 0.10 (1.0) is included with the Pre3 and TouchPad devices.
Enyo introduces a method of encapsulating JavaScript objects into a psuedo-Object Oriented Programming style. It uses a system called "kinds" that are class-like JavaScript objects, which hold additional objects, variables, and functions. Many applications are built using a single kind, which then has sub-components of several other kinds.
How do I use Enyo?
Aside from the initial application setup, which is common amongst nearly all webOS applications, including appinfo.json, index.html, etc, a simple "Hello, World" program using the Enyo framework, would look much like:
enyo.kind({
name: "MyApp",
kind: "VFlexBox",
components: [ {
kind: "Item",
content: "Hello, World"
} ]
});
This creates a new kind called "MyApp", which is a sub-kind of the Enyo supplied enyo.VFlexBox. Inside the enyo.VFlexBox is an enyo.Item, which has the content "Hello, World". Launching an application that is properly configured to load this file from it's depends.js and index.html, would show a full-screen box, that says "Hello, World" in it.
See also Developing With Enyo, Enyo on Phones.

