Preface - Enyo: Up and Running (2015)

Enyo: Up and Running (2015)

Preface

HTML5 technologies hold the promise of providing compelling user experiences through the web browser. The Web has evolved as a platform for delivering content to users regardless of the operating system their computers (or smartphones, tablets, and smart TVs) use. As users spend more time on the Web, they not only expect to receive content but also perform the actions of their daily lives. The Web is evolving from static pages to true web applications.

Enyo is a JavaScript framework designed to help developers create compelling interactive web applications (or apps). What makes Enyo special? Why should you be interested in it? I’ll try to tackle those questions and, along the way, help you get productive in Enyo.

Where Did Enyo Come From?

Enyo grew out of the need to create applications for the HP TouchPad tablet. It was designed to be an easy-to-learn, high-performance framework that provided a pleasing and consistent user interface. As Enyo grew, HP realized that the technologies could be applied not only to tablets but also to the larger screens of desktops and the smaller screens of smartphones.

On January 25, 2012, HP announced they were going to release Enyo as an open source project under the Apache 2.0 license. Development moved to GitHub and the broader JavaScript community was invited to participate. Since that time, Enyo has matured and now offers robust tools for developing web apps on a wide variety of platforms. In March of 2013, LG Electronics acquired the webOS group from HP and the core Enyo team focused on adapting the framework for creating smart TV applications.

Core Beliefs

The Enyo team believes very strongly in the power of the open Web. To that end, Enyo embraces the following concepts:

§ Enyo and its code are free to use, always.

§ Enyo is open source — development takes place in the open and the community is encouraged to participate.

§ Enyo is truly cross-platform — you should not have to choose between mobile and desktop, or between Chrome and Internet Explorer.

§ Enyo is extensible.

§ Enyo is built to manage complexity — Enyo promotes code reuse and encapsulation.

§ Enyo is lightweight and fast — Enyo is optimized for mobile and its core is small.

What’s Enyo Good For?

Enyo is designed for creating apps. While a discussion of exactly what an app is could probably fill a book this size, when I say “apps” I’m referring to an interactive application that runs in a web browser (even if the browser itself may be transparent to the user).

This is to say Enyo is not designed for creating web pages. Enyo apps run in the browser and not on the server. This doesn’t mean Enyo cannot interact with data stored on servers; it certainly can. And it doesn’t mean that Enyo can’t be served to the browser by a web server; it can.

Who Is This Book For?

This book is written for web developers looking to learn new ways of developing applications or for programmers who are interested in learning web app design. It is not intended as an “introduction to programming” course. While designing with Enyo is easy, I expect some familiarity with HTML, CSS, or JavaScript.

Minimum Requirements

The absolute minimum requirement for working through the book is a web browser that is compatible with Enyo and access to the jsFiddle website. To get the most out of the book, I recommend a PC (Mac, Windows, or Linux), a code editor, and a modern web browser. A web server, such as a local installation of Apache or a hosting account, can be helpful for testing. Git and Node.js round out the tools needed for the full experience.

Information on setting up your environment to develop Enyo applications can be found in Appendix A. This book was based off Enyo version 2.5.1, though it should apply to later versions.

Typographic Conventions

The following conventions are used in this book:

Italic

Ital indicates new terms, URLs, email addresses, filenames, and file extensions.

Constant width

CW is used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.

Constant width bold

CWB shows commands or other text that should be typed literally by the user.

Constant width italic

CWI shows text that should be replaced with user-supplied values or by values determined by context.

TIP

This icon precedes a link to runnable code samples on jsFiddle.

TIP

This icon precedes a tip, suggestion, or note.

WARNING

This icon precedes a warning or clarification of a confusing point.

Using Code Examples

This book is here to help you get your job done. In general, if this book includes code examples, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

Content Updates

January 8, 2015

A lot has happened with Enyo since the first edition of the book. Most notable are the addition of data binding to the core (Bindings and Observers) and the new Moonstone smart TV UI library (Moonstone Controls). Other changes include the deprecation of published properties and the introduction of the new set() and get() methods (Properties), the switch from g11n to iLib for internationalization (Going Global), and the new Application object (Application). If you read the previous edition of this book, you will want to focus on the new chapter (Chapter 5) and then check individual chapters for changes.