Remoting Example

Posts   
 
    
davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 16-Jul-2005 09:58:39   

Frans,

Have you removed the .NET remoting example from your site? I can't find it. cry

Geoff.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 16-Jul-2005 11:47:16   

Yes I've removed it as it was very simple and out of date. In general it showed how to setup a very simple remoting system, but was not that useful for real-life systems.

Frans Bouma | Lead developer LLBLGen Pro
davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 16-Jul-2005 11:48:52   

Ah okay, just checking to ensure I wasn't going mad wink

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 16-Jul-2005 22:43:20   

That's the example I downloaded some time ago and am now using.

davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 17-Jul-2005 13:15:09   

Jim,

If you could send it to me I would be grateful. simple_smile My email is in my profile.

Cheers,

Geoff.

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 17-Jul-2005 21:36:08   

I sent it. simple_smile

davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 18-Jul-2005 20:34:06   

Thanks Jim, Got it.... You had been captured by my spam blocker confused

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 18-Jul-2005 21:45:28   

I actually found it back, I though I'd lost it. I'll see if I can clean it up for 1.0.2004.2 and put it back online. It's really very basic, but better than nothing simple_smile

Frans Bouma | Lead developer LLBLGen Pro
JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 18-Jul-2005 22:21:40   

davisg wrote:

Thanks Jim, Got it.... You had been captured by my spam blocker confused

I wonder if that's because my email domain doesn't match the SMTP domain. And that is because I am travelling and I can't send email through my regular ISP SMTP server, which only accepts mail from the local network. Lovely. What the hell do I do when I travel? So I am using another service, it costs $25 a year and works fine but the domains don't match.

davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 18-Jul-2005 23:49:59   

JimFoye wrote:

I wonder if that's because my email domain doesn't match the SMTP domain. And that is because I am travelling and I can't send email through my regular ISP SMTP server, which only accepts mail from the local network. Lovely. What the hell do I do when I travel? So I am using another service, it costs $25 a year and works fine but the domains don't match.

Nah it's probably because my spam software didn't trust your attachment. Nevermind your trusted now smile

davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 18-Jul-2005 23:52:02   

Otis wrote:

I actually found it back, I though I'd lost it. I'll see if I can clean it up for 1.0.2004.2 and put it back online. It's really very basic, but better than nothing simple_smile

Absolutely worth it being up there.

I have already managed to get remote server and client working with entity collections, I just wanted to know how to implement interfaces smile Now just trying to work out why I need them confused Back to the books I think, I mean I know what Interfaces are (A contract) but why are they used in .NET Remoting examples? Grrrr... need more knowledge disappointed

<edit> Got it now, just watched a very good webcast on interfaces, C00l... it's coming together at last smile

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 19-Jul-2005 02:19:17   

davisg wrote:

Otis wrote:

I actually found it back, I though I'd lost it. I'll see if I can clean it up for 1.0.2004.2 and put it back online. It's really very basic, but better than nothing simple_smile

Absolutely worth it being up there.

I have already managed to get remote server and client working with entity collections, I just wanted to know how to implement interfaces smile Now just trying to work out why I need them confused Back to the books I think, I mean I know what Interfaces are (A contract) but why are they used in .NET Remoting examples? Grrrr... need more knowledge disappointed

<edit> Got it now, just watched a very good webcast on interfaces, C00l... it's coming together at last smile

Ok so you realize now that the client only needs an assembly that contains the interface, not the entire server class that you are talking to? I believe that is the primary reason. Of course, you can say also that it's better OO design.

davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 19-Jul-2005 14:14:46   

JimFoye wrote:

Ok so you realize now that the client only needs an assembly that contains the interface, not the entire server class that you are talking to? I believe that is the primary reason. Of course, you can say also that it's better OO design.

Hi Jim, yeah I think I got it. I have been reading Ingo Rammers book but his first example showed an Interface and Class compiled into a single DLL and referenced in both the client and the server which stubbled me a bit. Chapter 3; I think is where an interface is compiled into a DLL and referenced on the client. The server has the class implementation using the interface? does that seem correct?

Devildog74
User
Posts: 719
Joined: 04-Feb-2004
# Posted on: 19-Jul-2005 15:04:33   

That is correct, and the book is a good book. He also states in the book that intent of using the interface is to seperate the definition (contract) from the implementation. Which really makes sense in a distributed app, because the client should never card about the implementation, simply how to access the data.

davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 19-Jul-2005 15:32:50   

It is a good book indeed simple_smile and it's starting to make sense.

<edit> What about naming conventions for the actual exe's and DLL's. What do other people use? for example:

1) I will have a client project so i'll call that 'client' 2) I will have a server project so i'll call that 'server'. 3) I will have a class library for the Manager classes such as CustomerManager, OrderManager, etc.. so i'll call that 'managers' 4) I will have a class library for the Manager Inferfaces so i'll call that 'interfaces'

On the client machine I will deploy 'client' and 'interfaces' and on the server I will deploy 'server', 'managers' and 'interfaces'

of course there would also be the LLBLGenPro DLL's to deploy on both boxes as well as a business logic DLL to put on the server.

Just curious as to how other people name all these DLL's and EXE's.

Geoff.

davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 21-Jul-2005 10:50:47   

Bump (Soz Frans) flushed

Would like some peoples comments as to how they name there projects when using a .NET remoting solution as above.

Geoff.

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 22-Jul-2005 17:53:18   

I always think other folks on this forum must have better answers and solutions than me, but since no one else has responded, I'll take a shot. In this project I'm doing now I'm in the very early stages, so this may (will) change. But here's what I have in my solution, 9 projects (names changed, obviously).

Server and client databases are same schema and so use same DAL, which of course is adapter model.

Company.Software.DAL
Company.Software.DALDBSpecific

Local client has additional two tiers. This might have MVC later or something, like I said I'm just getting started. This is a winforms app, cuz I don't do ASP.NET now if I can help it.

Company.Software.Local.BLL
Company.Software.Local.UI

Then there's a a remoting server. Of course the client above will reference the interface assembly.

Company.Software.Remoting.Interfaces
Company.Software.Remoting.Server

That's hosted in IIS.

Company.Software.Remoting.Web

And then I will need some kind of little admin app for someone to work with server database.

Company.Software.Server.BLL
Company.Software.Server.UI

Jim

davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 22-Jul-2005 17:59:20   

Thats exactly what I wanted Jim, thanks... It just helps me visualise the separation.

<edit> Just one question, would you not have a Company.Software.Remoting.BLL as well that implements the Company.Software.Remoting.Interfaces? The classes as so to speak or will they be incorporated into the Company.Software.Remoting.Server? My server is going to be a Windows Application and not hosted in IIS.

Geoff

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 22-Jul-2005 18:43:14   

Company.Software.Remoting.Server is the actual remoting server that implements all the interfaces needed by the client. If you find that you're putting some business logic in here that is better separated out, go for it. I'm not to the point yet, it's just fetching data now, but I will have to put a bunch of validation logic in here, at the least, so I may add a layer for that, too. My client application may pick up some more layers, too. This is just a start. smile

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 24-Jul-2005 12:33:40   

I've re-uploaded the old remoting example. It's in C# but it shows how to setup initial remoting. For large scale remoting in your application, you need of course more in-depth knowledge of remoting itself, this example illustrates that LLBLGen Pro's entities and collections are passed by value. The example uses selfservicing, as it's from 2003. simple_smile

Frans Bouma | Lead developer LLBLGen Pro