-
14 Oct 2011 5:20 AM #1
Where do proxies go in MVC structure?
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?
-
14 Oct 2011 6:59 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 4
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.
-
14 Oct 2011 7:05 AM #3
-
14 Oct 2011 7:19 AM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 4
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.
-
14 Oct 2011 7:20 AM #5
-
17 Oct 2011 11:58 AM #6
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/
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-868
in
2.0.


Reply With Quote

