Backend framework choices for React Native - android

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.

Related

How to make Xamarin Android Apps with Azure SQL Databases

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.

developing an android application with servlet

I'm currently developing an android application. My application allows users to choose a picture from a gallery, add a comment and send it to the server. The server then saves it in database.
Currently I'm using HttpUrlConnection at client side and Dynamic Web Project with a servlet to process on server (I'm using eclipse with Apache Tomcat)
So the questions are:
Is it a proper use of this technology to develop my app. (does it violate any rules? Sorry I'm a newbie)
Does this technology affect anything if i want to expand my app?
Are there any better technologies to use in this situation and is it worth to use it?
No I think it is a better way to develop this. I have also develop a chat based app usign the same technologies.
It doesn't violate any rules. There are many apps in the market usign the same technologies.
Q-3.Are there any better technologies to use in this situation and is it worth to use it?
You can also use php or any other server side scripting language to do the same.
Because when you want to host your java app you may find difficulty for java hosting but for php and asp you can easily find hosting services.
I answer in order:
1- the client is different, the client is recomended create an android application.
2-You need have clear this: Android is an application, the server has to attend petition from android. The conection could be using webservices, API rest, or others ways.
3-Android need Java to be native, in the server side you can use, Ruby, PHP, Java, Python or any server programming languaje side. Is your choice.

Android app fetching Joomla website with DB

My client has Joomla website with plugins (Mosets tree and JSE events) that basically lists business an events. He wants an android app developed to fetch these info. Immidiately what came to mind, is I create php scripts that query the Database and I call those scripts from my app. In my app, I display the information collected.
Another idea that occurred to me, is to enable RSS feed and then I read this RSS feed.
Is my approach above the right approach? Is there a different way or standard way when developing apps that fetch information from the Joomla website backend?
Please note the website is already mobile friendly but the requirement is to create an app for part of the website. Any pointers are helpful
Building one or more PHP scripts that query the db and returns the data is definitely the faster and simpler solution.
If you want to build a more robust / compatible solution, you may extend your set of PHP scripts into a full blown REST API application. In that case take a look frameworks like SLIM or SILEX which are very good at this.
There are more complete and elegant solutions but they are probably overkill for your needs.
Edit: why query directly the database
In theory, it seems to be better to NOT access directly the database, and interact with the Mosets Tree component instead; because in that way you will not have to duplicate any logic.
But in my experience, with a very few exceptions, Joomla components are coded so that it's very hard to interact with them programmatically.
I answered a similar question regarding Joomla RESTful APIs here:
REST API for Joomla 3.0
Basically, I ended up developing a solution which meshes the Slim PHP micro-framework with the Joomla Framework / CMS (requires Joomla 3.4.3+).
Why?
Well, the main reason is that while using the Slim framework would be OK as a one-off solution, I realized that one would still need to develop all the accompanying ACL and access security, not to mention the actual CMS that might store and manage all the important data in the first place.
Basically, I did the work so you don't have to. Yes, it's a commercial component (must pay to download) but I think it's WELL worth it for what you end up getting out of it.
It's brand new, so the service routes in the cAPI ("Constant API") Core package are still limited, but those are being built-out over time (all included in the core package of course). The component/plugin/library package is architected to allow for easy integration of add-on plugins which will introduce new service routes to add functionality like RESTful JSON APIs for MySQL, MSSQL, MongoDB, LDAP, etc. I already use an alpha version of the LDAP add-on in a an enterprise environment, so I expect that to be available for purchase/download soon.
The point of all this is that you can use an existing Joomla site to drive mobile apps (with some development for Mosets), while taking advantage of built-in user management and ACL, along with token auth (via cAPI).
Let me know if you have any questions.

Using Azure to develop website then create native iOS and Android app for it later, what would be good data architecture?

I have built a blog using Windows Azure and .NET MVC.
This was my only experience for web development, so I am still pretty new in this area.
I just got an idea for my second website and I plan to develop native iOS/Android/windows app for it later on.
I am going to use Windows Azure SQL database and .NET MVC again for this, but I wonder if this is good choice for my future development for mobile app as well. Can my mobile app easily get access to data hosted in Azure SQL? If so could you let me know in which way? any suggestion is welcome, thanks!
A service-oriented architecture decouples the back end from how it is displayed.
You can use SOAP or REST services to fulfill each use case.
Come up with a protocol/contract that the services expose and any client that can make HTTP requests can work with them.
Take a look at Windows Azure Mobile Services (http://www.windowsazure.com/mobile). Mobile Services is a backend as a service you can use for your data storage from your asp.net site (from the C# code behind) and then when you're ready to build your mobile apps, you can use the exact same interfaces from the native Objective-C iOS / Java Android / .NET Windows SDKs. This will save you from needing to write the service layer if you don't want to spend time doing that.
Since your comfortable with ASP.NET MVC, I would recommend you build the website in MVC, but then have it call into a service layer that exposes the functions desired using ASP.NET Web API.
This would be an easy fit as you can then build your native mobile app later, and just call the API using JSON as the data format.
Great question by the way!

Android - Connect to MSSQL online database

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

Categories

Resources