Re: A component to Simplify Mdi with Data Maintanance?

From: Stefaan Lesage (Stefaan.Lesage_at_Peopleware.be)
Date: 12/12/03


Date: Fri, 12 Dec 2003 16:25:21 +0100


> But of course iŽll look at your frameWork since one thing is
> perfect only at a time when something better appears.

Well building a FrameWork is not easy, but the thing I did works beatifully,
fast and reliable ( for now ). It is also very easy to build Master detail
relationships that way, since the only relation at design time is the
relation between two DataModules, the rest ( creating the detail forms,
putting them in tabs beneath a Record form ) is all done at run time.

The big advantages of my concept are :

1 ) I can let developpers work on each entity independantly.

For example I can give the task of developping the Customer entity to one
developper, who will build all the logic in the DataModule, and will
generate a List and Record screen ( both based on templates ), and indicate
on the DataModule what form class should be used for the List Form and what
formclass should be used as the Record Form.

The task of developping Orders can be given to another developper which will
do the same thing.

Once both developpers are ready, they submit their work. All I have to do
is indicate on my datamodule that there is a Master / Detail relation
between Customer and Order, and that they key to set up the relation is the
OrderID. That's all there is to do, the rest will be generated at runtime.

2 ) Consistent GUI

Since every List and Record form is based on a template, they all have the
same functionality. If you would look at the application you will see that
there is a lot of functionality in there already ( sorting, customising
columns, extensive filtering, storage of column and form settings, and much
more ).

Since the Lists are created independantly and they are linked as a detail to
another record at runtime, even all the Detail Lists have the same
functionality as a normal list.

3 ) Ease of use

Well consistent GUI will result in a much easier to use application. If the
user knows how to work with one List screen, he will know how to work with
every list screen, even those uses in a Master / Detail relation.

4 ) Code Reuse

Lots of template usage, which means lots of code reuse ( instead of Code
Rewrite ), if you would see the source files for the different List and
Record screens you would see that in each of those there is only very few
lines of code ( think max 50 lines on the most complex one ), all the rest
is in the templates, and the business logic is on the DataModuels

5 ) Easy maintenance

Bugs are solved pretty fast. Due to extensive code Reuse, solving problems
on the Template / DataModule level will solve the problem everywhere the
DataModule / Template is used.

Adding new functionality to the Base List / Record or Datamdoules will
result in the functionality automatically being inherited by all the
descendant lists / records and datamodules in the application.

6 ) Display indipendant

Since all the code resides for 95 % on each datamodule, I could easily
decide to use another form template starting from tomorow :-P

7 ) I could go on, but I'll stop here :-P

Main Disadvantages ( if you would call em that way ).

1 ) Propagation of bugs ( didn't know how to call it otherwise )

Well a bug in a DataModule or template form, will result in all descendants
having the bug. At least it's consistent that way :-P
As mentioned above, they are way easier to track and solve though.

2 ) Very OO

This isn't really a Disadvantage, but starting Delphi developpers might have
some problems with implementing it the correct way.

3 )

Well the most important disadvantage for you might be that developping the
architecture isn't something that is done in one day. I think it took me
about a month to think about the concept and another two to implent, test
and solve initial bugs.

But now I can create a new ( basic ) entity in one hour, complete with all
Master / Detail relationships to the exsisting entities in the application.

Anyway, it will be mostly up to you to create the architecture, since I
can't really provide you with the source of my FrameWork. I could help you
out with questions if you decide to make one yourself when time permits.

Regards,

Stefaan



Relevant Pages

  • Styles and Templates (Was Bend Word to your Will tweaks and questions)
    ... I Maggied the template and forgot :-) ... deal with lots of imported text done by unskilled users using the built-in ... On the other hand, if I produce a document that contains numbering, I may ... Each of these three lists would have nine styles. ...
    (microsoft.public.mac.office.word)
  • Re: Unpredictable behavior in WORD multilevel numbered lists
    ... "Automatically update" in the Modify Style dialog box works in the ... dialog box transfers the style definition from the template to the document. ... numbered lists, I finds that, when reloading the file, the lists and ... in heading 1; the chapter number has changed in all the headings, ...
    (microsoft.public.word.docmanagement)
  • Re: List Item paragraph style
    ... That's the point -- I haven't been able to figure out how to modify what is ... there and permanently modify the template. ... When I click the style group it brings up "list paragraph" but my ... paragraph spacing used in lists. ...
    (microsoft.public.word.numbering)
  • Re: Unpredictable behavior in WORD multilevel numbered lists
    ... you added the template, not evrytime you loaded it, ad deanH appears to ... numbered lists, I finds that, when reloading the file, the lists and ... in heading 1; the chapter number has changed in all the headings, ... and one has to make the connections all over again. ...
    (microsoft.public.word.docmanagement)
  • Re: Word 2007 Paragraph numbering/restart numbering; Legal doc
    ... Legal Numbering being explained was exactly what I need. ... select the number style for the Level 3 paragraph of your ... If you are creating a template then you may want to create a new ... That way the old Lists won't be ...
    (microsoft.public.word.docmanagement)