Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrating a 2-tier Java application to...?

We currently have a 2-tier Java Swing application sitting on top of MS SQL Server 2005. All the business logic is in the database. The client is quite old (and not very friendly), and for reasons of performance and scalability, we've already started porting some services to a middle tier in Java.

However, we still have a number of short and long term goals:

Pick a technology stack for a new front-end

This isn't easy - I can see everything from a web app at one end of the continuum to a traditional desktop app at the other being viable choices. The current front-end isn't really complex (mostly form-based), so I can see web/AJAX fitting, but it's an area where we don't know what we don't know.

Stacks on my list are:

  • Eclipse RCP, Netbeans RCP
  • Flex/Flash, Silverlight, JavaFX
  • Pure Javascript frontends (Sprout Core, Javascript MVC, ...)
  • Java-based Web frameworks (Wicket, JSF, ...)

Find a way of making the current application perform acceptably in a remote situation

We have some clients who resale our app to smaller clients and need to be able to remotely deploy it. Due to the 2-tier nature of the current architecture this leads to terrible performance (for example, calling a stored procedure that returns 18 result sets). We've used a Citrix solution in the past, but no-one likes that approach. Tunneling JDBC through port 80 also sounds like a bad idea. I was starting to wonder if there's anything that could use a X-Windows like approach to remote just the GUI part.

like image 729
SteveD Avatar asked Sep 05 '10 17:09

SteveD


3 Answers

To simplify development and leverage your experience in Swing consider using Vaadin for your frontend. It is a Java framework for building modern web applications that look great, and perform well. All the code is written in Java and looks very similar to Swing.

As far as overall application architecture I would advise multi-tier, service oriented architecture. The best way to do it is by using Spring framework with Hibernate for database access.

like image 87
Eugene Ryzhikov Avatar answered Sep 30 '22 14:09

Eugene Ryzhikov


If you want to easily redeploy your application, for an update, security reasons, etc. and if you want your application to be it to be accessed remotely, you should really consider a web based front end.

Plus, this way, only one app, your web app, will handle connection to the database, so no JDBC tunneling or whatever.

Concerning the best framework, it depends on your team knowledge, the way your application will be used (more or less javascript), etc.

like image 39
Colin Hebert Avatar answered Sep 30 '22 14:09

Colin Hebert


We've just gone through a very similar evaluation process as we're migrating a legacy application.

For us the biggest deciding factor in what front-end framework to use was the prior knowledge of the development team. We wanted something that everybody would be comfortable with immediately. We had a couple of the senior developers that have worked with X or Y, but the framework that everybody knew was Swing.

In the end we decided on the NetBeans platform using RESTful webservice to communicate with an EE server.

As a bonus you can get your NetBeans platform application to deploy as a Java WebStart application, which means you get the benefit of not having to worry about individual installations.

like image 28
Tim Sparg Avatar answered Sep 30 '22 14:09

Tim Sparg