Re: Help on remoting clarification ???



as your last point :
[Afterthough: You can create a class that wraps the
IPurchaseOrderService on the client side that handles getting the
object reference fromt he remote service, and forwards all calls to
that remote proxy, effectively making it a web service like proxy
object... ]

All example I get arer working like this, they do not impleemnt or use any
interface. They get a reference of the remote object by using the
WellKnownServiceType function and then it retrun what is so call a tansparent
proxy that the client use.
Thats the reason why I was thinking that it was somehow posssible to create
an off line proxy class

serge

"NuTcAsE" wrote:

See inline:

So If I understand, having the RemoteObject.dll separate from the server
offer the possibility to get the remoteObject and the server on different
tiers right ?

The right word you are looking for is Layers not Tiers. Tiers indicate
a physical boundary in an application, which means parts of the
application live on seperate machines, where remoting comes into play.
Layers reffer to the logical seperation of an application, for example
Data Access Layer (DAL), Business Logic Layer (BLL) and User Interface
Layer (UIL).

From a remote object component, if we want to buzild a client application
which will refer to that component, does the way to create this reference is
to have a local copy and then refer that copy within your project or is there
a way to generate an off line proxy class in a similar way as web service and
then refer to that class ?

There is no direct correlation to a Web Service proxy in the remoting
world. Remoting deals with interfaces rather than proxy. Maybe an
example will help:

Lets say i want to create a purchase order application where the
service allows clients to retrieve and store purchase orders... So I
create a common component library called PurchaseOrderLib. This library
contains the following:

1. An interface IPurchaseOrderService that defines two functions
PurhcaseOrder GetPurchaseOrder (int orderId);
PurchaseOrder SavePurchaseOrder (PurchaseOrder order);

2. A class PurchaseOrder that has the [Serializable] attribute applied
to it.

Now the IPurchaseOrderService becomes the interface contract that the
service uses to implement a remote service, and the client uses to
interact with the remote service.

Now i create a Windows application (console or otherwise) that contains
one class PurchaseOrderService that implements the
IPurchaseOrderService interface. This windows application now becomes
my remote service, which exposes the PurchaseOrderService as a well
known service through a Uri. (The purchase order service references the
PurchaseOrderLib.dll)

The Client part also references the PurchaseOrderLib.dll and then uses
Activator.GetObject () overlaod to connect to the remote service and
get the object that implements the IPurchaseOrderService and then calls
method on that remote proxy.

The key here is that the implementation of the service is never
distributed out to the client. Just the interface definition. In most
of the examples you might have read distribute the service object on
the client side too... which is a wrong practice as it is a maintanance
nightmare.

So the end strucutre is this:

PurchaseOrderService ->references PurchaseOrderLib.dll
PurchaseOrderClient -> references PurchaseOrderLib.dll

[Afterthough: You can create a class that wraps the
IPurchaseOrderService on the client side that handles getting the
object reference fromt he remote service, and forwards all calls to
that remote proxy, effectively making it a web service like proxy
object... ]

Hope this helps

- NuTcAsE


.



Relevant Pages

  • Re: Help on remoting clarification ???
    ... There is no direct correlation to a Web Service proxy in the remoting ... Lets say i want to create a purchase order application where the ... service uses to implement a remote service, ... The Client part also references the PurchaseOrderLib.dll and then uses ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Searching OO Associations with RDBMS Persistence Models
    ... and the Client needs access to locations for a particular Company. ... In this case I would argue that it should be a reference. ... There are three aspects to relationships: implementation, instantiation, and navigation. ... This sort of instantiation is ubiquitous in OO applications so that one very rarely ever sees a FIND WHERE construct. ...
    (comp.object)
  • Re: VS2008 creates a 2nd endpoint when actualising a web reference
    ... you are developing an WCF service and a client through VS 2008. ... The service used to use wshttpbinding, and when you switch it to netTcpBinding and regenerate the service reference at client, you found the client generate two configuration section for the service endpoint, correct? ... We welcome your comments and suggestions about how we can improve the support we provide to you. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Inheriting Consumed WebService Class
    ... > your web reference, your proxy class is generated from the WSDL's XML ... > and sending it across the wire back you client. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: How to I access a logging class from any other class.
    ... where the Client is instantiating the R2 object when it passes a reference to Service2 to Service1. ... participation in the R2 relationship is a personal matter between and [Service2]. ... But for Client to pass the /right/ instance of, the Client must understand the rules and policies related to defining participation in the R2 relationship. ... Singleton essentially disguises the notion of a global instance as a local implementation instance. ...
    (comp.object)

Loading