-2

I come from a PHP background and I am going ahead with building a Windows Store App.

I am wondering how would I come across storing data in the cloud on a windows app so if my app requires a user to register and login to access the app how would I store it in a database?

I understand with PHP it's just setting up the connection and using SQL queries to store and retrieve however what is the approach with Windows Apps?

BradleyDotNET
  • 60,462
  • 10
  • 96
  • 117
MzCruton
  • 5
  • 3
  • Are you asking how to store data locally on the device, or in the cloud? – BradleyDotNET Mar 19 '15 at 23:29
  • possible duplicate of [Where to store configuration for a simple .NET application?](http://stackoverflow.com/questions/2172227/where-to-store-configuration-for-a-simple-net-application) – Ken White Mar 19 '15 at 23:31
  • @BradleyDotNET In the cloud – MzCruton Mar 19 '15 at 23:34
  • 1
    Are you talking about a Windows desktop app? A Windows Store app? A mobile app? A web app? XBAP? LightSwitch? – Dour High Arch Mar 19 '15 at 23:35
  • @KenWhite Even that solution wouldn't work for a windows store app, assuming he wanted local storage – BradleyDotNET Mar 19 '15 at 23:35
  • @BradleyDotNET: OK. Pick one of the dozens of similar questions about where to store configuration info (presuming the poster edits the question to make it more specific to indicate that the one I've selected is not appropriate - as it stands now, there's no reason to retract my close vote). – Ken White Mar 19 '15 at 23:37
  • @KenWhite yeah, I assumed he meant windows store apps, then realized its not specified. Waiting on the OP to clarify :( – BradleyDotNET Mar 19 '15 at 23:40
  • @BradleyDotNET So storing in the cloud would not work on Windows Store Apps? – MzCruton Mar 19 '15 at 23:41
  • Sure it does... you just use a web service. Is that what you are trying to create? – BradleyDotNET Mar 19 '15 at 23:44
  • @BradleyDotNET A universal app, for phones, tablets and desktops, would this be a problem? – MzCruton Mar 19 '15 at 23:52
  • No.... see my answer. – BradleyDotNET Mar 19 '15 at 23:57
  • possible duplicate of [How do I interact with SQL in a Windows Store App](http://stackoverflow.com/questions/13354473/how-do-i-interact-with-sql-in-a-windows-store-app) – chue x Mar 20 '15 at 03:22

1 Answers1

2

For Windows Store Apps (both phone and desktop/tablet, truly universal apps aren't available yet) you store data in the cloud the same way you usually would:

Use a web service

That can be a PHP page if you want. Since you are in C#, the recommended way would be to host a service on Microsoft Azure (which can also host your database). You can also host a WCF service on any compatible platform and use that.

That said, any service that you can access will work, and .NET for Windows Store (aka the Windows App API) is pretty flexible in what it will let you do (services, sockets, HTTP methods, etc.).

BradleyDotNET
  • 60,462
  • 10
  • 96
  • 117
  • Is Azure Microsofts version of MySQL Workbench? And do you have any tutorials you would recommend to show how it works? Thanks:) – MzCruton Mar 20 '15 at 01:09