This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java to Java or Web Service

 
Jimmy Ruts
Greenhorn
Posts: 10
Eclipse IDE Java Mac
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jimmy Ruts
Greenhorn
Posts: 10
Eclipse IDE Java Mac
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic