Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

question about serialization

Thread view: 
Tobi - 26 Mar 2008 15:05 GMT
I'm prepping for the SCJP, and am for the first time playing with
serialization.  I was wondering for what cases would serialization be
used, as preferable to storing stuff in a database?  I've never seen
it used any place that I have worked.  Is it commonly used?  Or is it
more common with apps that aren't web based?

Thanks.

Tobi
Silvio Bierman - 26 Mar 2008 17:12 GMT
> I'm prepping for the SCJP, and am for the first time playing with
> serialization.  I was wondering for what cases would serialization be
[quoted text clipped - 5 lines]
>
> Tobi

That depends. Database use can be roughly divided into two categories:

1) Providing structured, secured an (for most practical purposes)
standardized access to structured data.
2) Serializing object values/states with the sole purpose of restoring
them at a later point in time.

Use case 1) is where relational databases where invented for and can by
no means be compared to object serialization in Java. In this situation
the database is one of the core deliverables as well as the integration
point where custom applications and generic analysis and reporting
tools, backup tools etc. can be linked together.

Use case 2) is a heavily stylized way of (mis-) using a relational
database as a storage medium for object states. Numerous ORM tools exist
to help automate this.

To make matters worse people who do not know the difference tend to mix
both use cases inside the same physical database.

Besides a lot of minuses and pluses use case 2) can be similar to object
serialization.

Regards,

Silvio Bierman
Mark Space - 26 Mar 2008 17:39 GMT
> I'm prepping for the SCJP, and am for the first time playing with
> serialization.  I was wondering for what cases would serialization be
> used, as preferable to storing stuff in a database?  I've never seen
> it used any place that I have worked.  Is it commonly used?  Or is it
> more common with apps that aren't web based?

I haven't seen any actual use for serialization either.  However I could
speculate on some uses.

1. Data protocol over wire (TCP)
2. Save file function
3. Encode/Decode XML file
4. Transfer objects between servers

I'd like to know also if anyone makes heavy or even occasional use of
serialization.
Roedy Green - 26 Mar 2008 18:09 GMT
On Wed, 26 Mar 2008 09:39:22 -0700, Mark Space
<markspace@sbc.global.net> wrote, quoted or indirectly quoted someone
who said :

>I'd like to know also if anyone makes heavy or even occasional use of
>serialization.

The program listings on my site are pre-tokenised and stored in
compact serialised form. See http://mindprod.com/jgloss/jdisplay.html

Preferences often have to be serialised to fit in the tight size
restrictions.

The Replicator stores its state information in serialised files.
see http://mindprod.com/webstart/replicator.html
Signature


Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Lew - 27 Mar 2008 03:56 GMT
> On Wed, 26 Mar 2008 09:39:22 -0700, Mark Space
> <markspace@sbc.global.net> wrote, quoted or indirectly quoted someone
[quoted text clipped - 11 lines]
> The Replicator stores its state information in serialised files.
> see http://mindprod.com/webstart/replicator.html

RMI uses Serializable.

Signature

Lew

Roedy Green - 29 Mar 2008 00:25 GMT
>RMI uses Serializable.

Lotus did a office suite that made great use of it. The idea was you
could stop the app at any time and pick up right where you left off.
It serialized the state of the entire office suite.  Unfortunately
they discontinued it.
Signature


Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Roedy Green - 26 Mar 2008 17:57 GMT
>I'm prepping for the SCJP, and am for the first time playing with
>serialization.  I was wondering for what cases would serialization be
>used, as preferable to storing stuff in a database?  I've never seen
>it used any place that I have worked.  Is it commonly used?  Or is it
>more common with apps that aren't web based?

see http://mindprod.com/jgloss/serialization.html
Signature


Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



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.