aspose file tools*
The moose likes Java in General and the fly likes Java to Java or Web Service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java to Java or Web Service" Watch "Java to Java or Web Service" New topic
Author

Java to Java or Web Service

Jimmy Ruts
Greenhorn

Joined: Aug 28, 2012
Posts: 10

Hi,

Currently at work we have a big discussion about what technology we should use for the web part of our project.
We use a Java backend for our business logic and will work with an application container.

We will also provide a WEB GUI to present our users with a web interface.
No here is where the discussion breaks loose.

Part of us wants to use a Java framework for the GUI, basically because we use Java for our backend and because we are setting up an application container, so it seems logical for us to build a Java front end upon a Java backend, so we can pass around objects, set up the security in our container etc.

The other part wants to build a complete GUI upon web services we will provide.

Now I want to ask the question, which is better? And more important why? Because I will have to give details as to why to choose one over the other.

Thanks for reading this and already thanks for the ones trying to help.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14269
    
  21

So if I understand this correctly, the choice is between a GUI which directly exchanges objects etc. via for example RMI, which means it would share at least the source code of the classes that are exchanged with the back-end, or a more loosely coupled system where the interface of the back-end consists of web services?

It depends on a number of factors. If you use for example web services for the interface to the back-end, then the front-end and back-end will be more loosely coupled, and it would be easier to develop a different front-end that isn't necessarily written in Java.

What kind of data do you expect has to be exchanged between back-end and front-end? Is it a lot of data, or not so much? Large, complex objects? How important is performance?

I'd be inclined to use JAX-RS, Java's standard API for RESTful web services, and define entry points in the back-end for that, and use JSON as the data format for the data that's returned by the calls in the back-end. But that's without knowing any of the details of your specific application. RESTful web services and JSON are simpler and easier than the old-style SOAP / XML web services.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Jimmy Ruts
Greenhorn

Joined: Aug 28, 2012
Posts: 10

Jesper de Jong wrote:
What kind of data do you expect has to be exchanged between back-end and front-end? Is it a lot of data, or not so much? Large, complex objects? How important is performance?


We will exchange some complex data between frond and backend. Currently we are using SOAP for our GUI but it really becomes a very complex mess because application logic is also taking into account when building up the envelope.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java to Java or Web Service