How to connect online DB Xamarin? [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
please tell me how to retrieve a data from online database(table)?. I just created a table in enter link description here
And I made a SQL database. And can anyone tell me how to retrieve a data from that?

It is strongly advised for you to not directly connect to a database straight from Xamarin for (at the very least) 2 distinctive reasons:
1. Your credentials for the database will be in your app code, meaning anyone can just decompile your app and read your login info - huge security risk.
2. By connecting to a online database straight from Xamarin you'll most probably overload the database server (they allow only a small number of connections).
Usually when you need data from a database you work with an API that you build yourself. For example A php site, or an ASP.NET web api.
Xamarin communicates with your web site (e.g. www.yoursite.com/api/getinformation). This way your credentials are safe in the website, and your app connects only to your site, which is better because you can cache information there, preventing an overload on your site.
Reading material that will help you:
Xamarin forum link to php+mysql+Xamarin
Consuming REST-API's with

Related

Best way creating a mobile app and connecting with a database [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm trying to find the best way creating a mobile application, and connected with a cloud database(or server).
So my first question is: Is it good practice to communicate directly into a database from a mobile app?
If yes, which is the best database for this work? Azure? Oracle? Firebase...?
If no, which is the best service to communicate first? And which protocol?
What is the most recommended way? Does it matter what os(windows?mac?) my server will use?
The best approach if to build a REST API to communicate with your server. But if you don't want to do that, you should look for Firebase. Firebase is one of the best platform to build mobile and web application really fast. It provide you with Authentication, Real-Time Database, Storage, hosting crash reports and many more. Using firebase, you can set security rules on who can write to you database thus it eliminate the risk of unauthorized access to the database.
Also keep in mind that, if you use firebase, you should structure your db in such a way that the number of read and write requests are as minimal as possible, as firebase could be a bit expensive if not used properly.
Its better to build a api in between. Doing queries in your app is kinda risky.
You could use a nodejs framework for this e.g. Sails.js or Express.js
For a cloud database, Firebase is a very easy to implement and work with Database. There are plenty of information resources about the setup and work process.

Is it possible to receive and send data to mysql from and to android firebase using visual studios [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to create an android app for a project using visual studios(C#). The app is based on a computer system that uses mySQL for the database. Is it possible to collect data from the database and send it to the app and vice versa, if so please help. If not, what should I do.
The program saves sport fixtures and results to a mySQL database. I know it is not possible to link mySQL DB with Firebase, but there should be a way to collect the the info needed.
Maybe you can (I assume you are using xamarin to develop android app) by downloading dll or driver to connect to mysql server but this practice is very discouraged. Ask anyone and they will told you to use webservice to bridge your app and database. But if you really really want to connect directly to your mysql database, you can use this nuget package.

Synchronization of data between web & C# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have created a web system to display a timetable of teachers.
Teachers have a desktop application (used C#) in their laptops with the same system as web system.
THE CASE IS;
- When the teachers connect to Internet they can fetch the timetables allocated for them.
- Teachers are allowed edit the timetable using their desktop application.
- They must have the ability to sync it to the web system when Internet connection is there.
PROBLEMS:
- I have no idea about how to sync these updated data to the online database.
- How can I temporarily store the fetched , and (or) edited data in the desktop application without creating a temporary database?
- Is there any technology/ plugin to do this task easily?
IMHO, the best option would be to have a local store that can store the application data and sync up with the server whenever the internet connection is working.
The mode would be a database, however, a secure file system also sounds fine.
There is a great deal of thought process involved with using the offline sync model. There should be a conflict check with the server before any data gets overridden to the db. Also, the client app should not loose data between restarts.
I would suggest that you decide on the right approach to sync data, prepare and review the process and consider Various algorithm's for the sync. In case of any specific questions, please post your questions here.

Using iOS for existing .Net MVC database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I currently have an MVC 4 app running on a Windows Azure website. Some of the users need to use the app, but may be at a location without internet access. The goal is to have an iPad app with offline capability, and will push the changes to the Windows Azure database when an internet connection is established. I am in the planning process, and I have questions about how both apps can use the same database concurrently. When I create a Windows Azure Mobile Service and use the same database the Azure dashboard does not show the existing tables used by the MVC app. Is it possible for both the iOS app and MVC 4 app to use the same tables, or am I going to have to go a different way? Thanks.
You would have to write web api against your database,its very easy to Write Web Api 2 that can easily communicate with any sort of device or application because it is HTTP based.I personally have done this. Web api returns xml or JSON based data you can use this to populate your local database in your iOS Application.
You can also implement some logic to save data back to the database when you got connected to the internet.
The iOS app should absolutely not connect directly to your database. I actually don't think it's possible through the iOS SDK to do that if you wanted to, anyways, but just in case: don't.
Instead, your iOS app should connect to an API that you will need to build. The API, alone, will interact with the database. You can also retrofit your existing website to use the API as well, removing database concurrency issues entirely.

Basics of real-time multiplayer game [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to create a simple multiplayer game. As I understand the main principle is to make clients communicate ether directly to each other or to the server. Since I want some game data to be available online on my website, I'm inclined to create database that users will be connected to.
Is this valid?
Is SQL/MySQL good idea to use in such scenario?
Would windows azure be any help?
Please help me. I really need some guidance here.
If you want to store game data for use on a web site, you will definitely want to store it in some sort of database. Just so you know, SQL is a querying language for databases, MySQL is a DBMS (Database Management system) that you use SQL to "talk" to.
However, you certainly don't want to store ALL of your game interaction in a database, as database operations tend to take a long time (at least as far as a computer is concerned). Your server should have some sort of socket (probably TCP) that is talking to all the clients, passing messages and so forth.
The class reading from this socket would raise events or otherwise update the database for the information you want to be displayed on your website. Windows Azure would be a perfectly valid hosting platform for the website/server app, and so would pretty much any other web hosting solution. Some of the socket code could be easier going through Azure, so that may give it an advantage when choosing your host.
Please let me know if I can provide any more information.

Categories