locked
new in mobile develpement, need help!! RRS feed

  • Question

  • Hi this is my first post in this forums, and well i work has a web developer for a company, we have a website made in PHP using MySQL where its like some kind of social network, where you can comment on news, comment on other friends profiles, login, etc., so suddenly my boss wants to create an app for Windows Mobile, he DOESN'T want a mobile website, he wants an app installed in windows mobile that can make the same things the website do, i started creating it in C# using VS2008, i already know C#, but im stuck at the point where i don't even know how am i going to interact with the website, don't even know how to create the login so it can connect to my website, and im not sure if its safe to create a connection directly with the website's database, any help will be appreciated

    Good Day
    Thursday, June 25, 2009 1:02 AM

Answers

  • Hi JuanitoHCPunk,

    You need to create(if not available) web service methods that will accessible through Windows Mobile.
    Once server is ready with web methods  then :

    Right click Project-->Add web reference --> Add service name (say myWebService) --> set  web reference url (e.g. http://www.myServer.com/myService/service.asmx ). then

    create object of your web service :

    objService = new myWebService();

    then call your web method

    bool isLoginSuccess =  objService.Login(Parameter1,Parameter2);

    And do accordingly and call other methods as required.



    NOTE : You should expose the functionality that the Windows Mobile client needs to access through web service.












    Thanks Mohsin S.
    • Proposed as answer by Mohsin S Thursday, June 25, 2009 6:01 AM
    • Marked as answer by juanitoHCPunk Thursday, June 25, 2009 11:10 PM
    Thursday, June 25, 2009 6:01 AM

All replies

  • You should expose the functionality that the Windows Mobile client needs to access through web services.   The client application will *not* have direct access to the database.  All functionality should go through web methods.  Since you are using PHP on the server side I can't give you any information on how you would expose a web service through it.
    Joel Ivory Johnson
    Thursday, June 25, 2009 3:41 AM
  • Hi JuanitoHCPunk,

    You need to create(if not available) web service methods that will accessible through Windows Mobile.
    Once server is ready with web methods  then :

    Right click Project-->Add web reference --> Add service name (say myWebService) --> set  web reference url (e.g. http://www.myServer.com/myService/service.asmx ). then

    create object of your web service :

    objService = new myWebService();

    then call your web method

    bool isLoginSuccess =  objService.Login(Parameter1,Parameter2);

    And do accordingly and call other methods as required.



    NOTE : You should expose the functionality that the Windows Mobile client needs to access through web service.












    Thanks Mohsin S.
    • Proposed as answer by Mohsin S Thursday, June 25, 2009 6:01 AM
    • Marked as answer by juanitoHCPunk Thursday, June 25, 2009 11:10 PM
    Thursday, June 25, 2009 6:01 AM
  • Hi,

    You try to access the data from your php pages by using httpwebrequest and response. It worked for JSP pages. I could access the data from normal jsp page. but lot of parsing will be needed. The same thing you can implement. 

    http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.getresponse.aspx

    or

    As Joel and Mohsin suggested and  you can also make a web service which connects to your database and can access webservice methods.

    Sample:
    http://www.codeproject.com/KB/mobile/weatherinfo.aspx

    Regards,
    Malleswar
    Thursday, June 25, 2009 6:51 AM
  • ok thank you all, i think i'll try with web services

    thank you all for your help

    Cheers
    Thursday, June 25, 2009 3:26 PM
  • ohhh and another thing, is it necesary to create my webservice in php? or can i create it in C#?
    Thursday, June 25, 2009 3:45 PM