![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
What's the best way of passing data from a database in a webservice from where the serice is consumed? Do I pass it in XML and if so, what object, exactly, do I use? Or is it better to just pass it as a dataset? I know that behind the scenes, it's being serialized and passed as xml, so it seems odd to be passing the data inside an xml structure, that is going to be serialzed and put inside more xml. I'm new to webservices though, and so I'm wondering what the best approach is. |
#3
| |||
| |||
|
|
What's the best way of passing data from a database in a webservice from where the serice is consumed? Do I pass it in XML and if so, what object, exactly, do I use? Or is it better to just pass it as a dataset? I know that behind the scenes, it's being serialized and passed as xml, so it seems odd to be passing the data inside an xml structure, that is going to be serialzed and put inside more xml. I'm new to webservices though, and so I'm wondering what the best approach is. |
#4
| |||
| |||
|
|
It really depends on who (technology) will be consuming yur web service. Remember that DataSets and .NET specific so are difficult for say a Java client to process. If however your solution is .NET based then DataSets offer a good choice. I personally use both DataSets and Xml - depending on requirements. I also use objects that can be serialized. Regards Simon. "HockeyFan" <HockeyFan (AT) discussions (DOT) microsoft.com> wrote in message news:56D6D694-ECA0-46B1-A4CC-B64949D91CFC (AT) microsoft (DOT) com... What's the best way of passing data from a database in a webservice from where the serice is consumed? Do I pass it in XML and if so, what object, exactly, do I use? Or is it better to just pass it as a dataset? I know that behind the scenes, it's being serialized and passed as xml, so it seems odd to be passing the data inside an xml structure, that is going to be serialzed and put inside more xml. I'm new to webservices though, and so I'm wondering what the best approach is. |
#5
| |||
| |||
|
|
The consumer will be .Net-based. Does this mean that a dataset is the way to go? The datasets will be one or 2 rows and no more. "Simon Hart" wrote: It really depends on who (technology) will be consuming yur web service. Remember that DataSets and .NET specific so are difficult for say a Java client to process. If however your solution is .NET based then DataSets offer a good choice. I personally use both DataSets and Xml - depending on requirements. I also use objects that can be serialized. Regards Simon. "HockeyFan" <HockeyFan (AT) discussions (DOT) microsoft.com> wrote in message news:56D6D694-ECA0-46B1-A4CC-B64949D91CFC (AT) microsoft (DOT) com... What's the best way of passing data from a database in a webservice from where the serice is consumed? Do I pass it in XML and if so, what object, exactly, do I use? Or is it better to just pass it as a dataset? I know that behind the scenes, it's being serialized and passed as xml, so it seems odd to be passing the data inside an xml structure, that is going to be serialzed and put inside more xml. I'm new to webservices though, and so I'm wondering what the best approach is. |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Not everybody would agree that DataSets are a good solution for use in Web Services (including me), I think Scott Hanselman describes the situation well in his post entitled "Returning DataSets from WebServices is the Spawn of Satan and Represents All That Is Truly Evil in the World": http://www.hanselman.com/blog/ReturningDataSetsFromWebServicesIsTheSpawnOfSatanA ndRepresentsAllThatIsTrulyEvilInTheWorld.aspx Josh http://www.thejoyofcode.com/ |
#8
| |||
| |||
|
|
I must admit, I am still struggling to understand why DataSets are so bad to use if you are developing a .NET solution front to back. I really depends on the requirements. How do you for example handle databinding, sorting, updating etc via a custom class? Regards Simon. "Josh Twist" <josh.twist (AT) gmail (DOT) com> wrote in message news:1150704141.962572.64490 (AT) h76g2000cwa (DOT) googlegroups.com... Not everybody would agree that DataSets are a good solution for use in Web Services (including me), I think Scott Hanselman describes the situation well in his post entitled "Returning DataSets from WebServices is the Spawn of Satan and Represents All That Is Truly Evil in the World": http://www.hanselman.com/blog/ReturningDataSetsFromWebServicesIsTheSpawnOfSatanA ndRepresentsAllThatIsTrulyEvilInTheWorld.aspx Josh http://www.thejoyofcode.com/ |
#9
| |||
| |||
|
|
I must admit, I am still struggling to understand why DataSets are so bad to use if you are developing a .NET solution front to back. I really depends on the requirements. How do you for example handle databinding, sorting, updating etc via a custom class? Regards Simon. "Josh Twist" <josh.twist (AT) gmail (DOT) com> wrote in message news:1150704141.962572.64490 (AT) h76g2000cwa (DOT) googlegroups.com... Not everybody would agree that DataSets are a good solution for use in Web Services (including me), I think Scott Hanselman describes the situation well in his post entitled "Returning DataSets from WebServices is the Spawn of Satan and Represents All That Is Truly Evil in the World": http://www.hanselman.com/blog/ReturningDataSetsFromWebServicesIsTheSpawnOfSatanA ndRepresentsAllThatIsTrulyEvilInTheWorld.aspx Josh http://www.thejoyofcode.com/ |
#10
| |||
| |||
|
|
One reason is that they limit your ability to scale your application with minimal application changes. Suppose you wish to pass a NET 2.0 DataSet today, so you set up a web service consumer that can receive a NET 2.0 DataSet. Now, what happens if (and when) you'll want to replace that NET 2.0 DataSet with a NET 3.x DataSet? You'll have to change your consumer as well. Or better yet...What if down the road, you want to swap out the NET web service consumer with a Java web service consumer? By keeping the proprietary stuff within a software tier, you leverage your ability to scale your application later on. "Simon Hart" <srhartone (AT) yahoo (DOT) com> wrote in message news:Oz2qUW6kGHA.1640 (AT) TK2MSFTNGP02 (DOT) phx.gbl... I must admit, I am still struggling to understand why DataSets are so bad to use if you are developing a .NET solution front to back. I really depends on the requirements. How do you for example handle databinding, sorting, updating etc via a custom class? Regards Simon. "Josh Twist" <josh.twist (AT) gmail (DOT) com> wrote in message news:1150704141.962572.64490 (AT) h76g2000cwa (DOT) googlegroups.com... Not everybody would agree that DataSets are a good solution for use in Web Services (including me), I think Scott Hanselman describes the situation well in his post entitled "Returning DataSets from WebServices is the Spawn of Satan and Represents All That Is Truly Evil in the World": http://www.hanselman.com/blog/ReturningDataSetsFromWebServicesIsTheSpawnOfSatanA ndRepresentsAllThatIsTrulyEvilInTheWorld.aspx Josh http://www.thejoyofcode.com/ |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |