tags:

views:

58

answers:

2

We have a client server application for restaurants, both developed on the Java platform. The Client and Server exchange proprietary messages (something similar to REST).

Can I replace the Swing Client with XUL?

+3  A: 

XUL is great for creating rich UIs.

On the other hand, your application language will be javascript. If your communication layer is http, this is works out fine. Otherwise, you will need to build a component that can talk to your proprietary language and call that from javascript.

This would typically be done by writing an XPCOM component in C++ (which is possibly painful) or, more recently, by writing it in python and using pyxpcomext.

HS
You can almost certainly build the component that works with the proprietary protocol in JS, too.
Nickolay
hm.. good point. I guess if XPCOM already has the components for doing the tcp layer (probably does)
HS
A: 

Mozilla provide XULrunner to run XUL applications with code written in Javascript, but there are also other implimentations like luxor, where you write code in Java and it builds the interface in SWT.

XUL is a language for describing UIs. Swing is an API. There are programs that take XUL and generate Swing code.

You can replace your Java client that uses swing with a client written in Javascript or possibly another language that uses XUL, but you don't neccesarily gain anything by doing so.

rjmunro
There's only one implementation of Mozilla's XUL. Luxor uses a different XML-based interface language, also called XUL, but almost no-one means that when they just say XUL. So beware.
Nickolay