Re: A component to Simplify Mdi with Data Maintanance?
From: Stefaan Lesage (Stefaan.Lesage_at_Peopleware.be)
Date: 12/12/03
- Next message: Alain Falanga: "Tail -f in Delphi"
- Previous message: Arne Birkeland: "Re: Delphi -> Symbian OS"
- In reply to: Marcello Dias: "Re: A component to Simplify Mdi with Data Maintanance?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Alain Falanga: "Tail -f in Delphi"
- Previous message: Arne Birkeland: "Re: Delphi -> Symbian OS"
- In reply to: Marcello Dias: "Re: A component to Simplify Mdi with Data Maintanance?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|