Advice on converting application to web browser interface

I am a full time shareware developer (utility and automation software), and have only worked with Java applications so far. I have no experience with applets/servlets/rmi etc..

Brief description of my applications current configuration:

1) Desktop single user application.

2) Contains 2 separate processes - GUI and Engine (background process) both running on local machine.

3) Engine has socket server and listens for instructions from GUI.

4) GUI Reads from/Writes to Settings files.

5) GUI tells engine (via simple socket strings) to read appropriate updated setting file.

6) Engine - Reads from setting files

7) Engine Runs tasks periodically using inbuilt scheduler - Writes task output to Log files

8) GUI - Reads/displays log files

Some of my users remotely access my application using VPN or PC anywhere etc.. However, many of my users want me to develop a web browser interface from where they can remotely manage settings files and view log files etc. I do not have any idea what this would involve (applets or servlets or RMI etc...).

I am guessing that my current configuration is not conducive to remote management, since my GUI reads/writes to settings files instead of the engine? I would consider creating a browser based interface, since this may eventually allow my Engine to be configured as an application server?

Any advice on the best technology, and best way to reconfigure my application if necessary, for access via a browser is greatly appreciated.

[1557 byte] By [desilvama] at [2007-10-2 10:17:03]
# 1

Why not just run your "engine" on some other computer? Then that other computer would be the server and you wouldn't have to do much rewriting. I see you have already noticed one of the changes you would have to make. You might also have to change the engine to be multithreaded, so it could communicate with more than one of the GUI applications.

DrClapa at 2007-7-13 1:42:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Did you think about using the existing application in the applet? Thus you can reuse almost all your GUI code. The only thing users have to do is to download and install Java plug-in.
Wordum.coma at 2007-7-13 1:42:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Thanks for the advice. The applet would run on the users machine. The engine would run on the remote machine, and all the settings and logs files are on the remote. Can the applet access the file system on the remote? If this is the case, then I will try an applet first.
desilvama at 2007-7-13 1:42:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

I doubt you can make it in such a straightforward manner. However after you establish the socket connection from the applet to the remote server - you may send any content from the server to the applet (user's browser).

So if you want the user to read some text files from remote filesystem - as long as you have a socket connection you are free to do what you like.

Good luck with that.

Wordum.coma at 2007-7-13 1:42:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

Just to see if I can follow all this, maybe I am over-simplifying?

the GUI

- edits the config

- informs the engine it needs to reinitialise (ie config has changed)

- reads any log files

the engine (scheduler)

- reads the config files

- generates logs

How complicated is the user interface? Can you do it simply in a web page? One thing to bear in mind is that you do not have quite as much control over the "thin client" interface as you do with the "fat-client" application.

How is this for a flexible approach?

Write a data access layer to load/save settings.

Basically, design model object(s) that encapsulate all the info you need to save in your settings files. Your UI and the data access layer (load/save functions) communicate via these objects.

Then you can put any front end you like on it. Your current desktop front end, an applet - even a jsp/servlet one.

For instance with a jsp/servlet approach (the one I know best)

- write a JSP page that prompts the user for the data

- write a servlet that reads the user response, puts it into your model object, and passes it to the data access layer to save.

OR

with your current UI

- pull the data from the UI - populate it into the model object

- pass it to the data access layer to save.

It will get you going in the right direction, and won't commit you to any one path.

Just some thoughts anyway.

Cheers,

evnafets

evnafetsa at 2007-7-13 1:42:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

Hi evnafets,

Thanks for the input.

1) Yes, you have the configuration described correctly.

2) Regarding user interface: My new version due this month looks similar to windows explorer (has JTree + JTable in a split pane)

a) This is needed since I have task and schedule data stored in two directory trees, (as simple property files in the users local file system.)

b) I also have settings files (simple property files) in a settings folder which are configured using simple JDialogs or JFrames

3) I do not anticipate replacing my desktop application fully with a web based system, so both local and remote modes are required. I agree that I need to have "data access" layers for the tasks, schedules, and settings, as well as receiving/viewing logs. This way I would be able to switch between my current local mode or remote mode easier when needed.

thanks again for the input

desilvama at 2007-7-13 1:42:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...