Chapter 7. Writing custom components

 

This chapter covers

  • An introduction to writing custom components
  • Implementing a selectable-list component
  • Implementing a tree-view component
  • Integrating Ember.js with Twitter Bootstrap

The ability to write custom components is a key feature in most GUI frameworks because it allows you to build parts that can be reused in the same application as well as across applications. Most applications have components that share a similar functionality throughout. Features such as selectable lists, buttons that integrate with Twitter, and tree-based components are a few examples of situations in which implementing custom components can make sense in your application.

Ember.js’s use of Handlebars.js templates, easy integration of third-party JavaScript libraries, and strong binding system make it an excellent framework for building custom components. This chapter presents a few of the custom components that have been written for the Montric project and discusses how they’re structured to achieve different goals in your application. When combined, some of these components work together to form complex functionality. You’ll structure your components to be as small and specific as possible so that you can reuse them individually as well as combine them as building blocks to create components that are more complex.

7.1. About Ember custom components

7.2. Implementing a selectable list

7.3. Implementing a tree menu

7.4. Summary

sitemap