1. #1
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    124
    Answers
    1
    Vote Rating
    0
    JavascriptParrot is on a distinguished road

      0  

    Question Unanswered: Some questions from a beginner... ( get data from .NET webservices/ authentication )

    Unanswered: Some questions from a beginner... ( get data from .NET webservices/ authentication )


    Hello all,

    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:
    1. 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?
    2. 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?
    I don't need a complete example app, just some hints to create this... I hope someone have useful hints and tips for me. I start to get lost in the documentation

    Thanks,
    Freez

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Answers
    3540
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    1. Yes, ScriptTagProxy (or JSONP) is the only cross domain way to do it in ST1
    2. You should really setup a session on the backend if you can. Problem with security in JavaScript is anyone can change it.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    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 services@sencha.com

    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.

  3. #3
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    124
    Answers
    1
    Vote Rating
    0
    JavascriptParrot is on a distinguished road

      0  

    Default


    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?