[Dev-sig] Pattern/technique/class-wrapper question

Emerson, Tom Tom.Emerson at wbconsultant.com
Fri Nov 3 11:23:41 PST 2006


> -----Original Message----- Of Bryan Backer
> The DAO pattern seems like a nice, abstract description
> if you're going to implement the actual
> serialize/unserialze or freeze/thaw logic
>  (like your included examples).

Thanks.  I had intended this to be a "discussion topic", i.e., I'm not
seeking a solution to any particular problem at the moment.

> I don't know what your target language is, but
> if you're going to be implementing many objects or
> structs like this, you might consider using something like
> hibernate

I was going to put in a disclaimer/apology about my "example" looking a
lot like visual basic(*), but as Robert pointed out, it's the _ideas_,
not the _implementation_ that is important for this discussion.

[...]

That said, I did notice(**) some parallels between my examples and the
first link Robert supplied -- for instance, my first suggestion actually
matched the first "pattern": essentially, encode the database-specific
"stuff" directly into a class (that implements an interface); when you
change databases, you create a new "implementing" class that matches the
existing "interface".  (VB can do some interface/implements type stuff,
but it's a bit of a pain, especially when working with legacy-code
designed and built when VB3 was all the rage...)

Tom

(*) I'm beginning to liken "VB" with "COBOL" -- everyone wishes it would
just go away, but it still puts the majority of bread on the table in
the IT world... ;)  In another 20 years, it might be Java, it might be
C, or it might be something else entirely...

[and yes, both COBOL and VB will STILL be there when the next
"language-du-jour" is considered "a dinosaur"...]

(**) And here I'm thinking "gee, I don't know a THING about patterns",
when it turns out I'm already using them without knowing it... ;) 


More information about the Dev-sig mailing list