473,387 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

is serialization required for this?

Hi,

i read several articles about serialization. I know now that it is a process
of converting an object into a stream of data so that it can be is easily
transmittable over the network or can be continued in a persistent storage
location and that the serializable tag before the class makes the class
serializable.

Now i did some tests in order to understand it better, based on a example i
found in the Wrox book "beginning asp.net 2.0".
I first executed the code below (this (summarized) code produces a virtual
simple shopping cart which is put in the Profile of the user) with the
attribute "<Serializable()>" and with what follows in web.config:

<profile><properties>
<add name="myCart" serializeAs="Binary" type="wrox.eCommerce.elist"/>
</properties></profile>

After that, i executed it again without the attribute "<Serializable()>" and
without "serializeAs="Binary" from web.config.

I couldn't notice any difference (nor in table 'Profiles', nor in the table
'Orders' where the orders are put, nor in the shopping cart, nor in speed ,
nor in CPU ..).

So my question is:
------------------
Is serialization required for this? Is there no other way to put the
shopping cart content into table Profiles of the database?

With other words: what's the practical difference in this application
between using <serialisation_ and not using it? In both cases, data comes
into the sql server table and in both cases, data are retrieved when
needed.I tested it.
Is the difference the way data is put (and retrieved) into (from) the table
(with serialization: binary stream, without:?) Or is the attribute
<serialisation_ just ignored when using Profiles, or ...?

I thank you in advance
Bart

The (part of) code:
-------------------

<Serializable()_
Public Class listitem
Private _description As String

Public Sub New()
End Sub

Public Property description() As String
Get
Return _description
End Get
Set(ByVal value As String)
_description = value
End Set
End Property
End Class
'--------------------------
<Serializable()_
Public Class elist
.....
Public Sub New()
_items = New List(Of listitem)
End Sub
......
Public Sub Insert(ByVal Price As Decimal, ByVal description As String)
.....
End Class
Mar 24 '07 #1
2 1046
I am not familiar with the code in the book, but you should check if the
data is ever sent over a web service anywhere in the application. If so,
serialization becomes much more important, esp. for binary data.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
"Bart" <b@sdq.dcwrote in message
news:ej**************@TK2MSFTNGP02.phx.gbl...
Hi,

i read several articles about serialization. I know now that it is a
process of converting an object into a stream of data so that it can be is
easily transmittable over the network or can be continued in a persistent
storage location and that the serializable tag before the class makes the
class serializable.

Now i did some tests in order to understand it better, based on a example
i found in the Wrox book "beginning asp.net 2.0".
I first executed the code below (this (summarized) code produces a virtual
simple shopping cart which is put in the Profile of the user) with the
attribute "<Serializable()>" and with what follows in web.config:

<profile><properties>
<add name="myCart" serializeAs="Binary" type="wrox.eCommerce.elist"/>
</properties></profile>

After that, i executed it again without the attribute "<Serializable()>"
and without "serializeAs="Binary" from web.config.

I couldn't notice any difference (nor in table 'Profiles', nor in the
table 'Orders' where the orders are put, nor in the shopping cart, nor in
speed , nor in CPU ..).

So my question is:
------------------
Is serialization required for this? Is there no other way to put the
shopping cart content into table Profiles of the database?

With other words: what's the practical difference in this application
between using <serialisation_ and not using it? In both cases, data
comes into the sql server table and in both cases, data are retrieved when
needed.I tested it.
Is the difference the way data is put (and retrieved) into (from) the
table (with serialization: binary stream, without:?) Or is the attribute
<serialisation_ just ignored when using Profiles, or ...?

I thank you in advance
Bart

The (part of) code:
-------------------

<Serializable()_
Public Class listitem
Private _description As String

Public Sub New()
End Sub

Public Property description() As String
Get
Return _description
End Get
Set(ByVal value As String)
_description = value
End Set
End Property
End Class
'--------------------------
<Serializable()_
Public Class elist
....
Public Sub New()
_items = New List(Of listitem)
End Sub
.....
Public Sub Insert(ByVal Price As Decimal, ByVal description As String)
....
End Class

Mar 24 '07 #2
Hi thanks for replying.

No, there is no webservices. It's just a e-commerce application, which put
the content of the virtual shopping cart in the table Profiles of
ASPNET.mdb.
You know, i have received a lot of theoretical answers about this but never
an explanation for this:

