ChapterÂ 2.Â Core Concepts
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.
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.
One of the simplest possible declarations for a kind is:
Get Enyo: Up and Running, 2nd Edition 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.