Re: OOP style




"swansnow" <schultz@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1124979309.755732.296890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> 2) If you have a procedure that is, say 200 lines long, do you break it
> down in to more modular methods (Extract Method refactoring)? How do
> you organize your unit if you have several "main" methods (like to
> respond to a Save button, and a Load button, and a Preview button) and
> a bunch of "helper" methods (if you have broken down your Save, Load,
> and Preview methods)?

I was taught to design program code using a top-down methodology. It
provides a fairly natural guide to breaking up code into manageable
segments.

Don't forget that Delphi supports nested routines. I use them extensively
since it keeps related code together while allowing for logical separation
and protecting local data from outside influence. The flat structure of C
derivatives don't offer this gem, and are poorer for it.


.


Quantcast