PDA

View Full Version : Posting Huge amount of data to .net server from sencha touch Application



Sameer Khan
3 Jan 2012, 8:55 PM
Hi, Can any one help me how to post huge amount of data to .NET sever in JSON Format usign JSONP ?

If any one provides solution , really it will be appreciated....

Thanks in Advance

mitchellsimoens
4 Jan 2012, 6:36 AM
The parameters are url encoded and it will be a GET request.

gizmoboy
21 Jan 2012, 10:36 AM
Mitchell,

Is there any way to use a POST with the touch library calling a third-party service?

We have a collection of objects, and right now, we're iterating across them making a jsonp call for each object, but it would be better to be able to post the entire collection as one jsonp object (but it's more than 2048 characters).

mitchellsimoens
21 Jan 2012, 10:40 AM
Mitchell,

Is there any way to use a POST with the touch library calling a third-party service?

We have a collection of objects, and right now, we're iterating across them making a jsonp call for each object, but it would be better to be able to post the entire collection as one jsonp object (but it's more than 2048 characters).

JsonP is always going to be POST.

gizmoboy
21 Jan 2012, 10:41 AM
I was under the impression that jsonp is a GET normally...

If that's what you meant, is there a best practice for submitting with Sencha libraries a large collection of objects to a third-party server for processing in a batch?

mitchellsimoens
21 Jan 2012, 10:55 AM
I was under the impression that jsonp is a GET normally...

If that's what you meant, is there a best practice for submitting with Sencha libraries a large collection of objects to a third-party server for processing in a batch?

I'm sorry. What I was thinking an what I typed were two different thugs. Yes, JsonP is purely GET

gizmoboy
21 Jan 2012, 11:23 AM
What is the best practice in Sencha Touch for submitting a large collection of objects to a third-party server for processing in a batch?

mitchellsimoens
21 Jan 2012, 11:34 AM
The only way to send an ajax call to a different origin is via JsonP. This is a browser restriction. ST1 doesn't support CORS so you can try to achieve that but it may not be the easiest.

gizmoboy
21 Jan 2012, 11:44 AM
Is CORS supported in ST2?

We're going to try it on our next rev of our app once it gets into late beta.

We've done a ton of workarounds in ST1 for our Android app, and I hear that ST2 resolves many of them.

mitchellsimoens
21 Jan 2012, 11:48 AM
Is CORS supported in ST2?

We're going to try it on our next rev of our app once it gets into late beta.

We've done a ton of workarounds in ST1 for our Android app, and I hear that ST2 resolves many of them.

It will be. Currently no but it is a priority. Ext JS 4 got it in 4.0.7 (last stabile release) so it will make it's way over.