Book Image

Mastering ExtJS - Second Edition

By : Loiane Avancini
Book Image

Mastering ExtJS - Second Edition

By: Loiane Avancini

Overview of this book

Table of Contents (19 chapters)
Mastering Ext JS Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a Store


The next step is to create the stores for each Model. As we did with the Model, we will try to create a generic Store as well (in this chapter, will create a generic code for all screens, so creating a super Model, Store, and View is part of the capability). Although the common configurations are not in the Store, but in the Proxy (which we declared inside the schema in the Packt.model.Base class), having a super Store class can help us to listen to events that are common for all the static data stores.

We will create a super Store named Packt.store.staticData.Base.

As we need a Store for each Model, we will create the following stores:

  • Packt.store.staticData.Actors

  • Packt.store.staticData.Categories

  • Packt.store.staticData.Languages

  • Packt.store.staticData.Cities

  • Packt.store.staticData.Countries

At the end of this topic, we will have created all the previous classes. If we create a UML diagram for them, we will have something like the following diagram:

All the Store classes extend...