Talk:Serialization

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated Start-class)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
 


DotNet[edit]

any chance some one in the know could add someting about serializable objects in .NET (direct competition of Java?).

i would be much obliged.

jaspio

What about solutions in Perl (e.g. FreezeThaw) and/or using YAML (YAML)?

Spelling[edit]

isn't the term "marshaling" (with one 'l') instead of "marshalling"? the version with the double-l is only a noun, while the former has verb forms. therefore, all references to "marshall" should really be "marshal". for example, "marshaling" or "unmarshaled".

Either is acceptable. Personally I like the double-l form better.

Send in the clones[edit]

We could add something about cloning using serialization. I wrote a Java example here : http://www.krunch.be/vrac/cours/04-05-2cinf/poo/CloneWithSerialization.java

Plain text[edit]

Writing out data structures in plain text ASCII is itself a serialization and any programming language that can handle text can do this. For example Java's toString() function is often used to serialize file formats rather than using the Serializable interface. The advantage of this primitive form of serialization is that it is simple. For example in C++ serialization is also implemented using streams. However streams have a lower level of data perspective. From an data objects perspective the end of file character is no important so implementing serialization while avoiding the pitfalls of streams is dangerous. However if serialization is implemented with C++ string then the string manages the memory buffer itself and the programmer is free to focus on just writing and reading the data structure. Or when nastly low level events occure they can be managed much better. In this case the primitive technology is better.

This kind of serialization I believe is a byte stream encoding. However it uses some universal character format such as ASCII so all kinds of programms and languages can understand it. For many file formats in applications space is not the issue, for example saving a users preferences in each file is often not that costly.

Also I belief Microsofts registary is a form of serialization. Qt a Gui framework also supports the registary concept accross multiple platforms.

Could someone please consider writing this perspective in the Serialization documentation. I am not confident about how to integrate this into the existing doc. As a programmer I came to this conclusion the hard way by writing with C++ streams, and then went back to the basic text files after much grief. So I am looking to separate serialization with low level implementation and managing text files is a valid way to do it.

Serialization using Qt[edit]

Can someone please give information on serialization using Trolltech's Qt (toolkit) library? The qt designer can save/restore the GUI in xml format, is there a tutorial how it is done? Thanks!

order[edit]

I think the code examples should be ordered alphabetically by programming-language name... this way, it looks like serialization support has a higher preference in certain language environments. what do ya think? 91.34.127.3 09:36, 9 July 2007 (UTC)

It's part of assembly language, if you read the fine print on XOR with an Intel processor. The endian considerations are naturally part of more modern languages. So, if you really wanted a list for the degree of support, it would be in reverse order of date released. BrewJay (talk) 16:11, 14 July 2008 (UTC)

Suggested change of wording[edit]

In the first paragraph it reads as follows:

...to transmit it across a network connection link, either in binary form, or in some human-readable text format such as XML.

In my opinion this should be changed as any communication using a network link is ultimately done in binary form and only after having been transmitted is, if necessary, re-converted into it's original source-format for example XML. The current wording could give the false impression that XML can be sent over a network as is; which is not possible. In the first sentence:

into a sequence of bits

should be

into a sequence of bytes

[edit]

Hello,

For this revision, does Wikipedia allow this type of advertisement ?

This is just a question —Preceding unsigned comment added by 213.56.245.172 (talk) 15:24, 3 October 2007 (UTC)


I'm in favor of removing it, this is not related enough to the subject and there is an open source alternative to this exact library that's not even mentioned. I will remove it, if anyone thinks this ad is justified please argue below. DanyX 17:50, 20 October 2007 (UTC)

Relationship between serializing and differential execution[edit]

I took the liberty to add a paragraph (in the Uses section) about the relationship between serialization and differential execution. I hope nobody objects too much. I think differential execution is a technique that every programmer should have in their toolkit and know when to use it. Basically, the idea is that whenever a simple, structured procedure executes, it goes through a series of decision points. If it makes a record (by serializing) of these decision points, it can later replicate the path it took (by deserializing). If it does this simultaneously with another execution, it can tell how it is differing from its prior execution. It can also serialize/deserialize arbitrary data along the way and see how that has changed. If the data being serialized/deserialized are the properties of remote objects, such as controls in a user interface, those objects can be updated incrementally. For a trivial cost in performance, the benefit is a major reduction in source code. MikeDunlavey (talk) 14:14, 26 November 2007 (UTC)

SAVE ... that's the short definition.[edit]

