C
Casper
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.
Now i did some tests in order to understand it better:
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="mai.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 cache, nor in CPU ..).
So my question is:
------------------
what happens (physically on the client/server computer) in this present
application when using serialization what not (physically) happens when not
using it?
Thanks
Casper
<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
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.
Now i did some tests in order to understand it better:
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="mai.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 cache, nor in CPU ..).
So my question is:
------------------
what happens (physically on the client/server computer) in this present
application when using serialization what not (physically) happens when not
using it?
Thanks
Casper
<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