I just got started with third year in my Computer Science degree and I really loved making ASP.Net websites, but now I am interested in learning Xamarin Android applications and make those applications database to be available as a Azure SQL database.
I've learned to make the Azure SQL Database and use the SSMS to make the tables and develop the ASP.NET locally and deploy them in Azure and I was thinking it might be the same with Xamarin, but apparently, I am wrong. So here are my questions and it will be great if someone could help me with it.
1) Why can't I use SqlConnecton classes inside Xamarin.Android's cs classes?
2) Is there a different approach for me to make mobile apps completely different from ASP.NET Applications?
3) Is it possible to use the same Azure SQL DB for both ASP.NET WebApp as well as the Xamarin.Android App?
Thanks in advance
The best way to do is by Web Services, you can follow this WCF tutorial.
Trying to answer your questions:
1) Why can't I use SqlConnecton classes inside Xamarin.Android's cs classes?
Mobile Apps are not designed for running common Database Engines like SQL Server, Oracle, etc. Because they consume a lot of resources and power. Imagine that you are connecting to any of these tools they would kill the battery in a couple of minutes/hours for sure. That's why if you really want to have an offline DB or something like that you have options like SQLite.
As a Xamarin developer if you must have the DB, I recommend you this package for SQLite:
SQLite-NET-PLC
2) Is there a different approach for me to make mobile apps completely different from ASP.NET Applications?
Yes and no, what do I mean, you can use WCF (Windows Communication Foundation), Generic Handlers, etc. The main idea is that you need to create a Web Service that is a "link" that you can access from your Apps for example:
The Wikipedia API:
This example returns you a JSON of Stack Overflow and you can do the same with any online DB you return the table/view that you want in JSON/XML format, you transform the answer into C# classes with a tool like Json2CSharp
Finally, you can deserialize the JSON to C# with a library like JSON.NET
3) Is it possible to use the same Azure SQL DB for both ASP.NET WebApp as well as the Xamarin.Android App?
Yes, you can. Many web sites and applications share the same DB, you just need to consider the Web Service approach in order to connect, update, delete, etc. From your app.
Related
I want to develop an android app that is based on server-client system. I want to develop both backend and android client. It's 2020 and there has already many frameworks developed to provide server side missions to programs.
My question is
What are the trending backend technologies in android world (from database to REST API frameworks), with reasons? For now, I have 2 framework/library on my mind. Spring and Node.js. Google Firebase are also in that list.
I also have another question
Suppose that I made a backend project and want to deploy it on a real server (development made on localhost). What choices should be made ?
For example, I made my development on Mysql and Springboot framework, should that server provide support for MySql and Java ? What is the procedure to deploy both database and backend application ?
Thanks.
You can develop web server using ExpressJs in Node, or using Django/Flask in Python, using golang, PHP Laravel or Codeignitor and many more. It all depends on which language you're already familiar with and which is the best for your use case. Frontend framework has very less to nothing to do with which back end to chose.
Answer to second question.
You can deploy your app in AWS, DigitalOcean, GCP etc. They'll provide VPS and other options to host your application and will make it accessible to outer world using IP or domain, however you configure it. You can install and self manage the DBs in the virtual system you have or you can use Managed database solutions provided by cloud platform, which has a pricing but is easier to manage.
PS: Both your questions were very broad and more of a opinion based answerable questions, it's better to ask these type of questions in platforms like Quora where you can get very detailed answers. Anyways, good luck with your project :)
I have worked on these three stacks
1) React-Native Express API MongoDb
2) React-Native Firebase
3) React_native Django
If you are comfortable with python and planning to create a large scale product, Django Backend could be a way to go. React_native Firebase is perfect for fast prototyping. If you are using a platform where you need to do heavy db query search, firebase data storage can be a poor choice.
I have no idea how does applications like Amazon, Flipkart etc work. They have both android application and website. How does data between both web and Android synchronise?
Do we write separate codes for building android app and website? If yes then in what language we build the website so that it's compatible with the android application.
And how to build the database for the same.
If answer is no to the above question, then how exactly do we proceed to build such Android and web application.
I am new to this and want to learn how to build it.
In general, web sites are built with web technologies such as JavaScript, HTML, and CSS, but there a many different frameworks and libraries in other languages (such as Angular, which is written in TypeScript) that can also handle the creation of web apps. In comparison, mobile applications for Android and iOS are written it Java/Kotlin or C#/Swift, respectively. There isn't really a clean, native way to create a single app for web and mobile platforms. But, the data that backs both of the platforms is the same.
How does this work? The data is hosted on what is called a backend, a server that has the information that you want to display to your users. Typically, the client app can get this information with an HTTP request to the backend, and the response will be the data formatted in a JSON string. Data is stored in the backend in a database. There are many databases in use today, but some more popular ones are MySQL, MongoDB, and SQLite, and each of them have their advantages and disadvantages. As you get further along in your development cycle, you will need to choose the tools that work for you.
Websites (and relative applications) like Amazon have very complicated systems behind what you see on the screen. Of course they have different code for either application and website. Usually, in small projects, you can create the mobile android app with languages like Java or Kotlin and websites with html, css and Javascript. But when it comes to get together data between an app and a website, you will need to write backend software, which is not so easy, for example in php and then create a database to store the data (with mySQL for example). Then you can access your data from either app and website and decide what to do with it. I suggest you to learn one of these technologies at a time. Trying to learn them all together will only create misunderstandings.
Hope I've been useful.
I'm able to create MVC5 .Net applications for the web. I just need clarification on how I can proceed with developing Android and IOS apps. I was considering Xamarin, but I've decided to go with Android(Java) and Swift. My question is can I use .Net MVC5 with the mobile platforms for the backend?
AND followup question and this might be dumb, but I"m just not sure, If the answer is no to my first question, then if I were to learn to use SQLite to push data to database, can I push it to same database that was initially created with .Net MVC5 if the database was hosted on a server or would that database be restricted to being manipulated with the .Net Web API only? Basically can I use .Net and SQLite on the same database, but different platforms?
I have a question about which database I should use for my android and iOS apps. I have not messed with servers before so please excuse my ignorance.
Anyways, I am developing apps for a website that doesn't have a mobile version. The website has a MySQL database and uses phpMyAdmin as a control panel.
I need to figure out how to hook into the server. I know that java provides full support for SQLite databases and I know that they server hosters can install SQLite on the server for me.
What do you all think? MySQL or SQLite?
You should be using SQLite for any local databases to the Android app (CoreData for iOS).
Any interaction with your websites MySQL database should be handled through API calls.
There is a good PHP framework called Slim PHP that will make building your API extremely simple. It's documented very well. Slim PHP doesn't offer any form of ORM so I'd also recommend integrating with Idiorm/Paris, again their documentation is rather good so you shouldn't have a problem piecing this all together.
Of course you can opt for a larger PHP framework that has all of this in one place, such as Symfony.
I'm new to Android programming. I have a website with sql 2008 db, and now i would like to give the users the ability to use their smart phones to enter data to this db.
I was wondering what is the best way to establish it. Since I'm new to it I don't want to build something that's not so professional.
Thanks for your help.
If I were you I would consider two following options:
Have a web application optimised for mobile use;
Pros:
Updates are delivered immediately, as there's no client application, everything is done on the server;
Web application can be used on many devices with a browser and not just Android: iPhone, Blackberry, PC, Mac, etc.;
Cons:
Users need to be online to work with the application;
You can not leverage from the native UI components available to native device applications;
Write Android application that will work with the database via a number of REST endpoints exposed through a web application (again);
The pros and cons are a full reverse of what you had in the first option.
The right answer for me was to use KSoap library. I'ts very easy and works very well.
Here is a tutorial that will show you how to do it step by step.
http://java.dzone.com/articles/invoke-webservices-android