On Mon, 23 Jul 2007, Al Boldi wrote:
> Graeme Geldenhuys wrote:
> > Hi,
> >
> > What are the pros and cons for letting the form designer add code
> > inside the .pas unit instead of a separate .lfm file?
> >
> > For example:
> > Lazarus and Delphi uses external files (.lfm and .dfm) to save
> > information about forms designed using the form designer.
>
> .dfm is a straight copy-cat from VB, to obscure code structure for beginners.
> It's probably one of the worst mistakes Delphi could mimic
>
> > Visual Studio and CodeGear's C# IDE's use the source code unit
> > directly instead of a external unit. They embed the form/component
> > creation code inside a private method called from the constructor. The
> > code in that private method is also wrapped in C# Region so that it is
> > hidden by default with code folding.
>
> Java always did it like this, and now others are starting to mature.
Java did it, because they had no other choice.
The JVM did/does not support resources.
> > So again, what is the pros and cons between the two design choices
> > when using the Object Pascal language?
>
> .dfm is good for beginners, who get confused looking at code they didn't
> write.
>
> .pas is good for pros, who need to take control of their project code.
Obviously you are unaware of the real reasons the .dfm mechanism was used,
otherwise you would not use such unappropriate demeaning tone.
There are/were good reasons for it's use. These reasons may have been
outdated, but at the time, they were certainly valid. It was (and is,
in my opinion) a defendable choice. I have not seen you give any valid
and objective reasons why code is better than resources. Unless you
plan to give such reasons, I suggest you abstain from such demeaning
comments.
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives