Linux GUI Development: Lazarus 0.9.30 review and screenshots
This blog is part of a series looking at programming tools on linux and covers Lazarus 0.9.30
EDIT: Since I wrote this Lazarus v.1 has been released so I’ve updated my review here.
I’ve always liked Wirthian languages since programming in Modula-2 and university and Delphi late because they’re very readable and promote good programming practices in the structure of the language. Also, I like Wirth’s law “Software is getting slower more rapidly than hardware becomes faster.” from A Plea for Lean Software even if it wasn’t actually him that came up with it.
When I made the jump from Windows to Linux I was on the search for a nice high level language to do GUI development stuff in. In searching I came across Lazarus. Lazarus is a free cross-platform IDE which provides the Delphi experience for Linux (and Windows). Rather than Java’s “write once run anywhere” Lazarus aim’s for “write once compile anywhere” courtesy of the Fee Pascal Compiler (FPC). On top of the compiler Lazarus comes with the LCL (Lazarus Component Library) which gives a single interface for GUI programming despite underlying differences in implementation.
Lazarus is at 0.9.30 so it’s not a v1 product yet… However I’m not going to give much benefit for that since it’s been around for both windows and linux since 2008 and is available from the Ubuntu Software Centre.
Oh dear… the most important part of a software package, since if it fails your software doesn’t get used and for Lazarus it just sucks! When I first tried to install Lazarus it took me over 20 times to get it actually working. A comment from the Lazarus forum replied: “…20 times isn’t that much…” as if this is acceptable. Ok, so it’s free and open source but if it’s not accessible people won’t use it. It’s so hard to get running I’ve posted twice on the topic (and had a significant amount of hits from people with the same problems).
Worse, upgrades to Ubuntu have totally broken the installation and it’s not properly compatible with the new Ubuntu overlay scrollbars leading to focus problems with windows, text boxes and menus.
Basically, unless you really care it not going to be easy to get going. 1/10
Once I finally got it running my immediate reaction was summed up by the word “w00t“. Despite the always ugly multi-window layout here was an environment and language I knew like the back of my hand (so long as I rewind my memory 15 years) and could quickly put together good looking cross-platform apps in minutes 🙂
It is possible (by recomiling the IDE) to get a single window mode which is a bit more modern. I was little disappointed to see that it didn’t have multi-project support but at least it’s solid and works if a little old-fashioned feeling. 6/10
WARNING: Due to problems with focus, the current version is close to unusable in Ubuntu 11.10.
The GUI designer is solid and works well. Guidelines, alignment indicators and a pretty good set of visual components make putting together a simple form trivial. There’s no layout controls as you get in many newer GUI IDEs (flex boxes, tables, fixes vs.s flow etc.) but the use of anchors and panels means this isn’t a problem. The GUI designer feels a lot like the Delphi designer 9/10
The code editor features all of the old colour schemes and look and feel of Delphi with all of the modern stuff you’d expect like code folding, code completion etc. The link between code and visual elements is easy to manage, especially with the excellent Actions feature. The Lazarus code editor is actually an improvement over the old Delphi editor 9/10
Global variables are still there, I understand taking them out would cause problems for supporting old code bases but it’s still a shame.
The language is a good simple OO implementation but it misses out on some modern features like extension methods, anon methods, iterators, code attributes/decoration, multi-cast events…
Generics have been added but they feel a bit like a bolt on in this version, especially as when compared to their simplicity in languages like c#. Here’s the same example I used in the c# mono review in Lazarus.
generic TGList<T>; = class Items: array of T; procedure Add(Value: T); end; TBlobList = specialize TGList<Pointer>; .... sb := TStringList.Create(); for n :=0 to Length(blobs.Items)-1 do begin sb.Append(blobs.Items[n].name); end; Memo1.Text:= sb.Text;
I’ve created my own base generic collection here and then specialised it for a custom type. All seems to work pretty well.
Finally.. there’s no (limited) garbage collection. Although visual elements are dealt with when you close a form (it’s normally too late by then if there’s a problem) there’s no garbage collection which means in that code above I need to change the TStringList.Create to:
sb := TStringList.Create(); try ... finally sb.Free; end;
All in all, although it used to be a neat elegant language, and it still is Object Pascal just feels a bit old fashioned and clunky now. Sadly I’m going to have to give this 6/10
The main feedback mechanism is the Lazarus site with wiki and forum. The forum’s fairly active but there seems to be an acceptance of problems such as the installation issues which is worrying. 7/10
Although the current version doesn’t really work with Ubuntu 11.10 the previous (and I hope future) configurations provide a pretty easy to use solid GUI design and code experience if a little old fashioned.
The community is reasonably active but a lot of the Lazarus usage seems non-English meaning the resources are sometimes a little hard to understand for me and since Pascal is a bit of a niche language these days there’s not much non-Lazarus resources that can apply (except for old Delphi resources).
Although I’m predisposed to be positive about Lazarus to be honest I can’t really recommend it unless:
- You’re an old Delphi developer looking for some nostaligia
- Someone who hasn’t accepted Delphi is dead (even the website set up to refute this http://www.isdelphidead.com/ is dead!)
- You need to quickly produce something very simple for multiple platforms and don’t know any other languages
|Overall||63% – Sadly not good enough