Chapter 3. View resources, custom elements, and custom attributes

 

This chapter covers

  • Exploring view resources
  • Examining custom elements
  • Using custom attributes

The core of the Lego toy ecosystem is the 8 x 8 x 10 mm Automatic Binding Brick, originally called the Mursten, which almost all other Lego construction toys are derived from. These standard Lego bricks have been combined to produce a multitude of different creations by millions of people around the globe.[1] What makes this toy different—and makes Lego one of the most successful toy companies in the world today—is that kids aren’t limited to what the toy designers have imagined for them, but only by their own imagination. The same bricks can be used to build a car, a house, or a castle, by combining them in different ways. In the world of programming, we’d call the Mursten a primitive, a core building block that can be used to create a more complex system.

1There are up to 915,103,765 different combinations, according to Wikipedia (https://en.wikipedia.org/wiki/Lego#Design).

Historically, most of the more successful technologies have been built by defining these core primitives and building on top of them. A famous example of this is HTML. HTML provides us with a set of simple components like <h1>, <body>, and <span>, which, when combined with CSS and JavaScript, can be used in many ways to produce any site on the web.

3.1. Understanding Aurelia’s templating primitives

3.2. CSS resources

3.3. Custom elements

3.4. Custom attributes

3.5. my-books project status

Summary