Write once, run anywhere
7 February 2008 - 14:59Yesterday I created my first Linux application. I copied the source files from the Windows box, compiled them, and there it was. It was that simple. The tool with which I accomplished this task was Lazarus, a cross-platform rapid application development system based on Free Pascal, which I have been using for several months now under Windows.
Lazarus is often described as a free, open source clone of Borland Delphi. It certainly looks like Delphi (pre-BDS) and works a lot like Delphi. The Lazarus Component Library (LCL) has most of the same components as Delphi’s VCL and the components have many of the same properties and methods. Lazarus compiles most Delphi source code without errors.

But to describe Lazarus as a clone of Delphi is to ignore one of its major features. Unlike Delphi, Lazarus has been designed from the ground up to be cross-platform. Borland’s unsuccessful Linux version of Delphi, Kylix, was a separate product with its own, separate component library. It couldn't compile the same code. But Lazarus is really “write once, compile everywhere.” As long as you avoid the use of platform specific API calls in your code, your program will compile and run on any supported platform.
The only fly in the ointment at the moment is the varying degrees of support for each platform. Windows and Linux/Unix are more or less all there. Lazarus can even create programs for Windows Pocket PCs. However, while Lazarus can create Macintosh programs, they rely on X for their window manager, so they don’t have the OS X look and feel. Mac developers tell me the LCL support for Carbon still has a long way to go before it is usable in the real world.Delphi developers frequently say that Delphi is the best, most productive development system for Windows, bar none. Which must make Lazarus the best free open source development system by a long way.
Lazarus is the product of a small team of volunteer developers. It has taken a long time to get where it is today. The current release is version 0.9.24 beta, and it will still be a while before version 1.0 appears. Nevertheless, particularly for Windows and Linux development, it is a fast and capable development tool that is well worth a look.
Trackback link:Please enable javascript to generate a trackback url
Leave a comment