Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

does a web developer need to worry about serialization?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dica - 03 Jul 2007 14:27 GMT
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 - 03 Jul 2007 14:46 GMT
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.

>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
[quoted text clipped - 11 lines]
> into my day to day application development, but don't see a practical
> application for serialization.
Dica - 03 Jul 2007 16:01 GMT
>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
[quoted text clipped - 21 lines]
>> learned into my day to day application development, but don't see a
>> practical application for serialization.
sloan - 03 Jul 2007 16:59 GMT
Then look at my other entry:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!140.entry

> >I am not sure what you saying.
> >
[quoted text clipped - 40 lines]
> >> learned into my day to day application development, but don't see a
> >> practical application for serialization.
Dica - 03 Jul 2007 20:31 GMT
> Then look at my other entry:
> http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!140.entry

excellent example. tks.

>> >I am not sure what you saying.
>> >
[quoted text clipped - 51 lines]
>> >> learned into my day to day application development, but don't see a
>> >> practical application for serialization.
sloan - 03 Jul 2007 14:56 GMT
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

> 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
[quoted text clipped - 11 lines]
> my day to day application development, but don't see a practical application
> for serialization.
Aidy - 03 Jul 2007 15:25 GMT
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.

>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
[quoted text clipped - 11 lines]
> into my day to day application development, but don't see a practical
> application for serialization.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.