[Lazarus] [ISSUE] FCL-Web and LazReport

Alexander Klenin klenin at gmail.com
Sat Jan 19 10:31:47 CET 2013


On Sat, Jan 19, 2013 at 4:17 PM, leledumbo <leledumbo_cool at yahoo.co.id> wrote:
> Alex, could you try porting LazReport to nogui?
Aside: "Alex", "Alexey" and "Alexander" are very different names in Russian.
Please do not confuse me by using the wrong name ;)

> AFAIR, the problem is the
> same as TAChart, it requires to draw somewhere.
I have taken a look. Unfortunately, the LazReport turned put to be
almost exactly equivalent
to old FastReport library (most units even still retain copyright
header from there).
Which is bad news, becase FastReport/LazReport is, shall we say, not
an example of proper design.
Most basic units, including LR_Class, use not only Graphics, but
Forms, Dialogs, Menus, and more.
There are inexplicable things like
try ... except ShowMesage(...) end
calls to MessageDlg from the setter of TfrObject.Name property, etc.
I see several possible ways forward here:
1) Add a lot of IFDEFs. In the general case, mass-IFDEFs are horrible idea,
  but this code is already a pain to look at, and selecting nogui
widgetset is compile-time decision anyway,
  so perhaps it is feasible.
2) Do a "slow rewrite", by progressively rfactoring and improving
code, with gradual breaks of compatibility and
  appropriate deprecation periods, until the code gets in decent
shape. This is a "proper" way, but requires much work and time --
about a year for the dedicated maintainer.
3) Do a "fast rewrite" -- just throw away this code and use something
else, or write it from scratch. This is basically what everyone else
in this thread are suggesting. As much as I dislike "second system
syndrome" (http://www.joelonsoftware.com/articles/fog0000000069.html),
this might be a reasonable course in this case.

--
Alexander S. Klenin




More information about the Lazarus mailing list