Saturday, June 04, 2005

Software Design Patterns

I need to return to the study of patterns. I've never gone through the Gang Of Four book, only worked on a few of the basic patterns that are widely discussed such as 'singleton', 'facade', 'factory' and 'abstract factory'. But none of those seems revelant for what I am trying to do.

For the presentation layer I want to expose collections of widgets and a limited view of certain widget properties. But the internal structure of the widgets I want to keep private. There are old dumb widgets that a current implementation uses. Those I need to read, and also still export to. But my current app will use smarter widgets, so I don't want to publicly expose the old dumb widgets at all. I thought I might make the old widgets internal structure a private class inside the collection class but I can't make that work - no way to make the individual widget properties available outside. Well, I'll keep working...

[update] Some browsing (see links below) led me to this good article posted at MSDN from August 2000: Engine-Collection-Class, a Design Pattern for Building Reusable Enterprise Components. It is long rather complete article, describing the details and benefits of using the ECC pattern, with components in C++ and a VB6 client app.

(Aside) It is very irritating that in VB currently properties must have the same scope for getters and setters. Seems obvious that one would like them to be different. And I don't see any good workaround to that.

What about Patterns references...

Let's see what Google gives us...

Portland Pattern Repository (wiki)

for "facade pattern":

Asynchronous Web services operations using JMS


Blogger Allan Wolff said...

Had an interesting discussion at the nerddinner when I asked Erik ? about what pattern to use for one problem I have. I should document it. I am redoing an old application in OOP fashion, so I now have an OO internal design, in particular for collections of class objects. And I have a method for persistance based on that model. But, I also want to support reading and writing the data from and to a legacy file format. How do I design that?

Erik suggested using Interfaces, which led to the discussion I mentioned in my post on the NerdDinner.

4:20 PM  
Blogger Allan Wolff said...

Came on a patterns oriented blogger who works for ThoughtWorks:

4:21 PM  

Post a Comment

<< Home