[Lazarus] fpdoc inheritance diagrams improvements

Marco van de Voort marcov at stack.nl
Sat Aug 21 23:45:38 CEST 2010


Warning: probably off-topic

----- "Bernd Kreuss" <prof7bit at googlemail.com> schreef:

> I have seen a lot of approaches to GUI design and GUI designers with
> other toolkits, they all use either a set of sizers of varying
> complexity for certain purposes (box, grid, gridbag, etc) and you are
> supposed to study and learn all their advantages and disadvantages
> and
> detailed behavior and experiment a lot before you are able to make
> even
> the simplest hello world form with only a label and two buttons and
> usually most of the time you are more effective when doing it
> manually
> because they all inherently resist the usage of a visual GUI
> designer,
> most GUi designers that let you design with these sizers literally
> suck
> comets through drinking straws.
> 
> And then there is the gigantic do-it-all-sizer-that-fits-all-needs
> approach of for example netbeans that lets you easily design a form
> with
> a real visual designer that really deserves its name but the code it
> produces looks extremely complicated.
> 
> I don't know who exactly invented the way the form designer and the
> sizing with the anchors works like it is now in Lazarus but I must
> say
> that its invention was truly a masterstroke. I can hardly imagine any
> way to achieve more flexibility with less complexity. I don't see any
> complexity at all. Components can be placed and sized freely and each
> side can additionally be anchored to something or left alone and
> thats
> already all there is to it. How can this be perceived as more complex
> than the usual two dozen different nested sizers hell that is used in
> many other toolkits?
> 
> I personally find the form designer and the anchoring is one of the
> best
> inventions since the invention of sliced bread.

Bernd,

it seems you are comparing Java with the pascal world. First off, the Delphi team didn't invent everything: the basis of it comes from the MS Windows API en WindowManager. That said, they did 'invent' some neat shortcuts. Add encapsulation in an OO framework (VCL) and you have the result that the lazarus-team tried to build upon and mimic.

As for java GUI and frameworks (netbeans, eclipse, ...; and your citation of layoutmanagers: gridbag, ... are my clues), they started with AWT (Abstract Windowing Toolkit) and later on Swing build on top of that, followed by SWT (eclipse's GUI component framework). The onset for them was a GUI that was definable in a portable way. Apparantly (as I was told), not all their intended devices had an underlying windowmanager/gui-framework that worked with a portable coordinate-system. They are "relative"-based and not "absolute". Think layouting of videomemory for instance: y(up->down) vs y(down->up). Some systems have no notion of a pixel, ...

that led them on to construing the "learn-to-use-before-actually-using" layoutmanagers of swing. 

As for editors: Delphi was the first to do it right (MS largely copied the concept from it for VB). In the java world (where you seem to come from), Borland had a pretty decent swing-designer in JBuilder before. Eclipse, JDeveloper, Netbeans... all followed. In Java there is no concept of .dfm/.lfm, so it is all constructed in code. Ofcourse that makes it complex.

And a final note on those designers in java: you can and always had the ability to use a NULL-Layout to use absolute layouting. That is the closest to the way Delphi does it.

kind regards,
Dimitri Smits




More information about the Lazarus mailing list