Re: What multi-tier components to use
- From: "Danijel Tkalcec" <dtkalcec@xxxxxxxxxxx>
- Date: Fri, 20 May 2005 10:48:12 +0200
Yes. Enterprise Java Beans.
Well, I worked with Java and I didn't like that there were really a lot of
interfaces that I had to keep in sync on client- and on the server-side for
Java Clients to be able to talk to a Java Service. Not to mention that
writing the java client was a p*i*t*a even without this "problem". Anyway
.... being able to use a command-line interface rebuilder with Java, made my
life much easier, even though I still had to rebuild the interfaces every
time I added a method or added another parameter to an existing method.
I also had the "joy" of using some custom-built client/server framework
which mapped each method call to one ID and each parameter inside that call
to another integer ID, where adding a new method or adding a new parameter
wasn't such a problem, but keeping all those ID's was.
I think (I don't want to argue with anyone about this, this is just my
opinion) that the most elegant way of solving the remote
procedure/function/method call is to allow people to pass any structure to a
remote procedure/function/method and to return any structure as a result.
Then, let the procedure itself decide what is good and what's not from those
parameters and let the caller decide if it likes the result. You can always
throw an exception if you don't like the data you receive (which should be
passed over to the caller side). Anyway .. not having to sync the interface
with every change in the parameter list, you could make your new server code
compatible with old clients, while you can still add new features, even if
it's by additional parameters for the same methods being used from your
clients. The "problem" (if you could call it a problem) with that approach
is that there is nothing forcing the client to use the same parameter types
or even the same parameter list as expected from the server. But, as Kim
already said, if you really want to do that (enforce the interface), you can
still define your class which will map your predefined method calls to the
flexible transport model (even use overloaded methods to do that). And when
using interfaces, if your client- and server-side interfaces are out of sync
(this is most likely to happen when you add a method to your existing
remoting class), your client-side code would still compile and "run", but
you would not be able to call the remote methods from the client, since you
would get exceptions (if you're licky, those exceptions would tell you
what's wrong). And every old client would stop working, which could have
been avoided by using flexible structures with careful coding.
Best Regards,
Danijel Tkalcec
.
- Follow-Ups:
- Re: What multi-tier components to use
- From: Lauchlan M
- Re: What multi-tier components to use
- References:
- What multi-tier components to use
- From: Petros Amiridis
- Re: What multi-tier components to use
- From: Uffe Kousgaard
- Re: What multi-tier components to use
- From: Herbert Sitz
- Re: What multi-tier components to use
- From: Lauchlan M
- Re: What multi-tier components to use
- From: Lauchlan M
- Re: What multi-tier components to use
- From: C4D - Kim Madsen
- Re: What multi-tier components to use
- From: Lauchlan M
- Re: What multi-tier components to use
- From: C4D - Kim Madsen
- Re: What multi-tier components to use
- From: Danijel Tkalcec
- Re: What multi-tier components to use
- From: Lauchlan M
- What multi-tier components to use
- Prev by Date: Re: What multi-tier components to use
- Next by Date: Re: What multi-tier components to use
- Previous by thread: Re: What multi-tier components to use
- Next by thread: Re: What multi-tier components to use
- Index(es):
Relevant Pages
|