Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    118
    Vote Rating
    5
    subimage is on a distinguished road

      0  

    Default Sencha 2 "child store" or "sub store"

    Sencha 2 "child store" or "sub store"


    Just had a revelation when it comes to data stores inside Sencha Touch.

    I was treating stores as a central repository of data I've loaded from the server, and used those same stores to populate my lists and data views. I was doing this because I was under the impression that I was saving memory and resources.

    Problem was - I was seeing a lot of my views slow down, because I had to filter each store on show of the view. Another problem I was running into was looking up items in the store when I had filters applied. This was quickly becoming messy.

    It took me awhile, but I realized that I should have stores for each view component, and simply populate them with data I'm keeping in "central stores". The stores for each view can then be filtered & sorted without causing item lookup issues or performance problems.

    Taking a page from SQL I came up with the idea of a "ChildView" store to use for my lists and other data views. Set a parentStore on the ChildView, then you can filter away at the ChildVIew without effecting your central data.

    You can even set a "queryFunc" to restrict the type of data that gets pulled from your parentStore. This data is kept in sync by watching the events on parentStore, and reloading it as items change.

    https://gist.github.com/3781077

    Would love to hear feedback on this, and hopefully it helps someone having the same problems I was.

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Posts
    117
    Vote Rating
    9
    Bunchofstring will become famous soon enough

      0  

    Default


    Interesting work! I am struggling with similar issues in my app, and I have two questions for you:
    1. How does your solution compare to https://market.sencha.com/users/24/extensions/52 ?
    2. If a record is present in multiple stores, does a record update reflect in all stores?
    #2 is important because your code seems to ensure that record updates in the parentStore propagate to the childStore, but the reverse scenario doesn't seem to be supported.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    118
    Vote Rating
    5
    subimage is on a distinguished road

      0  

    Default


    Quote Originally Posted by Bunchofstring View Post
    Interesting work! I am struggling with similar issues in my app, and I have two questions for you:
    1. How does your solution compare to https://market.sencha.com/users/24/extensions/52 ?
    Ah man, wish I would have seen that before I wrote this... It looks like it does pretty much the same thing. Although I like the way he instantiates the views on the store itself. Cool idea.

    If a record is present in multiple stores, does a record update reflect in all stores?

    #2 is important because your code seems to ensure that record updates in the parentStore propagate to the childStore, but the reverse scenario doesn't seem to be supported.
    No. You should just update records in the main store. I haven't found a scenario where this is necessary right now.

Thread Participants: 1