An eventful application

An interesting observation about both routing and data binding is that they are built around events. When a route changes, an event is fired and a controller listens to it, setting the application's state accordingly. When a property is data bound, Ext JS publishes its changes and other properties listen for these changes.

We're also familiar with events, such as click, select, show, and so on, that are fired from the various Ext JS components. It would seem that as events are being used everywhere in an Ext JS application, we might as well make use of them ourselves!

We can use fireEvent from every Observable class in Ext JS. This allows you to fire a custom event from pretty much anywhere in our application. In previous ...

Get Ext JS Application Development Blueprints 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.