Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   does a web developer need to worry about serialization? (http://www.velocityreviews.com/forums/t519321-does-a-web-developer-need-to-worry-about-serialization.html)

Dica 07-03-2007 01:27 PM

does a web developer need to worry about serialization?
 
i understand the concept of serialization of objects, but do i really need
to worry about this as a web developer? i tend to pass my BED (business
entity definition) objects between pages by storing in session as in:

oUser.firstName = 'whatever';
oUser.lastName = 'whatever_last';
Session["oUser"] = oUser;
Response.Redirect 'nextPage.aspx';

at the end of my web apps life, any data i really needed to persist would be
saved to sql server. is there any reason i should consider serializing
things instead of following my normal course? i'm getting ready to take my
MCTS exam shortly and would like to incorporate everything i've learned into
my day to day application development, but don't see a practical application
for serialization.



George Ter-Saakov 07-03-2007 01:46 PM

Re: does a web developer need to worry about serialization?
 
I am not sure what you saying.

allow me to quote you...
"any data I really needed to persist would be saved to sql server."

Is not it a Serialization?
Very often in your applications you need to deal with objects that needs to
be saved completely.
Like config object for example. So Microsoft came up with easy way to do it
with XmlSerizalizer.
But nothing can stop you to write your own sterilizer that would save only
data you need.


George.




"Dica" <genpub5@hotmail.com> wrote in message
news:59sii.14571$Io4.342@edtnps89...
>i understand the concept of serialization of objects, but do i really need
>to worry about this as a web developer? i tend to pass my BED (business
>entity definition) objects between pages by storing in session as in:
>
> oUser.firstName = 'whatever';
> oUser.lastName = 'whatever_last';
> Session["oUser"] = oUser;
> Response.Redirect 'nextPage.aspx';
>
> at the end of my web apps life, any data i really needed to persist would
> be saved to sql server. is there any reason i should consider serializing
> things instead of following my normal course? i'm getting ready to take my
> MCTS exam shortly and would like to incorporate everything i've learned
> into my day to day application development, but don't see a practical
> application for serialization.
>




sloan 07-03-2007 01:56 PM

Re: does a web developer need to worry about serialization?
 

If you have Session pointing to a backend Sql Server, then YES you need to
have serializable objects.

Check my SessionWrapper object (with Generics)

http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!151.entry



"Dica" <genpub5@hotmail.com> wrote in message
news:59sii.14571$Io4.342@edtnps89...
> i understand the concept of serialization of objects, but do i really need
> to worry about this as a web developer? i tend to pass my BED (business
> entity definition) objects between pages by storing in session as in:
>
> oUser.firstName = 'whatever';
> oUser.lastName = 'whatever_last';
> Session["oUser"] = oUser;
> Response.Redirect 'nextPage.aspx';
>
> at the end of my web apps life, any data i really needed to persist would

be
> saved to sql server. is there any reason i should consider serializing
> things instead of following my normal course? i'm getting ready to take my
> MCTS exam shortly and would like to incorporate everything i've learned

into
> my day to day application development, but don't see a practical

application
> for serialization.
>
>




Aidy 07-03-2007 02:25 PM

Re: does a web developer need to worry about serialization?
 
Your objects need to be serialisable if you are storing the session in SQL
Server (not in memory which is default), if you store the object in the
ViewState, or if you send the object via a webservice. Maybe even remoting
if you use http as transport. If you are doing none of the above you don't
need to worry about it.

"Dica" <genpub5@hotmail.com> wrote in message
news:59sii.14571$Io4.342@edtnps89...
>i understand the concept of serialization of objects, but do i really need
>to worry about this as a web developer? i tend to pass my BED (business
>entity definition) objects between pages by storing in session as in:
>
> oUser.firstName = 'whatever';
> oUser.lastName = 'whatever_last';
> Session["oUser"] = oUser;
> Response.Redirect 'nextPage.aspx';
>
> at the end of my web apps life, any data i really needed to persist would
> be saved to sql server. is there any reason i should consider serializing
> things instead of following my normal course? i'm getting ready to take my
> MCTS exam shortly and would like to incorporate everything i've learned
> into my day to day application development, but don't see a practical
> application for serialization.
>




Dica 07-03-2007 03:01 PM

Re: does a web developer need to worry about serialization?
 

"George Ter-Saakov" <gt-nsp@cardone.com> wrote in message
news:ui9FTiXvHHA.3588@TK2MSFTNGP06.phx.gbl...
>I am not sure what you saying.
>
> allow me to quote you...
> "any data I really needed to persist would be saved to sql server."


yes, i should have clarified what i meant by that better. i wouldn't save
the state of the object to sql server, but just the values of the object's
members. for instance:
sSql = "insert into users(firstName, lastName) values ('" + oUser.firstName
+ "', '" + oUser.lastName + "')";

i'll then have an overloaded method to recreate the oUsers object and pass
in the userID, run a sql statement to grab the values for that particular
user, and re-populate the object's members that way. but perhaps i could
learn to save the serialized object to sql server directly and recreate the
object more effeciently that way.

tks for the reply.

>
> Is not it a Serialization?
> Very often in your applications you need to deal with objects that needs
> to be saved completely.
> Like config object for example. So Microsoft came up with easy way to do
> it with XmlSerizalizer.
> But nothing can stop you to write your own sterilizer that would save only
> data you need.
>
>
> George.
>
>
>
>
> "Dica" <genpub5@hotmail.com> wrote in message
> news:59sii.14571$Io4.342@edtnps89...
>>i understand the concept of serialization of objects, but do i really need
>>to worry about this as a web developer? i tend to pass my BED (business
>>entity definition) objects between pages by storing in session as in:
>>
>> oUser.firstName = 'whatever';
>> oUser.lastName = 'whatever_last';
>> Session["oUser"] = oUser;
>> Response.Redirect 'nextPage.aspx';
>>
>> at the end of my web apps life, any data i really needed to persist would
>> be saved to sql server. is there any reason i should consider serializing
>> things instead of following my normal course? i'm getting ready to take
>> my MCTS exam shortly and would like to incorporate everything i've
>> learned into my day to day application development, but don't see a
>> practical application for serialization.
>>

>
>




sloan 07-03-2007 03:59 PM

Re: does a web developer need to worry about serialization?
 
Then look at my other entry:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!140.entry




"Dica" <genpub5@hotmail.com> wrote in message
news:Xwtii.20151$tB5.4793@edtnps90...
>
> "George Ter-Saakov" <gt-nsp@cardone.com> wrote in message
> news:ui9FTiXvHHA.3588@TK2MSFTNGP06.phx.gbl...
> >I am not sure what you saying.
> >
> > allow me to quote you...
> > "any data I really needed to persist would be saved to sql server."

>
> yes, i should have clarified what i meant by that better. i wouldn't save
> the state of the object to sql server, but just the values of the object's
> members. for instance:
> sSql = "insert into users(firstName, lastName) values ('" +

oUser.firstName
> + "', '" + oUser.lastName + "')";
>
> i'll then have an overloaded method to recreate the oUsers object and pass
> in the userID, run a sql statement to grab the values for that particular
> user, and re-populate the object's members that way. but perhaps i could
> learn to save the serialized object to sql server directly and recreate

the
> object more effeciently that way.
>
> tks for the reply.
>
> >
> > Is not it a Serialization?
> > Very often in your applications you need to deal with objects that needs
> > to be saved completely.
> > Like config object for example. So Microsoft came up with easy way to do
> > it with XmlSerizalizer.
> > But nothing can stop you to write your own sterilizer that would save

only
> > data you need.
> >
> >
> > George.
> >
> >
> >
> >
> > "Dica" <genpub5@hotmail.com> wrote in message
> > news:59sii.14571$Io4.342@edtnps89...
> >>i understand the concept of serialization of objects, but do i really

need
> >>to worry about this as a web developer? i tend to pass my BED (business
> >>entity definition) objects between pages by storing in session as in:
> >>
> >> oUser.firstName = 'whatever';
> >> oUser.lastName = 'whatever_last';
> >> Session["oUser"] = oUser;
> >> Response.Redirect 'nextPage.aspx';
> >>
> >> at the end of my web apps life, any data i really needed to persist

would
> >> be saved to sql server. is there any reason i should consider

serializing
> >> things instead of following my normal course? i'm getting ready to take
> >> my MCTS exam shortly and would like to incorporate everything i've
> >> learned into my day to day application development, but don't see a
> >> practical application for serialization.
> >>

> >
> >

>
>




Dica 07-03-2007 07:31 PM

Re: does a web developer need to worry about serialization?
 

"sloan" <sloan@ipass.net> wrote in message
news:u3KAZsYvHHA.3772@TK2MSFTNGP05.phx.gbl...
> Then look at my other entry:
> http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!140.entry


excellent example. tks.

>
>
>
>
> "Dica" <genpub5@hotmail.com> wrote in message
> news:Xwtii.20151$tB5.4793@edtnps90...
>>
>> "George Ter-Saakov" <gt-nsp@cardone.com> wrote in message
>> news:ui9FTiXvHHA.3588@TK2MSFTNGP06.phx.gbl...
>> >I am not sure what you saying.
>> >
>> > allow me to quote you...
>> > "any data I really needed to persist would be saved to sql server."

>>
>> yes, i should have clarified what i meant by that better. i wouldn't save
>> the state of the object to sql server, but just the values of the
>> object's
>> members. for instance:
>> sSql = "insert into users(firstName, lastName) values ('" +

> oUser.firstName
>> + "', '" + oUser.lastName + "')";
>>
>> i'll then have an overloaded method to recreate the oUsers object and
>> pass
>> in the userID, run a sql statement to grab the values for that particular
>> user, and re-populate the object's members that way. but perhaps i could
>> learn to save the serialized object to sql server directly and recreate

> the
>> object more effeciently that way.
>>
>> tks for the reply.
>>
>> >
>> > Is not it a Serialization?
>> > Very often in your applications you need to deal with objects that
>> > needs
>> > to be saved completely.
>> > Like config object for example. So Microsoft came up with easy way to
>> > do
>> > it with XmlSerizalizer.
>> > But nothing can stop you to write your own sterilizer that would save

> only
>> > data you need.
>> >
>> >
>> > George.
>> >
>> >
>> >
>> >
>> > "Dica" <genpub5@hotmail.com> wrote in message
>> > news:59sii.14571$Io4.342@edtnps89...
>> >>i understand the concept of serialization of objects, but do i really

> need
>> >>to worry about this as a web developer? i tend to pass my BED (business
>> >>entity definition) objects between pages by storing in session as in:
>> >>
>> >> oUser.firstName = 'whatever';
>> >> oUser.lastName = 'whatever_last';
>> >> Session["oUser"] = oUser;
>> >> Response.Redirect 'nextPage.aspx';
>> >>
>> >> at the end of my web apps life, any data i really needed to persist

> would
>> >> be saved to sql server. is there any reason i should consider

> serializing
>> >> things instead of following my normal course? i'm getting ready to
>> >> take
>> >> my MCTS exam shortly and would like to incorporate everything i've
>> >> learned into my day to day application development, but don't see a
>> >> practical application for serialization.
>> >>
>> >
>> >

>>
>>

>
>





All times are GMT. The time now is 07:52 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.