Results 1 to 5 of 5

Thread: What is serialization used for? ***SOLVED***

  1. #1

    Thread Starter
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476

    What is serialization used for? ***SOLVED***

    I`ve been reading about it in my books but I just don`t know what its good for! Can anyone explain please what to use serialization for?


    Thanx Stephan
    Last edited by Sgt-Peppa; Jul 10th, 2003 at 03:35 AM.
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    6.1 What is serialization?
    Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process of creating an object from a stream of bytes. Serialization/Deserialization is mostly used to transport objects (e.g. during remoting), or to persist objects (e.g. to a file or database).
    http://www.andymcm.com/dotnetfaq.htm#Serialization

  3. #3

    Thread Starter
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476
    Yeah I know the technical site to it! What I want to know is when do I really use it, and why? I mean I can write to Db or a File or FTP....... without using it. What is the + I get out of serialization?

    Thanx,
    Stephan
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    You could write a bunch of logic to store the values of an object to a file, then a bunch of logic to read those values back in....for each object you would like to persist.

    OR

    You could just serialize it quickly and easily.


    Your choice.
    It is there to help us.
    It is there to send objects over the network.
    It is cool....lol.

    Basically, yes, you can do it other ways, but serialization is built in for the most part, and makes your life easier. To say why do it this way when we already have text files and databases is like saying somthing like:
    "Why are they creating this new road that is a straight line from here to work when I already have one that twists and turns all over the place, but still gets there?"

  5. #5

    Thread Starter
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476
    I never doubtet that there is a sense behind that serialization! I just didn`t know what to use it for! Now, that U explained, I can see the + I`ll get out of that!
    Thanx for your explanation,

    Stephan
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width