Web application and mobile application - java

I want to ask if im using ruby on rails for my web application, what language should I make mobile version(or custom mobile version) of the accordingly my web application?? I need to use JRuby or ?? use Java instead? what is the suggestion that can be combine this two that work together?

Assuming you want to use the classical "HTML mobile web app", the answer is this:
You should ship HTML-only to the users. All communication between the mobile app and the servers should be via an API (JSON is a decent choice for the API protocol, and it's easy to implement in Rails).
You can create the HTML in any way you please - e.g. by compiling .erb/.haml templates in rails.
But on the finished app, you should optimally only have index.html, styles.css and scripts.js.
You can ship an html web app via PhoneGap

Related

How to make a mobile app using HTML CSS and JS?

I am planning to develop a mobile app using HTML CSS and javascript.i plan on storing data in a local file instead of a database.how can I develop this? any ideas? The app will run in the browser of the mobile device. (this eliminates login)
The concept of the project is good.ive also designed the UI.
I think you're talking about making a website with a javascript app in it. Mobile apps are made with swift for IOS and android apps are made in java or c++.
There are programs that will take your website and put it inside an application container (mostly for android) but these programs are not recommended.
I would recommend learning swift or Java or c++ and make an app or using your html/css/javascript knowledge to make a web application.

How to create a desktop app for the existing web application?

Well, I've tried to do some researches before creating a question but only a little has been found.
Basically, I have got a Spring-based web application. Apparently, you can navigate through web application using HTTP requests and URLs. If you want to edit a user you do a GET request /users/edit/{id} and a new page appears. Then you make some changes to the user and do a POST request /users/edit/{id} and let's say the main page appears.
So, now I need to create a desktop application which can do the same things.
Do I need to rewrite the whole app to port it on the desktop? Is it possible somehow to do sort of HTTP requests from the desktop app to the server, then get a response and process it? Or perhaps there is a proper way to do it?
I feel like it's a big topic but I only need you to point me in the right direction as I'm lacking experience in creating both desktop and web applications together (I'd say, I have never ported app from web to desktop and vice verse).
Earlier I created a few apps using JavaFX and I want to use it again as my GUI platform for the desktop app.
You can go for a solution like, Electron.
It's a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. It uses Chromium and Node.js. You can develop your desktop GUI applications using front and back end components originally developed for your web application.
I'm just pointing you a way. You can look in to this solution and it's also open-source.
If you were about to develop the frontend from scratch I'd recommend you to use something like Ionic Framework where in the latest beta 4 allows you to write once run everywhere (web, PWA, desktop with Electron, and build native build for iOS and Android).
Basically Ionic is an Angular 7 library/superset that allows you to create mobile apps based on a webview. This webview can be embedded and run on any device in a native way.
Even though the same codebase can be run on multiple devices you can customise the look and feel on each platform and access through Cordova, Electron or Capacitor the native device capabilities and hardware.
If you don't want to rewrite the web client, you can use any desktop framework with the preferred language you want. Any modern language/framework will allow you to make HTTP requests against your backend and get the data through your API.
Honestly, nowadays I'd day that JavaFX is not the best option out there and I'd recommend you to go through the web-based approach.
Good luck!

Same Sencha app for web and mobile

Query is : I have a current web application in place to provide me data in a list which is built using java and ui is built using jsp. I want to design a mobile app in Sencha to perform the same task and simultaneously want it in desktop using Sencha/ExtJs.
Now I am confused in following manner :
Do I need to create separate applications for web app and mobile app?
For the web app I need to load a separate set of files whereas for the mobile app it is different. If the application is one then can I do this?
Also, all the java files which I am using for the getting the list data, should be in same code base or separate?
Thanks in advance.
Sencha is a mobile app development framework based on HTML5 and query. So the controls and views are basically designed for mobile screens. But it does not stop you to display the same content on normal desktop browsers. Although what looks great on mobile may not look that good on a browser and vice versa.
Do I need to create separate applications for web app and mobile app?
Not really, everything can be same, views middleware and even backend. If you can design a UI that may look both on mobile and desktop then you are good.
For the web app I need to load a separate set of files whereas for the
mobile app it is different. If the application is one then can I do
this?
As I said above, except UI nothing should be a concern. If you want different look and feel for web and mobile then just create different HTML files for the said purposes. But you can use the same backend logic.
Also, all the java files which I am using for the getting the list
data, should be in same code base or separate?
Generally dynamic web applications fetches the data from backend servers using ajax/http service calls. You may manage the code in a single project or can divide it in logically smaller projects for better management. Maven should be a good choice to manage your projects.

Implement Android/iPhone App on a Website page

Okay, so I'm currently looking to see if this is doable so I can hire a programmer. Can I implement let's say a messenger app that is on Android and iPhone just like kik messenger on a website, so the app would be available on the PC online too. If so what language(s) would complete this task? Thank you.
This is not possible using native Android/iOS languages.
These languages are designed to work on mobile devices, not on the web. This means you cannot just embed the source code of a mobile application into a web page.
You can however create a a web version of your application (depending on the complexity of the app). For example: you could create a web version of the mobile app using HTML, JavaScript and CSS. You could also (although slightly dated) create a Flash application and embed it in the browser.
Web apps are becoming more and more common with the rise of HTML5, CSS3 and JavaScript. I recommend this book on building web apps: http://www.amazon.co.uk/Beginning-Web-Applications-HTML5-JavaScript/dp/1430240806

Flex, Java or AIR for local application

I don't know really well the diference between AIR and FLEX, i do with Java tought,
My question is that I want to build an application to run in local mode, but maybe in the future I want it to be available trought the web,
The basic sequence diagram is the following:
So I want the client to connect to a server for login information, and for storing some data, and I don't know wich one of the three technologies is the best..
Can you help me?
Thanks!
Flex is a platform for creating client-side applications. AIR is a "wrapper" to run Flex applications on desktop instead in browser. It gives you some possibilities like access to local file system.
Use Flex for client side and decide if you want it to run in browser, like a web page, or install on desktop with AIR. Don't use Java for user interface if you can use Flex.
Use Java for server side application. You may be needing something like BlazeDS or GraniteDS for Flex-Java AMF communication.
I think you can use FLEX technology.
because FLEX can create both AIR and WEB Application.
Currently you want to do desktop application that means run in local mode so better option is to use AIR application and then when you want to change to WEB than its also very useful to you and you can easily convert the Desktop Application into WEB Application.
Have a Nice Day...

Categories

Resources