Hi,

have you heard of "WSDL First!" ?

Keith Ballinger writes about it in his excellent book ".net web serices" by
a/w

you can indeed first write a wsdl interface (e.g. with xml spy) and the use
wsdl to generate the web service code.
there are even some addins for vs on gotdotnet who help you with this
(search for wscontractfirst)

juval lowy (developing .net component - oreilly) also has some excellent
pointers on how to properly separate interace and implementation with
'portType' elements.

so you can do it - but you are right - vs.net doesn't enforce it.

I also tend to look at the xml serializer more as a "xml mapper" - you
control the mappping from xml types to .net types.

bye
dominick

-----Original Message-----
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Julian Everett
Sent: Montag, 15. Dezember 2003 17:02
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] .NET, XML serialisation and encapsulation (was:
Web Service Desig n Question)

Something about the whole notion of XML serialisation of objects in relation
to web services has been niggling at me recently - then in a moment of
nostalgia last week I was browsing DB's Essential COM and suddenly I
realised what it was. "The first rule of COM is separation of interface from
implementation" - wise words indeed, but what the heck happened in .NET
especially in relation to web services!?

Shouldn't WSDL play the same central role in web services design that IDL
played in COM? Instead however, with VS.NET we have the "VB approach" where
IDL/WSDL is dynamically generated at compile time, tightly coupled to the
particular details of the service implementation.

For this reason, I try to use XML serialisation only for GoF Value
object-type containers that have nothing to do with my service
implementation details. Moreover, to me at least the first thing I think of
when someone says object serialisation/deserialisation is remoting -
something I don't like as obviously web services have nothing to do with
remoting. Rather, I try to think in terms of  "service serialisation", i.e.
describing data structures that encapsulate abstracted entry points into the
set of interacting objects that comprise my service.

Indeed, perhaps it's me but rejecting "the first rule of COM" seems to be a
common theme throughout the .NET base libraries. I always thought that
compared to Java, a massive strength of MS's component model was that it was
built upon the principle of class factories that return interface references
- something Java only caught on to after the pain of deprecating earlier
APIs, with the introduction of frameworks like the Collections API. As I
understand it, IDL was introduced primarily to address language interop
issues (something that is obviously not relevant with .NET) rather than to
promote abstraction, however I can't help feeling that Microsoft took a step
backwards when they decided against a interface-based architecture in their
implementation of the CLR...

Any thoughts?

regards

Julian


-----Original Message-----
From: Martijn de Haas [mailto:[EMAIL PROTECTED]
Sent: 11 December 2003 11:38
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Web Service Design Question


Instead of using a string as argument for you methods, why don't you create
classes that represents XML structure. Read about XML serialization for
this matter (MSISDN, index item: XML serialization)

===================================
This list is hosted by DevelopMentorR  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp


IMPORTANT NOTICE
This communication contains information, which is confidential and may also
be privileged. It is for the exclusive use of the intended recipient(s). If
you are not the intended recipient(s) please note that any form of
distribution, copying or use of this communication or the information in it
is strictly prohibited and may be unlawful. If you have received this
communication in error please return it to the sender. The opinions
expressed within this communication are not necessarily those expressed by
Teletext Ltd.

Teletext Ltd.
Building 10
Chiswick Park
566 Chiswick High Road
London W4 5TS

Registered in England number 2694814

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp


===================================
This list is hosted by DevelopMentorR  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to