try-catch-FAIL

Failure is inevitable

NAVIGATION - SEARCH

Come See Me At CodeStock 2011!

The lineup for CodeStock has officially been announced, and this looks to be the best CodeStock yet.  As usual, there’s going to be a great group of speakers and sessions.  I will be presenting two sessions at CodeStock this year.  This first, Build Your Own Application Framework with ASP.NET MVC 3, will be a two hour session covering some of the best practices I’ve picked up over the years while building MVC applications.  In the second session, Test-Driven Development Using SpecsFor, I will show you everything from the basics of unit testing to the art (and benefit) of do... [More]

Fluent XML Serialization–Part 2: Compiling Serialization

The design and implementation of Fluently-XML’s domain-specific language was covered in my last post.  The language builds up configuration information that must then be transformed into a form that’s useful for performing serialization and deserialization at runtime.  In this post, I’ll show you how that translation occurs. The Configuration Data As I illustrated in the previous post, Fluently-XML’s domain-specific language (DSL) does little more than translate calls into configuration data.  The most complicated translation is the DetermineIdentityBy ... [More]

Fluent XML Serialization–Part 1: The Domain Specific Language

Serializing objects to XML is easy in .NET thanks to the XmlSerializer class, but developers will quickly find that the built-in serializer is limited and not easy to extend.  A more flexible approach is needed to support complex serialization needs. Today I’ll show you Fluently-XML’s domain-specific language for configuring serialization behaviors, and I’ll dive (a bit) into how it’s implemented. Warning: I confess that I am a newb at creating domain-specific languages (DSLs).  I may very well have approached the design and implementation of the DSL in completely the wrong way.... [More]

Fluent XML Serialization–Introduction

The System.Xml.XmlSerializer class enables .NET applications to serialize/deserialize most types to and from XML using only a few lines of code.  This is a great capability and provides an easy API for simple persistence and interoperability scenarios.  As a developer, you have some degree of control over the XML that’s generated, but the process is mostly rigid and not easy to extend or customize.  There are also numerous “gotchas” around XML serialization, such as the inability to serialize IDictionary types, the inability to serialize and deserialize interfaces, and no suppor... [More]