This is the mail archive of the
mailing list for the Cygwin project.
Re: rebase / STL set patch
- From: Jason Tishler <jason at tishler dot net>
- To: cygwin-apps at cygwin dot com
- Date: Wed, 31 Jul 2002 08:44:02 -0400
- Subject: Re: rebase / STL set patch
- References: <016401c22014$7cc6e700$1800a8c0@LAPTOP><20020630134832.GA1904@tishler.net> <023001c22078$d26c9150$1800a8c0@LAPTOP><20020701123502.GB1904@tishler.net> <009001c220fd$4ff90610$1800a8c0@LAPTOP><20020702212203.GC1776@tishler.net> <039b01c22219$f796fef0$1800a8c0@LAPTOP>
On Wed, Jul 03, 2002 at 08:44:03AM +1000, Robert Collins wrote:
> How does this approach sound:
> Use the Builder pattern to build the in memory representation. Use a
> second Builder pattern to build the on-disk representation. This is
> similar to your original design, but without the encapsulation issues.
> It's an improvement over the memento approach in the same respect, but
> may take a little more effort.
> i.e. we feed a stream into a parser that understands the syntax (you
> could review the parser pattern, but I think that is overkill for
> this). That parser uses a builder to generate the in memory database -
> and which other parts of setup can use if they have specific
> requirements (i.e. if foo is not relocatable, they call into the
> builder). Then at the end the in memory database is given a Builder
> and a stream for the builder, and calls into it to save the file. NB:
> the two builders will have the same abstract parent. (say
> "RebaseBuilder" is a parent of "RebaseIniBuilder" and
> What do you think?
If I understand the Builder pattern, then I don't think that it is a
good fit for the rebase configuration file design. You suggest that
RebaseIniParser is the Director and RebaseMemoryBuilder is the Builder
above -- this part is congruent with the Builder pattern.
However, you also seem to suggest that RebaseMemoryDatabase is another
Director. I thought that the Builder pattern uses a single Director to
drive multiple Builders. Additionally, now knowledge of the
configuration file syntax is known by both the RebaseIniParser and
RebaseIniBuilder classes which breaks encapsulation.
What do you think of my critique of your critique of my critique...? :,)