Skip to Content
Enyo: Up and Running
book

Enyo: Up and Running

by Roy Sutton
January 2013
Beginner to intermediate content levelBeginner to intermediate
86 pages
1h 40m
English
O'Reilly Media, Inc.
Content preview from Enyo: Up and Running

Chapter 2. Core Concepts

Introduction

In this chapter, we’ll cover the core concepts of Enyo that we only touched on in the last chapter. You will be able to write powerful apps after absorbing the information in just this chapter. We’ll go over the concepts one by one and illustrate each with code you can run in your browser.

One of the driving ideas behind Enyo is that you can combine simple pieces to create more complex ones. Enyo introduces four concepts to assist you: kinds, encapsulation, components, and layout. We’ll cover components and layout more thoroughly in Chapter 3 and Chapter 4, respectively.

Kinds

Enyo is an object-oriented framework. It is true that every JavaScript application regardless of framework (or lack thereof) contains objects. However, Enyo’s core features provide a layer on top of JavaScript that makes it easier to express object-oriented concepts such as inheritance and encapsulation.

In Enyo, kinds are the building blocks that make up apps. The widgets that appear on screen are instances of kinds, as are the objects that perform Ajax requests. Kinds are not strictly for making visual components. Basically, kinds provide a template from which the actual objects that make up your app are generated.

Be Kind

One of the simplest possible declarations for a kind is:

enyo.kind({ name: 'MyKind' });
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Enyo: Up and Running, 2nd Edition

Enyo: Up and Running, 2nd Edition

Roy Sutton
Windows® 2000 Active Directory™

Windows® 2000 Active Directory™

Edgar Brovick, Doug Hauger, William C. Wade
Performance Tuning for Linux® Servers

Performance Tuning for Linux® Servers

Sandra K. Johnson, Gerrit Huizenga, Badari Pulavarty

Publisher Resources

ISBN: 9781449343118Errata