473,503 Members | 1,300 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1330
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
3121
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
1688
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
5288
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...
4
7464
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
4001
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
2089
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
1048
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
6590
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
11044
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
0
7339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6995
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...
0
5581
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5017
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4678
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...
0
3168
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...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1515
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
389
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...

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.