Is serialization required for putting the content of that class into the
table Profiles? Is there no other way to put the
shopping cart content into table Profiles of the database?

With other words: what's the practical difference in this application
between using <serialisation_ and not using it? In both cases, data
comes into the sql server table and in both cases, data are retrieved when
needed.I tested it.
Is the difference the way data is put (and retrieved) into (from) the
table (with serialization: binary stream, without:?) Or is the attribute
<serialisation_ just ignored when using Profiles, or ...?

If you could try to explain me this, i would appreciate it.


"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMschreef in
bericht news:CA**********************************@microsof t.com...
>I am not familiar with the code in the book, but you should check if the
data is ever sent over a web service anywhere in the application. If so,
serialization becomes much more important, esp. for binary data.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
"Bart" <b@sdq.dcwrote in message
news:ej**************@TK2MSFTNGP02.phx.gbl...
>Hi,

i read several articles about serialization. I know now that it is a
process of converting an object into a stream of data so that it can be
is easily transmittable over the network or can be continued in a
persistent storage location and that the serializable tag before the
class makes the class serializable.

Now i did some tests in order to understand it better, based on a example
i found in the Wrox book "beginning asp.net 2.0".
I first executed the code below (this (summarized) code produces a
virtual simple shopping cart which is put in the Profile of the user)
with the attribute "<Serializable()>" and with what follows in
web.config:

<profile><properties>
<add name="myCart" serializeAs="Binary" type="wrox.eCommerce.elist"/>
</properties></profile>

After that, i executed it again without the attribute "<Serializable()>"
and without "serializeAs="Binary" from web.config.

I couldn't notice any difference (nor in table 'Profiles', nor in the
table 'Orders' where the orders are put, nor in the shopping cart, nor in
speed , nor in CPU ..).

So my question is:
------------------
Is serialization required for this? Is there no other way to put the
shopping cart content into table Profiles of the database?

With other words: what's the practical difference in this application
between using <serialisation_ and not using it? In both cases, data
comes into the sql server table and in both cases, data are retrieved
when needed.I tested it.
Is the difference the way data is put (and retrieved) into (from) the
table (with serialization: binary stream, without:?) Or is the attribute
<serialisation_ just ignored when using Profiles, or ...?

I thank you in advance
Bart

The (part of) code:
-------------------

<Serializable()_
Public Class listitem
Private _description As String

Public Sub New()
End Sub

Public Property description() As String
Get
Return _description
End Get
Set(ByVal value As String)
_description = value
End Set
End Property
End Class
'--------------------------
<Serializable()_
Public Class elist
....
Public Sub New()
_items = New List(Of listitem)
End Sub
.....
Public Sub Insert(ByVal Price As Decimal, ByVal description As String)
....
End Class


Mar 24 '07 #3

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

Similar topics

4
by: Jeff T. | last post by:
Hello, I have an existing set of C# classes that encapsulate our application data. They are in a heirachy with each subclass defining more specific types of data. I would like to serialize these...
0
by: Alberto Grosso Nicolin | last post by:
We have the following XML schema: there's a root element (Response) with of a single child element (Result). ...
3
by: scoobydoo | last post by:
Hello, I am trying to implement ICloneable's Clone() function, using Serialization. However, my code causes an exception. I have a class derived from TreeNode called "Node1". In Node1, I...
2
by: Robert Magnusson | last post by:
Hi all, I have a healthy class defined that happily serializes and deserializes from the underlying XML file. The problem I hit is that, as soon as I add an implicit conversion in any of the...
4
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...
10
by: Uma - Chellasoft | last post by:
Hai, I am new to VB.Net programming, directly doing socket programming. In C, I will be able to map the message arrived in a socket directly to a structure. Is this possible in VB.Net. Can...
0
by: Abhishek Padmanabh | last post by:
I have been trying out boost's serialization library for the past few days. And I have come across a problem serializing a class that has a reference member. The code is posted as below: ...
2
by: Bart | last post by:
Hi, i read several articles about serialization. I know now that it is a process of converting an object into a stream of data so that it can be is easily transmittable over the network or can...
0
by: bharathreddy | last post by:
Before going to that i want to say few thing on serialization : Serialization is the process of converting an object into a form that can be readily transported. For example, you can serialize an...
1
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.