![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Proxy object for each and every ServerSide object? WCF In .Net remoting, one way to have the client code run was to define an interface, and give the client the assembly with the interface in it. IEmployee for example. So both the server side and client side knew what an IEmployee was. The client side would create an IEmployee, and thru the proxy, would run come concrete version. ServerSideEmployee : IEmployee for example. The client only saw it as a IEmployee, but the server ran the code (on the server), namely ServerSideEmployee . Heck, I've even written up a demo on this at: http://sholliday.spaces.live.com/Blo...842A!122.entry .................... With WCF, I'm seeing there always seems to be a copy of some real class on the clientside. One of the ways to generate this clientside code is to use: Use the command-line tool Service Model Metadata Utility Tool (SvcUtil.exe) with the appropriate switches to create the client code. from http://msdn2.microsoft.com/en-us/library/ms733133.aspx .................... Which seems like I always have to have a ClientSideProxy class for **each and every one** of my ServerSide objects. Question #1 : Is this always the case? Question #2 : Is there a way to do this more along the lines of .Net remoting way I describe above. ............ Complicating the muddy waters, it seems that collection based classes get rewritten as arrays of classes when the proxy classes are generated. Take for example: a Server side generic collection like this: List < Customer > gets turned into Customer(Proxy) [] (<< array of Customer object, but the proxy version of the Customer object) on the client side. Which, wow, really messes up how I would code up the client side, and dealing with multiple employees (aka collections of employees). ................. Anyway. I'm wondering about the above question right now. Will I ~always have a proxy version of each and every class I create on the server side. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Proxy object for each and every ServerSide object? WCF This is the kind of answer I was looking for: http://en.csharp-online.net/WCF_Esse..._with_Channels Working with Channels You can use channels directly to invoke operations on the service without ever resorting to using a proxy class. The ChannelFactory<T> class (and its supporting types), shown in Example 1-21, enables you to create a proxy on the fly. I'd still like to have someone chime in and throw me a bone. (please). "sloan" <sloan@ipass.net> wrote in message news:OE1b5w40HHA.4004@TK2MSFTNGP05.phx.gbl... > > In .Net remoting, one way to have the client code run was to define an > interface, and give the client the assembly with the interface in it. > > IEmployee for example. > > So both the server side and client side knew what an IEmployee was. > > The client side would create an IEmployee, and thru the proxy, would run > come concrete version. > > ServerSideEmployee : IEmployee > for example. > > The client only saw it as a IEmployee, but the server ran the code (on the > server), namely ServerSideEmployee . > > Heck, I've even written up a demo on this at: > http://sholliday.spaces.live.com/Blo...842A!122.entry > > ................... > > With WCF, I'm seeing there always seems to be a copy of some real class on > the clientside. > > One of the ways to generate this clientside code is to use: > Use the command-line tool Service Model Metadata Utility Tool > (SvcUtil.exe) with the appropriate switches to create the client code. > from > http://msdn2.microsoft.com/en-us/library/ms733133.aspx > > > ................... > > Which seems like I always have to have a ClientSideProxy class for **each > and every one** of my ServerSide objects. > > Question #1 : Is this always the case? > Question #2 : Is there a way to do this more along the lines of .Net > remoting way I describe above. > > > > ........... > > Complicating the muddy waters, it seems that collection based classes get > rewritten as arrays of classes when the proxy classes are generated. > > Take for example: > > a Server side generic collection like this: > List < Customer > > > gets turned into > Customer(Proxy) [] (<< array of Customer object, but the proxy version of > the Customer object) > on the client side. > > Which, wow, really messes up how I would code up the client side, and > dealing with multiple employees (aka collections of employees). > > > ................ > > > Anyway. I'm wondering about the above question right now. Will I ~always > have a proxy version of each and every class I create on the server side. > > > > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Inherit from usercontrol - Object not set to instance of an object | .NET General | |||
| datalist -- Object reference not set to an instance of an object. | .NET General | |||
| Testing object arrays using Compare-Object and -contains | PowerShell | |||
| Adding canonical aliases for Compare-Object, Measure-Object, New-Object | PowerShell | |||