Yes, with an exception.
A client only needs an interface-compatible type defined
to reference a remote object. In general, attributes,
names and signatures should be preserved.
An exception to this is if your server has strong-named
objects hosted.
The popularized alternative is to create interface
libraries that the service objects implement interfaces
from. Then the interface lib is yoru shared lib. I dislike
this approach because it requires i make additional steps
toward getting references of remote objects (i like
the "new" syntax over using the Activator type).
I have been working on a tool called RCLGEN, Remoting
Client Library Generator. It basically reflects the
contents of an assembly and produces a single interface-
compatible .cs file you can compile to serve as a client-
side library for service objects. What I really would
rather see is .net compilers like csc.exe supporting "no
implementation" builds, e.g. MBRO classes are compiled
without method bodies, but non-remoted types are compiled
verbatim. The equivalent to creating a new Project config
in your IDE with a custom define of "NOIMPBUILD" and then
using #if !NOIMPBUILD #endif in all your implementation
bodies.
Hope that helps,
Shaun
[quoted text, click to view] >-----Original Message-----
>Is there any way to do remoting and pass a type that is
defined separately
>(but identically) in both the server and the client
instead of having to
>have them share a dll between them?
>
>Thanks,
>James Hancock
>
>
>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[quoted text, click to view] "William Stacey" <staceyw@mvps.org> wrote in message
news:Olv6sx%23ZDHA.1580@tk2msftngp13.phx.gbl...
> I thought you could use soapsuds to create a cs file with the type
> info that you can compile on the client?
> --wjs
No. Remoting developes shoudl avoid soapsuds like the plague. The
resulting assembly and code is littered with WSDL bindings. On top of
that the tool fails to properly contruct compatible objects in some
cases (incorrect modifiers for instance, or an exception because it
can't figure out how to enum a remoted IDictionary etc).
Use shared libs until your staff has the time to whittle down the
errors from soapsuds, or write a tool that strips out method bodies
replacing them will dummy returns etc. While waiting, lobby with
Microsoft for a compiler option to produce an assembly that only has
implementation for non-remoted types.
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.2
iQA/AwUBP0XikKZcqAh+utlREQLcUACgqjdRWPgcJD2UMfYgAZbO6vVorIQAoNQK
lfLiYUsSGEiHi06xO6AT+5uA
=Fl/4
-----END PGP SIGNATURE-----