Review: Getting Started with Lazarus IDE by Roderick Person

Recently I came across a new Lazarus book, Getting Started with Lazarus IDE, by Roderick Person (that’s not a typo by the way – there is no definite article in the title). This is a small book (only a hundred pages) put out by Packt, a small publisher with a growing catalogue. While you can purchase just the ebook, I bought the printed/ebook package from the Packt website, which still only cost £15.

The book is presented as being for Delphi programmers interested in Lazarus in the first instance, and any other developers used to RAD environments in the second. As such, it begins by walking through how to install Lazarus on Linux, Windows, OS X and FreeBSD. Following this, the next thirty-five pages or so (up until half way) are taken up by a quick tour of the IDE itself, brief descriptions of the core components of the Lazarus Component Library (LCL), discussions of how to create ‘hello world’ console and GUI applications, an overview of the Lazarus debugger, and an introduction to the IDE’s rename refactoring.

While nicely written, I found this section a little uneven – words are spent on introducing the Object Inspector, for instance, when this is something that works identically to the Delphi version. Conversely, the Project Inspector – Lazarus’s substitute for what on the face of it is Delphi’s rather more fully featured Project Manager – is not mentioned at all, despite actually appearing in a screenshot.

As an aside, while this is no reflection on the author, I did find Person’s description of how to create a Lazarus console application remarkable given how much code was needed simply to output ‘Hello World’. While good ol’

program HelloWorld;

  WriteLn('Hello world');

is still possible, the IDE defaults to bringing in a rather overwrought console application framework. This leads Person having to devote six pages to walking though how to write a console-based ‘Hello World’ followed by less than two for the GUI version!

Once the book gets to half way, chapter 4 tackles the topic of how to convert a Delphi/VCL application to Lazarus and the LCL. I found this chapter very well pitched, with many useful tips presented. Following it, chapter 5 provides an introduction to Lazarus custom component writing. I confess I came out of this being slightly amazed at how the Lazarus team have managed to keep their photocopiers working even when it comes to core parts of Delphi’s Open Tools API! The final two chapters of the book then provide a valuable overview of the Lazarus Documentation Editor (LazDE), followed by a somewhat less obviously useful account of rebuilding the Lazarus IDE to use the GDK+ widgetset on Windows rather than native Win32 controls.

Overall, I found the book easy to read, and with two very solid chapters (4 and 6). At other times I found it a little inconsistent in its focus however – in particular, while the best chapters were clearly aimed towards the book’s stated primary audience, namely Delphi developers, others seemed to assume very little prior Delphi knowledge. Because of that, parts of the book can cover things that most experienced Delphi developers will know off of the back of their hands. A related issue is that the author doesn’t appear to have used any modern version of Delphi. For example, when first presenting the Lazarus IDE, a comment is made about how similar it looks to the Delphi IDE – which is true, but only if you are using Delphi 7 or earlier. Likewise, mention is made when discusing 64 bit compatibility that the PtrInt/PtrUInt types should be used instead of Integer when you need to typecast from a pointer to an integer or vice versa. While that’s good advice in itself, Person doesn’t seem to be aware that Delphi defines NativeInt/NativeUInt types for the same purpose, and has done so for quite a few versions now.

Nonetheless, this shouldn’t detract from the fact that when the book maintains a clear focus, it presents its material well. Also, while it is small, it is also cheap, so if you’re interested in Lazarus, check it out.


12 thoughts on “Review: Getting Started with Lazarus IDE by Roderick Person

  1. >which is true, but only if you are using Delphi 7 or earlier

    Delphi ended at version 7, just like there were only three Star Wars movies ever made. 🙂

    • Perhaps for you, Delphi is very powerfull and nice, if only embarcadero could focus more in quality and less in money, it would be a killing RAD product. but… that seems will never happen, i’m giving up with delphi and I start switching to lazarus, and other languages farewell Delphi, it was nice working with you.

      • Pardon? In your comment, you’re doing a pretty good impression of a Delphi fan whining about how C# will never catch on…

        • Your right about it, my developer tool is increasing its monetary value without proportional quality. I guess that embarcadero is focusing in other kind of customers and i simple to fit in that target. that let me whining and sad.

          • Felipe – please, leave off the passive-aggressive act. My post was a review of a Lazarus book, not Lazarus itself. Get it?

          • Sounds to me like Felipe is unhappy about Delphi and is bidding farewell to Embarcadero. He is switching to Lazarus.

  2. Ptrint/ptruint are supported by FPC since 2003/4 when 64-bit support was started.

    I personally added the nativeint/uint aliases when I became aware of them, but it took some time to get to production; these are only in Lazarus versions that have 2.6.0, so say may 2012 or newer, which is not that long. FPC still uses ptrint/ptruint everywhere btw.

    If the book has been in production for a while, the choice is thus not that strange.

    • FPC still uses ptrint/ptruint everywhere btw.

      Which is perfectly reasonable, given these are the types it had before DCC got its NativeInt and NativeUInt. My point (which wasn’t a big one) was that the author didn’t realise NativeInt and NativeUInt exist in Delphi, not that he didn’t realise they exist in FPC (which as you say, is much more understandable).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s