473,695 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Serialization / Datasets

Hi There.

This post is a extension of thread "Serialize or not to Serialize", on 5 of
December of 2006.

The reason why my teacher insists that a WS cannot return a Dataset is due
to low rate networks, not due to SOAP schemas. I think that's because a XML
Dataset is too large.

So, in my WS, I want to turn my dataset in some type of class, and then send
the client an array of this class elements. Even so, I don't know if this is
a good idea. What if this class has hundreds or thousands of elements? Isn't
that too large also? I looking for a way to send the data in small portions,
but I don't know how... :(

Thanks for your answers.

Paez
Dec 8 '06 #1
1 2204
Hi Paez,
The reason why my teacher insists that a WS cannot return a Dataset is due
to low rate networks, not due to SOAP schemas. I think that's because a
XML
Dataset is too large.
The size of the SOAP envelope is irrelevant, AFAIK.

It's the schema that makes DataSets seems so large when serialized as xml.
For very small DataSets (in schema and size), the schema might appear to be
half of the entire xml content or more; however, the schema size is a
constant, so as the DataSet scales the schema won't change. If you're
serializing thousands of records, the size of the schema won't make any
difference at all. The size of the actual DataSet content is comparable to
that of a custom collection containing instances of a custom class.

In a Typed DataSet, there is more meta-data per row when it's serialized
than in an untyped DataSet or a custom class. I think this is where that
"DataSets are too big to be serialized as xml" axiom comes in to play.

If you can get away without using a Typed DataSet (which makes sense in a
public Web Service that may be consumed by many different platforms other
than just .NET) then I think you'll find that the amount of data produced
after serialization between an untyped DataSet and a custom class is
comparable.
So, in my WS, I want to turn my dataset in some type of class, and then
send
the client an array of this class elements. Even so, I don't know if this
is
a good idea. What if this class has hundreds or thousands of elements?
Isn't
that too large also? I looking for a way to send the data in small
portions,
but I don't know how... :(
The data has to get there one way or another, so sending them in smaller
pieces isn't going to reduce the overall amount of data that needs to be
sent. Actually, when speaking of xml serialization and SOAP, it will
probably end up being larger than if you were to just make a single method
to send all of the data at once, using a simple class architecture or
untyped DataSet.

--
Dave Sexton
Dec 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3173
by: Aaron Clamage | last post by:
Hi, I'm not sure that if this is the right forum, but any help would be greatly appreciated. I am porting some java serialization code to c# and I can't figure out the correct way to do it. It seems that either I can use default serialization or implement ISerializable. Is there any way to do both (e.g. extend the default serialization). In other words, I want to be able to implement my custom serialization code but call the...
1
1496
by: Dan | last post by:
Hello, I am having trouble serializing a typed dataset that has a number of expression columns. When I attempt to serialize the dataset, the framework (.NET 1.1) throws a NullRefException. After a little research I've come across Microsoft KB 818587 (link below), which describes a similar problem that is encountered when serializing datasets containing row errors. http://support.microsoft.com/default.aspx?scid=kb;en-us;818587 In the...
4
7482
by: Brian Keating | last post by:
wonder if anyone can help me here, i've a framework 1.1 dataset which i serialize in framework 1.1 and deserialize in framework 2.0. This is fine, problem is that i want to modify some of the records in framework 2.0 and serialize the data so framework 1.1 can deserialize it and do what it required. Is this possible?
4
1732
by: Alpha | last post by:
I have a small Window application and through out the different forms I create a different dataset. At the begining I used the Tools to drag and drop the SqlDataAdapter, connection and dataset objects to the frist few forms but then later I removed those and created these objects in my code. I now see 3 datasets in the Solution Explorer panel part but not all the datasets that I have in my codes. Are these 3 datasets leftover from the...
2
2160
by: Wild Wind | last post by:
Hello, I have an object which has various properties, including one which is of type DataSet. I need to serialize this object in binary format, but I've discovered that the BinaryFormatter will only format datasets in XML format. I've read various articles on how to address the problem, including the KB829740 article which talks about using a DataSetSurrogate
0
839
by: Philp | last post by:
I have a problem with the serialization of datasets when they are strongly typed? I am not sure where I would go to set an attribute to serialize the ds since it really does not have a view in the IDE that represents it as a class? My error is as follows; An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in BeebdAccounting.exe
1
11096
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
2
5562
by: mkvenkit.vc | last post by:
Hello, I hope this is the right place to post a question on Boost. If not, please let me know where I can post this message and I will do so. I am having a strange problem with std::string as I am trying to read from a binary archive using Boost serialization. I am new to this, and it is possible that I have not understood the usage. In the code below, the string "faultblock" seems to be causing the problem. The code crashes in the ia...
12
3592
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a gridview, for example, I loop through a datareader, populating an array list with instances of a custom class in the middle tier, and then send the array list up to the presentation layer and bind the gridview to it. If I use a typed dataset, I...
0
8623
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8565
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8839
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5837
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4339
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2269
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1971
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.