Elp
7/21/2004 11:57:00 AM
kiln wrote:
> I'm also completely new to remoting...one thing I was wondering, with
> remoting it would seem that there are two almost separate programs
> involved, the client and the server.
Well, the whole point of .NET Remoting is to make 2 or more applications
communicate with each other. I guess that you can use remoting to make an
application communicate with itself but i don't really the point of doing
that. So yes, there are usually at least 2 seperate programs involved when
you play with .NET Remoting.
> app? I have vs.net but I'm just wondering about the mechanics of how
> they are developed. Does vs.net provide a way to work with the client
> end and the server end at the same time, or does one build out the
> server end first and then the client interface?
Building a .NET application is done in 3 steps. Imagine that you have a
class BookingManager that contains a method MakeBooking() and that you want
to host this class on a server application to allow any client application
on the web or on your LAN to call the MakeBooking method. Here are the 3
steps to be taken to do that:
1) Define the interface that describe your BokkingManager class so that both
the client and server apps now what you are talking about
2) Implement this class in the server app and say that it can be accessed
via .NET Remoting
3) Create a client app that connects to the server and call the MakeBooking
method
That's it. This means that you'll have to create 3 projects: one for the
interface of your remote object (here the BookingManager class), one for the
client application and one for the server application. How you manage those
3 projects is up to you. You can put them in 3 seperate solutions (in this
case you'll have to have 3 instances of visual studio open at the same time
if you want to work on the 3 projects at the same time) or you can put them
all in the same solution in which case they will all appear in the same
window of Visual Studio. You can implement the server app before the client
app or the client app before the server app but in any case you'll need to
first design the interface of your remote object.
I'm not going to give you any sample code or detailled explanation because:
1) i'm not a very good teacher
2) there are already plenty of tutorials for beginners in .NET Remoting on
the web (look at the code project web site for example)
> I was wondering, is are there are any demo apps up on the web, that
> allow guest users get the client app, log in, and enter junk data? I'd
> be a kick to see it in action.
This would be something trivial to do but i've never heard of anything like
that before for .NET Remoting. Maybe there is somewhere... Anyway, most
tutorials offer you to download already done projects that you can simply
compile and build to see that in action.... but pray for it to work before
because, as anything related network programming, these things tend to work
only on the author's machine, especially when you are a beginner :-)