1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    31
    Vote Rating
    0
    batman3000 is on a distinguished road

      0  

    Default What's the point of a store now?

    What's the point of a store now?


    If I recall correctly, in ext js 3, the record was the equivalent of a datastructure---it held a model of the data and also the data itself. The store was the equivalent of a DAO---it has methods to load, save, delete, update data. It was an intuitive analogy.

    In ext js 4, the model also has DAO methods... so I'm struggling to understand why this change was made.

  2. #2
    Sencha - Support Team
    Join Date
    Mar 2012
    Location
    Lawrence, KS
    Posts
    281
    Vote Rating
    35
    greg.barry has a spectacular aura about greg.barry has a spectacular aura about

      0  

    Default


    Moved to Discussion.

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,000
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    A store is a container for a group of records, so for example you will bind a store to a grid/tree/view, not a single record. It also has methods for doing various "stuff" to the groups of records (filtering, grouping, sorting).
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,417
    Vote Rating
    201
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    If you want to listen to events you might want the model in a store, too, since the model itself doesnt' have events tied to its save/load/etc operations.

Thread Participants: 3

Tags for this Thread