When I read the word in IBM manuals about architecture, serialization was a step taken for using semaphores and inter-process communication. It ensures integrity of data that more than one processor uses. For example, before data from a buffer in RAM was used by the I/O channels, the CPU would execute a serializing operation--buffer flush, basically. The article doesn't contradict that idea. It seems to be about pretty much the same thing. BrewJay (talk) 10:47, 14 July 2008 (UTC)

Exception handling flawed in the example code[edit]

Yes, it's not the main concern in the examples, but a stream must always be closed inside a final clause. Also, the main method should throw the exception instead of ignoring it...

193.167.3.32 (talk) 14:08, 16 March 2009 (UTC)


Human-readable Serialization[edit]

Anyone know why the "Human-readable serialization" section goes from describing serialization to "Encoding"? Sounds like Serialization is equal to encoding according to this section, as in "Human-readable encoding". —Preceding unsigned comment added by 151.151.7.52 (talk) 17:42, 15 January 2010 (UTC)

Too many/verbose examples[edit]

This article contains too many examples, and most of them are a lot more verbose than necessary. We don't need examples for every language that supports some form of serialization (WP is not a manual), and we don't need an example that spans over several files. Any comments before I go ahead and trim that section? – Adrianwn (talk) 11:45, 1 June 2010 (UTC)

I removed all examples because they don't really add to the understanding of serialization, and Wikipedia is not a programming cookbook. Additionally, I removed advertising and all links for various libraries. If anything, such links belong in the External links section or in a separate "Comparison of serialization libraries" article. – Adrianwn (talk) 14:51, 6 June 2010 (UTC)

What about data marshalling?[edit]

The term Data Marshalling redirects to this page, but the term isn't explained.

Unserialize or deserialize?[edit]

The text uses both terms without explaining if one or both are correct. Does anyone know? Fabiovh (talk) 07:15, 29 June 2010 (UTC)

As far as I know, "deserialize" is the correct term. The article uses it only for PHP, where the deserialization function is called "unserialize", and for external links, where the title uses this word. – Adrianwn (talk) 07:36, 29 June 2010 (UTC)

Language-independent serialization and related concepts[edit]

I'd prefer a short but good description of the general concept of serialization with references to related topics instead of endless code examples. Description of the underlying theory (Type systems) is poor and language-independent serialization formats like Apache Thrift, Protocol Buffers, Etch, Hessian etc. are not even mentioned. -- JakobVoss (talk) 09:40, 28 July 2010 (UTC)

Additional Programming language support[edit]

C++[edit]

Why not including the open source boost::serialize library ? It provides serialization in text, binary or xml archive. — Preceding unsigned comment added by Erekose64 (talkcontribs) 09:52, 30 March 2011 (UTC)

Javascript[edit]

A popular form of serialization for JavaScript is JSON (JavaScript Object Notation). Full details of JSON are available at http://www.json.org/.

Many languages are capable of handling JSON serialised data.

RQuadling (talk) 12:02, 9 September 2010 (UTC)

BSON[edit]

To add to the comment regarding JSON (which I agree, is quite popular today), a derived "open" serializations standard named BSON seems to be catching on. It is effectively a binary version of JSON, still a bit more verbose than some serialization methods, but is open and (mostly) directly convertable into JSON. The MongoDB project uses this as its native data storage format.

Perhaps a section on "open" vs. closed/proprietary serialization methods would be useful.

see: http://bsonspec.org/ —Preceding unsigned comment added by Boomhauer (talkcontribs) 21:23, 21 September 2010 (UTC)

Shady links[edit]

The second link in External links, http://www.studentacad.com/post/2009/11/26/aspnet-Callback-technique-using-csharp.aspx, results in this warning in Firefox 3.6:

"Reported Attack Page! This web page at www.studentacad.com has been reported as an attack page and has been blocked based on your security preferences. Attack pages try to install programs that steal private information, use your computer to attack others, or damage your system. Some attack pages intentionally distribute harmful software, but many are compromised without the knowledge or permission of their owners. "

--Mortense (talk) 17:02, 11 February 2011 (UTC)

Why not a giant list[edit]

This article seems to be mostly examples of serialisation, in the form of one or two line statements. At one point it even seems to devlove into what appears to be a direct debate between two or more contributors (Why not serialize everything? under the Java section). — Preceding unsigned comment added by 203.167.234.102 (talk) 03:39, 7 March 2012 (UTC)

Good encyclopedia writing![edit]

"I had a nasty example of this with some student's code that used Swing classes that were "provided" serializable. "

Please fix :) — Preceding unsigned comment added by 132.64.26.158 (talk) 10:21, 12 March 2012 (UTC)