Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > passing datasets?

Reply
Thread Tools

passing datasets?

 
 
HockeyFan
Guest
Posts: n/a
 
      06-17-2006
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.

 
Reply With Quote
 
 
 
 
HockeyFan
Guest
Posts: n/a
 
      06-17-2006
Sorry about the duplicate posting. The website failed when I posted, so I
thought that the posting didn't take. Tried again before realizing that it
did, in fact, get posted on the first try.

"HockeyFan" wrote:

> 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.
>

 
Reply With Quote
 
 
 
 
Simon Hart
Guest
Posts: n/a
 
      06-18-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
HockeyFan
Guest
Posts: n/a
 
      06-18-2006
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.
> >

>
>
>

 
Reply With Quote
 
Simon Hart
Guest
Posts: n/a
 
      06-18-2006
Yes DataSet's offer a good choice for .NET client consumers.

Regards
Simon.

"HockeyFan" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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.
>> >

>>
>>
>>



 
Reply With Quote
 
Josh Twist
Guest
Posts: n/a
 
      06-19-2006
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/Return...nTheWorld.aspx

Josh
http://www.thejoyofcode.com/

 
Reply With Quote
 
Simon Hart
Guest
Posts: n/a
 
      06-19-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.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/Return...nTheWorld.aspx
>
> Josh
> http://www.thejoyofcode.com/
>



 
Reply With Quote
 
Josh Twist
Guest
Posts: n/a
 
      06-19-2006
Hi Simon,

How convenient, I just posted about one of the reasons...

http://www.thejoyofcode.com/SOA_and_..._of_Satan.aspx

Furthermore, I don't use DataSets in server applications (they're great
in thick winforms that don't use services) for these reasons:

http://aspnet.4guysfromrolla.com/articles/050405-1.aspx
http://aspnet.4guysfromrolla.com/articles/051805-1.aspx



Simon Hart wrote:
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) ups.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/Return...nTheWorld.aspx
> >
> > Josh
> > http://www.thejoyofcode.com/
> >


 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      06-20-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) ups.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/Return...nTheWorld.aspx
>>
>> Josh
>> http://www.thejoyofcode.com/
>>

>
>



 
Reply With Quote
 
Simon Hart
Guest
Posts: n/a
 
      06-20-2006
So the end result really is it allows you to adapt to change more easily.
But what about the functionality that is lost as a result of creating custom
classes, such as sorting, searching, merging etc and all the other
wonderfulthings you can do with DataSets.

I think what alot of these arguments is missing is a project depends on
requirements and often a rich feature set that is delivered on time and
within budget. If DataSets are not used this functionality is lost which
means the developer has to replace it. This of course results in either loss
of functionality or a more costly and lengthly time scale.

So far I have not seen the equivilent of a custom class and a DataSet that
warrents the extra effort.

Regards
Simon.


"Scott M." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed) ups.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/Return...nTheWorld.aspx
>>>
>>> Josh
>>> http://www.thejoyofcode.com/
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing an array from FORTRAN to C then passing it within C andReturning it to FORTRAN deadpickle C Programming 1 11-07-2010 02:38 PM
Passing parameters to an executable vs. passing them to a server Ramon F Herrera C++ 8 09-13-2009 02:48 AM
passing copy of a pointer to a variable vs passing the copy pereges C Programming 7 06-01-2008 02:36 PM
Passing by const & and returning a temp vs passing by value and returningit Victor Bazarov C++ 25 03-23-2005 04:24 PM



Advertisments