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.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Enyo: Up and Running by Roy Sutton (O’Reilly). Copyright 2013 Roy Sutton, 978-1-449-34312-5.”

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

Safari® Books Online

Note

Safari Books Online is an on-demand digital library that delivers expert content in both book and video form from the world’s leading authors in technology and business.

Technology professionals, software developers, web designers, and business and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training.

Safari Books Online offers a range of plans and pricing for enterprise, government, education, and individuals.

Members have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and hundreds more. For more information about Safari Books Online, please visit us online.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://oreil.ly/enyo-upandrunning.

To comment or ask technical questions about this book, send email to .

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Acknowledgments

First and foremost I would like to thank my wife Connie Elliott and son Ian for their help and forbearance as I prepared the book you now hold (even if only virtually). Next, I would like to thank the team at O’Reilly, in particular Simon St. Laurent and Megan Blanchette, who really made the process of getting this book finished as painless as possible, Kara Ebrahim, who slew typos and wrangled words into their proper places, and Kristen Brown, who made the second edition painless. V. L Elliott played a special role in helping bring structure to the original thoughts for this book. Further, thanks to those readers (technical and otherwise) who helped reduce the number of errors herein. Special thanks to Ben Combee and Arthur Thornton for their efforts in spotting technical errors in the first edition. Many thanks to Jim Tang for keeping the official Enyo documentation in order and for spotting errors in the second edition. I’d also like to acknowledge the dozens of individuals at HP and LG (from Silicon Valley to France, Korea, and India) who have had a hand in developing, testing, supporting and evangelizing Enyo, and our numerous contributors from the broader Enyo community. There are far too many people to name here, but without their hard work and passion, Enyo would not be what it is today. Finally, special mention goes to the creators of Enyo, Scott Miles and Steve Orvell, without whom this book wouldn’t exist.

Content Updates

October 31, 2014

A lot has happened with Enyo since the first release 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 release of this book, you will want to focus on the new chapter (Chapter 5) and then check individual chapters for changes.

Get Enyo: Up and Running now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.