Sunday, October 16, 2005 

Builder [pattern] as an option

In the past few days I've found myself talking twice (in two different companies) about XML serialization and the Builder pattern.
The decision between using a Builder (basically exploring a DOM and creating different classes as needed) or using language-specific features (like serialization attributes or the SOAP serializer in .NET) is easy to take in some contexts, and harder in others. Usually, it's hard when it's too early to decide. While running today :-), I realized that this is a perfect example where you can cheaply "buy" a modularization option and postpone the decision for a while. Just add a Builder class, it's very cheap. If you need a real builder, you'll have the right hook already there. If you can go with language-specific features, the Builder will end up being very simple, like creating the concrete serializer and little more. For more on options, see my previous posts, Real Options and Software Design and Kicking reuse in the A$$.

Labels: ,

Comments:
Mi sto accorgendo proprio per un programma su commissione svolto in fretta e furia quale può essere il valore aggiunto del Design ad un progetto. Man mano che vado avanti ritrovo tutti quei problemi (dovuti più che altro a tempi di consegna iniziale brevissimi) che spesso accenni nei tuoi articoli. Penso che raggiunta una certa stabilità prenderò il lavoro svolto come prototipo e passerò alla fase di sviluppo vero e proprio :-)))
 
Post a Comment

<< Home