Hybrid View

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-868 in a recent build.
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    127
    Vote Rating
    0
    robl is on a distinguished road

      0  

    Question Where do proxies go in MVC structure?

    Where do proxies go in the MVC structure? Do they get automatically loaded like controllers, views, models, stores, etc... ?

    BTW - From looking at the Kiva example, it appears that custom proxies are manually configured but I really don't understand it. Specifically, I don't understand why the proxy definition/class is in lib/KivaProxy.js. I would think it would be in something like proxy/Kiva.js and that the model would reference it. Can someone please explain?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default

    Proxies are defined directly on the Model or the Store 99% of the time. This is why we don't have a proxy folder. Kiva is an exception as it had to create a customized proxy. It might be worth looking into if it turns out many people are creating custom proxies.

    Can I ask you what you need a custom proxy for in your app? Do you need a custom proxy, or where you just wondering where you had to define your proxies? If its the latter, then the answer is in your model or store definition.

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    127
    Vote Rating
    0
    robl is on a distinguished road

      0  

    Default

    I'm using PhoneGap and want to load contacts from the address book into a store.

    Quote Originally Posted by TommyMaintz View Post
    Proxies are defined directly on the Model or the Store 99% of the time. This is why we don't have a proxy folder. Kiva is an exception as it had to create a customized proxy. It might be worth looking into if it turns out many people are creating custom proxies.

    Can I ask you what you need a custom proxy for in your app? Do you need a custom proxy, or where you just wondering where you had to define your proxies? If its the latter, then the answer is in your model or store definition.

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default

    I see, yes in that case you would want to create a custom proxy I will discuss this with the team, and see if it's something we can add in one of the upcoming releases. I'm moving this into the bug forum and opening a ticket for it.

  5. #5
    Sencha User
    Join Date
    Oct 2011
    Posts
    127
    Vote Rating
    0
    robl is on a distinguished road

      0  

    Default

    Thanks!

    Quote Originally Posted by TommyMaintz View Post
    I see, yes in that case you would want to create a custom proxy I will discuss this with the team, and see if it's something we can add in one of the upcoming releases. I'm moving this into the bug forum and opening a ticket for it.

  6. #6
    Sencha User
    Join Date
    Oct 2011
    Posts
    127
    Vote Rating
    0
    robl is on a distinguished road

      0  

    Exclamation

    I'm assuming that wiring up custom proxies in a MVC app in ST 2.x doesn't work but that custom proxies should. Right?

    I tried creating a custom proxy following the Kiva example to access the contacts via PhoneGap. My class inherits from Ext.data.proxy.Proxy. The app fails to load now.

    1. Is it possible to create a custom proxy with ST 2.x PR1 ?
    2. Am I inheriting from the correct super class?

    I'm using this ST 1.x example:

    http://www.sencha.com/learn/a-sencha...with-phonegap/

Thread Participants: 1