Android/IOS vs Java

Asked

Viewed 101 times

2

Suppose I have an android or Ios app

I have a system made in java ee to publish data that will be downloaded from the internet by the application. All this is inside a web server

How do I communicate between system and application?

  • I make HTTP requests directly on the server?
  • I build a web service to communicate system and app?

I have no working knowledge in any of the languages, I just want to understand how development works in theory

  • If I understood what you said, I recommend reading about REST.

  • I’ll make it simple, let’s say you have an app that needs to download an xml, with store location information. This xml is changed by another java system. What is the correct way to download this xml pro application? make a request directly on the server, or create a webservice that asks java to deliver the xml file directly to the application.

  • So André, I’m going to try to be clearer, if you researched about REST (or Restful) you will understand that it is also a data transport system between different platforms and servers. This will probably help you at first, you know?

  • I understand how a webservice works, the question is really about the day-to-day development. If I need to communicate an application and a system in practice this is done through webservices, or usually a simpler form of communication is used as HTTP requests

  • 1

    REST is HTTP communication and its purpose is to fully port data to multiple servers and/or platforms. There may be other ways, such as SOAP, but it’s still HTTP. You do not need to use REST in amplitude, or rather, all methods, using the basic POST, PUT and GET will achieve your goal. The purpose of REST is just to standardize and in some cases increase security through tokens. I say this because generally java web frameworks already have REST support with authentication and tokens. Yes requests can be on the server, but prese by security, using tokens..

  • [edited]... And yes a webservice will help you not only with Apps but also if you need to port the data to websites and platforms that are not yours, if you are going to partner for example. : ) - What will depend on is which web framework you use, jsp?

  • Before you finish, if you don’t mind, which web framework you use, jsp?

  • Yes it is the JSP....

  • Cool, if by tonight no one answers I try to formulate a more complete answer :)

Show 4 more comments

1 answer

1


In short, the ideal is for you to create a REST API and a data representation standard so that both your mobile app and your app can share information with each other. This information can be represented using JSON, since most languages have libraries to read and write JSON files, and it is much lighter than XML.

For information on how to seamlessly implement a REST API, take a look at this link ( in English)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.