Re: A question of size.. size matters :)
From: Alisdair Meredith [TeamB] (alisdair.NO.SPAM.PLEASE.meredith_at_uk.renaultf1.com)
Date: 12/29/04
- Next message: Roman Kaßebaum: "Re: limit of lines?"
- Previous message: Liz: "Re: limit of lines?"
- In reply to: Liz: "A question of size.. size matters :)"
- Next in thread: Wayne Niddery [TeamB]: "Re: A question of size.. size matters :)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Dec 2004 02:05:50 -0800
Liz wrote:
> If you have a project. With hiddious naming convetion to prevent me
> from think that goes
>
> Form1 which is an MDI form
> Form2 whcih is an MDI child
>
> Obviously, form2 is the grunt of the app.
>
> If I have a routine that will be running on Form2, which I dunno, goes
> through and highlights all the word "delphi" for want of something
> better to do. Or caculates various values anyway, some grunt task..
>
> Is this more memory efficient being on the MDI form and thus in
> existance once, or on the child form, what are the pros and cons for
> each??
Generally speaking, the grunt-work should not be done in your form at
all, but in another unit dedicated to the application logic <g>
Separating out the 'presentation layer' (or UI) from the grunt work
leads to a much 'cleaner', more flexible design. It is also easier to
look into your optimisations, as you are no longer worried about UI
issues when handling the core logic (UI is rarely the performance
bottleneck)
Other than that, it would rarely make a measurable efficiency
difference if you put the calls into the MDI frame or child - unless
you have 100 children or something really unusual. Best to put the
logic where it most ready belongs - one the child if manipulating the
child form, or the frame if manipulating elements of that form. If you
split the logic into a separate unit as suggested, and apply the
observer pattern, you might end up with logic on both forms!!
AlisdairM(TeamB)
- Next message: Roman Kaßebaum: "Re: limit of lines?"
- Previous message: Liz: "Re: limit of lines?"
- In reply to: Liz: "A question of size.. size matters :)"
- Next in thread: Wayne Niddery [TeamB]: "Re: A question of size.. size matters :)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|