Enyo: Up and Running

Enyo: Up and Running

Roy Sutton

Language: English

Pages: 73

ISBN: 1449343120

Format: PDF / Kindle (mobi) / ePub


Roy Sutton, "Enyo: Up and Running" English | ISBN: 1449343120 | 2013 | Publisher: O’Reilly Media | PDF | 74 pages | 5 + 1 MB

Learn how easy it is to design and build responsive, cross-platform apps with the Enyo open source JavaScript framework. With this hands-on book, Enyo contributor Roy Sutton shows you how to get started with the framework’s core object-oriented features, including its modular design, reusable and extensible components, layout and widget libraries, easy-to-use deployment options, and support for HTML5 standards.

Before you know it, you’ll be writing native-quality apps that work equally well on smartphones, tablets, and desktops. Are you familiar with HTML, CSS, or JavaScript? Then you’re ready for Enyo.
Start with a sample project to get the feel of Enyo right away
Learn about Enyo’s "kinds" (component building blocks), encapsulation, inheritance, and other core features
Design compelling and responsive apps with Enyo’s layout strategies and Layout library
Use existing components to create new components
Build unique user interfaces with the Onyx library and widget set
Explore the community gallery to find and share reusable components
Tackle debugging, performance tuning, and globalization
Package your app for web, desktop, and mobile targets, using Bootplate, AppUp, and PhoneGap

Professional jQuery

Tapworthy: Designing Great iPhone Apps

Enyo: Up and Running

The Art of Debugging with GDB, DDD, and Eclipse

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

deploy Enyo is to host it on a server and serve the apps embedded into a web page. Although all our examples have shown rendering Enyo objects into the document body, it is possible to render them into any element on the page. For web deployment, simply copy the Enyo library and app source code up to a directory on your server and include them into your HTML source. Bootplate makes this process easy by including a deploy script that packages all the files and minimizes the source. This process

that rely upon Node.js. In Enyo, Node is used for minimizing Enyo source, packaging apps derived from Bootplate, and for compiling LESS files into CSS. If you plan to release an Enyo app, you will need to install Node. If you just want to play around with Enyo and you don’t mind running the non-minimized, debug version of Enyo, you don’t need Node. 55 Git Git is a distributed source-code management tool. It allows for software developers to keep revisioned copies of their source code. It is

this.applyStyle("background-color", this.color); } }); Try it out: jsFiddle. You note that you’ve added a default color for the light, in case none is defined, and you’ve added a function that Enyo will call if anyone updates the light color after the kind has been created. You had to add some code to the create() function that Enyo calls on all kinds so that you can set the initial color. First, you test that you can set the color at create time by passing in a JavaScript object with the color

that originates on the kind, you can use the handlers block, as we did for the previous tap event. Advanced Events The standard events described previously are bubbling events, meaning that they only go up the app hierarchy from the object that originated them through the object’s parent. Sometimes it’s necessary to send events out to other objects, regardless of where they are located. While it might be possible to send an event up to a shared common parent and then call back down to the

see how the Onyx versions of these controls compare next. You may also note that some controls use the content property to set the content of the control. The exceptions to this rule are the text field controls: Input, TextArea, and RichText. These controls use the value property to get and set the text content. By default, most Enyo controls escape any HTML in their content or value properties. This is to prevent the inadvertent injection of Java‐ Script from unsafe sources. If you want to use

Download sample

Download