[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Suggestions needed for communication between Java swing based rich clients and Spring-based application server

Posted on 2011-03-16
7
Medium Priority
?
921 Views
Last Modified: 2012-05-11
Hello experts,

I am planing a redesign of a (Delphi) client-server application to java ee 6. I would like to use Spring 3 / Hibernate as a middle tier. The middle tier should serve several types of clients, mainly rich desktop clients, but also mobile devices and keeping the possibility to add browser-clients later based on a single middle tier code base.
I am planning to use Swing-based Desktop clients.

My question:

What communication type would you suggest for rich desktop clients? RMI?
Is it wise to consider the desktop client as "just another type of client" that communicates with the middle tier like any other client.

This looks clean and nice on an architecture blueprint, but is it practical? Or should I use some more sophisticated construction especially for rich desktop applications? For example to keep up a nice performance?

I read that the best remoting strategy is "not to use distributed objects at all" (Martin Fowler)...

What are your experiences? Suggestions?

Many questions, hope my problem is clear for you.
Thanks a lot, Daniel
0
Comment
Question by:waeberd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 17

Accepted Solution

by:
Dejan Pažin earned 1800 total points
ID: 35146058

>> What communication type would you suggest for rich desktop clients? RMI?

We use EJBs - mainly stateless session beans. It works great with remote Swing application and Hibernate as persistence. Of course, you have to watch out for performance bottlenecks (lazy loading with Hibernate, caching objects on client side), but once you get that done, the structure works well.

>> Is it wise to consider the desktop client as "just another type of client" that communicates with the middle tier like any other client.

In a sence of remote client, yes. The web client tends to use much of the Hibernate session and lazy loading stuff.


>> This looks clean and nice on an architecture blueprint, but is it practical? Or should I use some more sophisticated construction especially for rich desktop applications? For example to keep up a nice performance?

That is a good approach. The performance bottlenecks are on the lower level, where you have to have correct solutions for them. Like I said: lazy loading on Hibernate and caching objects on the client side.
0
 

Author Comment

by:waeberd
ID: 35146165
Thanks Dejan (again :-) ).

How do you manage the "caching objects on the client side"?

By relying on EJB-mechanisms?

Regards, Daniel
0
 
LVL 17

Expert Comment

by:Dejan Pažin
ID: 35146230

In the end it turned out that the most simple caching works best in my case. I never found a real library for caching Hibernate objects on the client side, so I designed the simplest possible caching - whenever I need an object of some class with a given id, I check if I already have it in the client side map.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Assisted Solution

by:grouper15
grouper15 earned 200 total points
ID: 35146337
Hi waeberd

I suggest you go for web and mobile clients and also use web clients where you needed desktop clients. Desktop clients are only preferable if you need to communicate with peripherals or do I/O on the client side OR if you want to have substantial caching on client side or thick clients.

If your client is thin i suggest you go for presentation tier implementation in web and later on for mobile. it saves you a lot of time and cost.
0
 

Author Comment

by:waeberd
ID: 35146427
Hi grouper15,

Thank you for your suggestions.
Our clients are rather "thick":
It's a GUI-heavy planing and scheduling application that doesn't really fit well in a browser.

Now it's perfectly possible that this is my biased opinion, as I am working on this client-server application for years now.

But our strategy is to deliver "GUI-heavy rich clients" for the planning users while keeping the potential to add mobile / web clients later on a common middle tier.

So I would go for a swing-based rich client for desktop (using for example JIDE component packs etc) communicating to a middle tier based on Spring / Hibernate.

Would you still use a web client?

Thanks again,

Daniel
0
 
LVL 17

Assisted Solution

by:Dejan Pažin
Dejan Pažin earned 1800 total points
ID: 35146521

>> Would you still use a web client?

I would just like to add from my experience, that this is a crucial and very common question. We decided for the web client in one case and the cost of the decision was very high - a simple functionalities which are part of Swing for 10 years, are only emerging now on the web. That means they are difficult to implement, work slow, have bugs...

You should decide based on what you really need. If you need web, then go for it, if you need very intensive gui, then Swing wins hands down.
0
 

Author Closing Comment

by:waeberd
ID: 35152401
Thank you folks.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question