Re: Support for both Web and Desktop front-ends [Architecture]
Tom <tom400f@gmail.com> writes:
The issue is you need client and server (where these terms are
used in their general sense) that are agnostic of one another yet
support both web/desktop.
This already is part of the normal MVC architecture:
M does not know VC, but only ?observers?.
VC, however, knows M, which does not hurt here:
One would implement one M with two different VCs here:
one VC for the web, one for the desktop.
Of course, you could call M ?server? and each VC ?client?.
Anyway, our desktop client is swing and uses serialisation to/from
the server. There is no soap/rmi, just sockets.
Actually, a plain Java interface would be sufficient
(or a set of those). A socket is only neccessary for
the web client, not for the Swing client. However, when
the server socket is already there, it might be more
straightforward when the Swing client uses it, too,
but this might sacrifice some performance.
Because all data is just trees, MVC with the desktop is
automatic (you don't have to code that).
(I don't understand this. But never mind.)