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 and tablets) 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.

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 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.1.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 product mixes and pricing programs for organizations, government agencies, and individuals. Subscribers 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 dozens 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, and Kara Ebrahim, who slew typos and wrangled words into their proper places. 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. Finally, many thanks to the HP webOS team who not only helped make Enyo a reality but also provides one of the best work environments a person could hope for.

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

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.