I have a legacy tomcat Java application (Spring, Hibernate, MySQL) running on Linux (Ubuntu). I want (need) to build an Android application utilizing the backend database of existing application. Actually it will be just apilot project to test the things. It will do like display a list of information read from database.
I am .Net developer and totally new here.
What will be the best approach to go?
Web app or native Android app?
some service for database access (which, how) or direct connection to DB?
Also, please point out to good resource/books to get me started.
Android application is more like desktop, and you application is spitting out HTML pages. Your options are:
- provide mobile web interface to your existing appliaction
- develop new android frontend, and wrap your existing application with a REST-Service
- develop android frontend and reuse your persistence and business logic layer.
Big question is, what exactly you are developing? DO you need your business logic on the mobile device, otr it can stay where it is ( on server )
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 need to create a HTML page with will interact with Sqlite database. This page and database will reside on an android device. This HTML page will be accessed by devices(PCs) connected to this android device locally. Since I have .NET background with no experience in Sqlite Or android etc, I am clueless as to what technology/language I will have to use. C# won't work I suppose.
Any suggestions? How do I go about it?
You can use the following tools/libraries to achieve what you want:
NanoHTTPD Server: A lightweight HTTP server for Android. You can read more about it on the Github project page. You can either use the bare server and add features like routing, etc. on top of it or use the Nanolets class provided by NanoHTTPD. There isn't much documentation around Nanolets but they are more-or-less like servlets for Android. To know more about them checkout this test file.
Room Persistence library: Room is a lightweight orm for SQLite developed by Google and is a part of the Android Architecture Components library. It abstracts away lots of boilerplate code you would have to otherwise write when using SQLite on Android.
Although, if you are just getting started on Android or are otherwise learning Android I would still recommend bare SQLite framework shipped with Android to know what is actually going on under the hood.
Using the above mentioned libraries, you can create a server on your device that can serve your requests. I would recommend that you develop a REST-like API for your service and interact with the API from JavaScript in the browser running on the PC.
You can use any JavaScript frameworks like Angular, React, Vue or even jQuery to build a single page front-end application to your service, bundle the JavaScript in a single package (using something like webpack) and ship the resulting bundle alongwith your Android app (preferably inside the /resources or /assets directory). You can the serve the bundle from Android device whenever another device connects to it, and then use the API to handle business logic.
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!
I'm working on a HTML5 cross-platform Survey application using jquery mobile, phoneGap , and sqlite database with web Storage !!!!
For Now I'm testing this App on Android Plateform using eclipse .
I'm new to the mobile world , I'm more familiar with j2ee web applications
So i'm wondering what can we call this type of architecture especially that I'm not working with a real server such glassFish ,TomCat .. or even a real SGBD and that everything is on the web browser (I'm using chrome)
Could Any one Help me with this ?
thank u :)
Here is the list of possible styles of architecture but I can't find the suitable one for my case !!!
You're building HTML5 loader apps on multiple platforms, depending on if you are storing your HTML5 locally or pulling it off a server, that's your answer for Server/Client.
You'll want object orient your javascript so you don't pollute the namespace. If you are scripting on the backend, also a good practise... I think object oriented goes without saying these days.
You can tier out your javascript to have a frontend generator, business logic layer, and data layer to handle your transactions with sqlite. Or you could also follow a MVC tiered setup.
If you are pushing data from the device to a central repository (which I think you must), you could build SOA on the server to handle the ingestion of data.
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