16 Nov 2011 6:18 AM #1
Unanswered: Some questions from a beginner... ( get data from .NET webservices/ authentication )
I just started with Sencha Touch to develop a mobile website. I's do some research and reading online forums and tutorials but I don't know how to do some things:
- I need get data from a .NET webservice, it is hosted at another domain. I only can use the ScriptTageProxy or is there are better way?
- I have to create a application with a login form, only that form is visible for everyone. The other views are only for logged on users. After hit the logon button, I check the credentials to do a call to the webservice, after returning a positive result I need to set a variable LoggonOn to true. But what is the best way? Global var or using the local storage? And what is the best way to prevent the secret views being visited by anonymous users?
17 Nov 2011 12:22 PM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Mitchell Simoens @LikelyMitch
- Yes, ScriptTagProxy (or JSONP) is the only cross domain way to do it in ST1
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
22 Nov 2011 12:13 AM #3
Thanks for your response. About the authentication, when I use the constructor of a class to check the user rights it is always possible to fake the JSON result with tools like firebug. I think the best way is to use a PHP file for each step. What do you think?