Loading ...
Sorry, an error occurred while loading the content.
 

Re: Web Service Design

Expand Messages
  • Prashant Sarode
    I went through your message but I must warn that this simple design approach for web service encourages the buddingon web services service developers to think
    Message 1 of 3 , Dec 31, 2004
      I went through your message but I must warn that this simple design
      approach for web service encourages the buddingon web services
      service developers to think about objects first and not about
      message exhange between the service consumer & service provider.
      When you think object first you are enticed think in terms of the
      programming language used for that object. (I know your were talking
      about pattern---but all I am saying is that you think about
      implementation of Service Provider)

      You have rightly identifed that SOA is different philosophy than OO
      and eventually one has to think about clean, simple, design of
      service provider. But I belive that activity is secondary to
      first/critical activity of clean, simple design for communication
      between service consumer and service provider.

      By focusing on object first ---people tend to fall into the
      mousetrap of using vendor specific utilities that convert objects
      into web services and generate WSDL's that fail on inter-operability.

      Here is my complete blogg on this issue.
      http://prashantsarode.blogspot.com/2004/12/start-with-wsdl-not-with-
      object-avoide.html





      Prashant
      --- In service-orientated-
      architecture@yahoogroups.com, "SirGilligan" <sirgilligan@y...> wrote:
      >
      >
      > Simple Design Approach for Web Services
      > by Geoffrey Slinker
      >
      > December 7, 2004
      >
      > v1.0
      >
      > Abstract
      > Web services do not follow an object oriented approach because the
      > objects passed to and from a web service are stripped down to just
      > the public fields and all behavior is lost.
      >
      > Introduction
      > I am currently developing C# web services. The first thing you
      notice
      > is that any object passed to or from a web service is passed as a
      > data only object. The behavior of the object is lost. With out
      > behavior you are not in an object oriented world.
      >
      > Most of us are very good at object oriented modeling and we think
      of
      > the world in terms of "is a", "is not a", "has a", "uses a" and
      other
      > object oriented markers. Since web services strip our objects down
      to
      > data only objects you may feel like a fish out of water when
      working
      > with web services.
      >
      > Almost immediately we come up with mappers to map the data object
      > back into a real object with behavior. Since namespaces are an
      issue
      > we all come up against the same problems and resort to some kind
      of
      > mapper whether it is using reflection and introspection or done by
      > copying each field (often by passing the data only object into the
      > constructor of the "real" object).
      >
      > But this does not help in modeling the system.
      >
      > Facade Approach
      > Recently I have been designing a complex system that is to use web
      > services and a service oriented architecture. To make a long story
      > short I designed my system in a traditional object oriented
      fashion.
      > I identified objects and behavior. I identified abstract types and
      > factories. I designed the system just like I have done since 1987
      > when I was using C++, Object C, and Object Pascal.
      >
      > After I finished the design I looked at my high level objects. I
      > identified which objects are the ones that drive the system. Then
      I
      > looked at the interfaces that these objects implement and the
      public
      > methods that they have. From those I created a facade that unifies
      > the high level ojbects and exposes the behavior. This facade is
      > implemented in C# by inheriting from
      System.Web.Services.Webservice.
      > By using the facade pattern I was able to bring to bare all of my
      > experience with object oriented design and then leverage the well
      > known facade pattern. Also, I find that it is very similar to
      doing
      > the adapter pattern because web services and service oriented
      > architectures deal with interfaces, binding, and transport issues
      and
      > the web service that I implement wraps the existing objects so
      that
      > there is a standard interface to the system.
      >
      > After I had implemented the facade I recognized that this was very
      > similar to a problem from my past where I had to wrap C++ code
      with C
      > code. C code does not have any object oriented aspects. The C++
      code
      > had been designed and implemented using object oriented
      techniques.
      > The C code was added later. It is very similar to adding a web
      > service layer over C# code.
      >
      > Conclusion
      > When designing a system that is to expose its functionality
      through a
      > web service then design the system using traditional object
      oriented
      > techniques and then make a facade that is the web service that
      > unifies the system so that it can be called and used as a web
      servie.
      >
      > http://home.att.net/~geoffrey.slinker/agile.html
      > http://home.att.net/~geoffrey.slinker/maverick/webservicemodel.html
    • SirGilligan
      ... talking ... operability. ... Thank you. I read your article and I agree. Thanks.
      Message 2 of 3 , Jan 4, 2005
        --- In service-orientated-architecture@yahoogroups.com, "Prashant
        Sarode" <pmsarode@i...> wrote:
        >
        >
        > I went through your message but I must warn that this simple design
        > approach for web service encourages the buddingon web services
        > service developers to think about objects first and not about
        > message exhange between the service consumer & service provider.
        > When you think object first you are enticed think in terms of the
        > programming language used for that object. (I know your were
        talking
        > about pattern---but all I am saying is that you think about
        > implementation of Service Provider)
        >
        > You have rightly identifed that SOA is different philosophy than OO
        > and eventually one has to think about clean, simple, design of
        > service provider. But I belive that activity is secondary to
        > first/critical activity of clean, simple design for communication
        > between service consumer and service provider.
        >
        > By focusing on object first ---people tend to fall into the
        > mousetrap of using vendor specific utilities that convert objects
        > into web services and generate WSDL's that fail on inter-
        operability.
        >
        > Here is my complete blogg on this issue.
        > http://prashantsarode.blogspot.com/2004/12/start-with-wsdl-not-with-
        > object-avoide.html
        >
        >
        >
        >
        >
        > Prashant

        Thank you. I read your article and I agree.
        Thanks.
      Your message has been successfully submitted and would be delivered to recipients shortly.