Home > Articles > Programming > .NET and Windows Programming

Understanding C# Object Serialization and Object Graphs

  • PrintPrint
  • Share ThisShare This
  • DiscussDiscuss

Like this article? We recommend

Do you think object serialization is complex and difficult? It's not! The C# language includes some powerful mechanisms for controlling and fine-tuning the serialization and de-serialization process. In addition, you can transport serialized objects and object collections to web services and other back-end computing facilities. Stephen B. Morris describes how to get started.

Complex Terms in a Maturing Software Industry

I’m often struck by the overuse of complex terms to describe what are in fact simple concepts—persistence layer, web tier, servlet filters, etc. The term persistence layer basically refers to the area of code that interacts with some persistent storage—usually a relational database. The web tier is the section of software that provides web access. Servlet filters refer to the URLs processed by a web application/servlet.

Each such term is readily understood when it’s explained in a simple way. So why is the software industry permeated to such an extent with unnecessary complexity? Some clues to this need for obfuscation can perhaps be found if we look at other industries, such as the financial sector. I often listen to the analysts on Bloomberg.com, and after a few years I’ve begun to understand the secret language of "yields," "going long," "derivatives," and so on. It seems that as an industry matures, so does its appetite for jargon, and maybe this is happening in the software sector. It’s hard enough trying to understand the technology without having to first translate the descriptions! Excessive complexity in many ways is the enemy of widespread adoption. End of soapbox.

In this article, I describe the C# object serialization mechanism—this is the means by which you can store C# objects to stream-based storage. As you’ll see, C# object serialization is both powerful and flexible, while also being easy to understand. Let’s get down to some background on the area of serialization.

  • Share ThisShare This
  • Save To Your Account
Essential C# 2.0

Like this article? We recommend

Essential C# 2.0

Learn MoreAdd To Cart

Discussions

comments powered by Disqus

Related Resources

#TuesdayTrivia: Spotlight on WP7 (Win a copy of Sams Teach Yourself Windows Phone 7 Application Development)
By on May 2, 2012Comments
These days, what CAN'T a smartphone do? Microsoft is putting their own spin on things to help you experience "life in motion" when using your device. Instead of containing static application icons, the re-imagined Start screen features live Tiles showing real-time content updates.

March Trivia #1: Let there be light! (Win Microsoft Visual Studio LightSwitch Unleashed)
By on March 13, 2012Comments
Want a simplified self-service tool to help you build business applications for the desktop and beyond? Microsoft programmers… meet Visual Studio LightSwitch.

February Trivia #2: There's an App for That (Win Sams Teach Yourself iOS 5 Application Development in 24 Hours)
By on February 28, 2012Comments
In less than a decade, the iOS platform has changed the way we think about mobile communication.

See All Related Blogs