Article View: comp.lang.pascal.delphi.components.usage
Article #14Re: Design patterns in the modern IDE (Delphi, MFC, etc.)
From: Simon Withers
Date: Thu, 25 Feb 1999 00:00
Date: Thu, 25 Feb 1999 00:00
86 lines
4645 bytes
4645 bytes
Andy Bulka wrote in message <36D493F5.50595534@netspace.net.au>... >Summary: Can anybody spot the patterns in existing development tools >(e.g. Delphi, Toolbook, VB) and tell me how to leverage those pattern >architectures in combination with hand coded patterns that I read from >pattern books? I haven't actually looked for patterns in Delphi, but there are a few that come to mind. >Of course patterns summarise what is best practice - so >there will always be patterns to be found in modern development >environments and their class libraries. I'm thinking more of what >facilities, components, concepts and class libraries modern development >environment vendors are already providing us, without necessarily >calling them 'patterns'. > >More specifically, I want to know what patterns are being used in say, >the Delphi VCL or the Microsoft Foundation Class Library. Has anybody >ever gone through and identified the patterns being used in say Delphi? While reading Pattern Hatching, I was struck that Delphi's method of deriving a class from TForm for the developer to use, is a bit of a twist on the Generation Gap pattern that Vlissides describes. Object destruction for classes in the VCL is (I suspect) an implimentation of the Template Method pattern, as the coder calls MyObject.Free, which is defined as a method of TObject (Delphi's base class), which in turn calls the virtual Destroy method. >e.g. again, the idea of components having events must be a well known >pattern... I would expect that there is a pattern for this written up somewhere. Basicly, a component has a set of method pointers, which it calls at appropriate times, and that the developer (and the environment) can set to point to method that are to be executed at that appropriate time. > And data-aware components - aren't these implementing the >'observer pattern'? ActionLists in Delphi (version 4) I think are >a variation of observer. I haven't looked at the source, but their behavior implys that they could very well be. >Datasource component - proxy pattern >perchance? I don't think so. From the description of the Proxy Pattern at http://rampages.onramp.net/~huston/proxy.html "You need to support resource-hungry objects, and you do not want to instantiate such objects unless and until they are actually requested by the client. " I don't see the Datasource Component working that way. To me it creates a single interface for a few different other components (TTable and TQuery) Which to me sounds more like an Adaptor or a Bridge. >Secondly - I am particularly interested in the MVC >(Model/View/Controller) >architectural pattern and how to implement it in a modern >environment like Delphi. (I know Smalltalk has MVC built in, and Java >programmers have MVC in Swing - but am ignorant of the details). I >don't want to write tons of code to implement MVC - hopefully I can >LEVERAGE some of what Delphi already has! > >For example, in some sense, data-aware components >provide multiple 'views' of the same 'data/model', so by using these >Delphi components, I may be getting a cheap & easy Model/View/Controller >implementation - aren't I? (assuming I write my new 'views' as >combinations of data-aware visual components...) I'm thinking that that is what you're getting. Simon
Technical Details
Message-ID:
<36d5bfa5.0@nemo.idirect.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36D493F5.50595534@netspace.net.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb0ea,13afa353adbef604 X-Google-Attributes: gidfb0ea,public X-Google-Thread: 10baee,13afa353adbef604 X-Google-Attributes: gid10baee,public X-Google-Thread: f973b,13afa353adbef604 X-Google-Attributes: gidf973b,public X-Google-Thread: 112b07,de053e35de59c6e8,start X-Google-Attributes: gid112b07,public X-Google-Thread: fe2ce,de053e35de59c6e8,start X-Google-Attributes: gidfe2ce,public X-Google-Thread: 1108a1,13afa353adbef604 X-Google-Attributes: gid1108a1,public X-Google-Thread: 109fba,13afa353adbef604 X-Google-Attributes: gid109fba,public From: "Simon Withers" <simon@idirect.ca> Subject: Re: Design patterns in the modern IDE (Delphi, MFC, etc.) Date: 1999/02/25 Message-ID: <36d5bfa5.0@nemo.idirect.com> X-Deja-AN: 448458336 References: <36D493F5.50595534@netspace.net.au> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Trace: 25 Feb 1999 16:24:53 -0500, darthvader2.idirect.com Organization: via Internet Direct Newsgroups: comp.lang.pascal.delphi.components.usage,comp.lang.pascal.delphi.misc,comp.lang.pascal.delphi.components.writing,comp.object,comp.lang.c++,borland.public.delphi.vcl.components.using,borland.public.delphi.vcl.components.writing