简体   繁体   中英

options for windows phone database?

Well, I am not very good with c#.net thus I am really confused about the database that I should use. I am trying to build a windows phone app that can communicate with the SQL database that I have online. I have asked some people and they have suggested me to write an API for the database so that I can generate a JSON/XML data from it and use it in my windows phone app and other way around.

So, here are some of my questions: 1) Which Database should I use for my .net website so that my windows phone app can communicate with the database as well?

2) If I have a Database then should I make an API for it, so that I can help it send JSON data to the mobile app and receive it as well or is there any better option for this?

I couldn't find a proper answer for these questions anywhere. do let me know the best options available.

Thanks in advance!

The choice of database is completely yours and depends on the type of application you want. You must never access your database on the server from an application directly. Make necessary APIs to do that for you for security reasons.

Having said that, you can look at MongoDB if you are going to work with extensive JSON since it can store, retrieve and process JSON out of the box.

Other than that, any database can be used to serialize data to JSON and send it to your app. Like for example you can use MySQL, and the database adapters will help you return the results to your app in a JSON format.

  1. You can use any database that suites your requirements of website, it will not effect your windows phone app because windows phone will communicate with API's(Web API is the best way) so for windows phone app it is transparent.

  2. Yes, Create Web APIs at server side and call those APIs from mobile to send/receive data in JSON format this the standard and best way to send/receive data.

I would also suggest to store your server side data in windows phone local store(using SQLite or in json files). So that if mobile is not connected to internet your app can still work in offline mode and sync data when internet connection is available.

P:S. As you are developing new windows phone application than target windows phone 8.1(windows Runtime or Universal app) instead windows pone 8 as there are new features and improvements in it. and soon all windows phone 8 devices will upgraded to windows phone 8.1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM