< Back to index

Lazarus is a cross platform Visual IDE developed for and supported by the open source Free Pascal compiler. It aims to provide a Rapid Application Development Delphi Clone for Pascal and Object Pascal developers.

Free Pascal is an open source compiler that runs on Linux, Win32, OS/2, Mac OS X, BSD, 68K and more. It is designed to be able to understand and compile Delphi syntax, which is Object Oriented Pascal. Unlike Java which strives to be a write once, run anywhere, Lazarus and Free Pascal strives for write once, compile anywhere. Since the exact same compiler is available on all of the above platforms, there is virtually no need for recoding to produce identical products for different platforms.

On Microsoft Windows, Borland Delphi is still more stable and has a better documentation, but it lacks the multi-platform ability of Lazarus and its transparancy and customizability. On Linux, Delphi applications can be compiled with Lazarus and vice versa with a little adaptation of the program.

Lazarus and UI access


LCL


The Lazarus GUI subsystem is called LCL (Lazarus Component Library), which is basically a set of visual and non visual component classes over a Widget toolkit dependent part. The LCL has been modelled after the Delphi VCL, but is not 100% compatible, and this is by design out of multi-platform considerations.

Interfaces - Widget toolkit dependence


In Lazarus terminology, this part is called simply "the Interface". Actually it's more like one Interface per Widget toolkit.

The current status of Widget toolkit Interface is roughly like this:
* win32 GDI support (win32 native) is in mainstream use.
* GTK+ 1.2.x is in mainstream use (Unix derivatives including Mac OS X)
* GTK+ 2.x is under development, and parts are working already. Mostly interesting because of better internationalisation and focusing support.
* Qt 4 (C++) has headers translated, and the interface works for simple applications.
* for wxWidgets (C++) there is no header translation yet.
* for Cocoa (Mac OS X native toolkit, Objective C) No header translation yet.
* for Carbon (Mac OS X native toolkit, C), Pascal header translation available and the interface is working for very simple applications.
* wince (Windows CE native) has headers and the interface is working.

PDA Support


Currently there is no cross platform tool for PDAs or good RADs. Support for PDAs on Lazarus is being implemented and it may occupy this vacancy.

Platforms with LCL Interfaces being implemented:

* Windows CE
* Qtopia for Linux-based PDAs

Possible in the future:

* PalmOS
* Symbian OS

Development Process


The Lazarus project provides a good community and a high development process, with many contributors and development testers. The community solves the problems over the discussion board, and the programmers submit the patch which fixes the issue. Each night, untested builds are generated for beta testing, making the development of Lazarus highly dynamic.

Database support


Lazarus supports several databases out-of-the-box, however the developer must install the adequate packages for each one. The programmer can access the database through code or by dropping components on a form. The data-aware components represent fields and are connected by the correct setting of properties to a TDataSource, which represents a table and is also connected to the database components, be it TPSQLDatabase, TSQLiteDataSet or something else.

The following databases are supported out-of-the-box:
* PostgreSQL requires the PSQL package
* dBase and FoxPro can be supported without the need to an external server or library through the TDbf component
* MySQL works
* SQLite needs only a single external library and the TSqliteDataset component
* MSSQL is working with Zeoslib
* InterBase / Firebird also work with the latest ZeosLib

Cross development


Free Pascal supports cross-compiling, and it has been proven that Lazarus apps can be cross-compiled from Windows to Linux and FreeBSD and vice versa. Compiling from Mac OS X to Windows, Linux and FreeBSD is possible. Cross-compiling to OS X has been done, but is not user ready yet.

Limitations


While resembling the Delphi RAD in many ways, here are a few limitations regarding the performance and feature set:

* Executable File size is somewhat larger than Delphi equivalent, in a pure Win32 environment; this has more to do with the GNU Linker. However it should be noted that the situation can be strongly mitigated using strip and UPX (both included in Lazarus distribution), resulting in much more compact executables. See also [http://www.freepascal.org/wiki/index.php/Size_Matters FPC wiki: Size Matters]
* Not 100% compatible with VCL. As mentioned previously this is by design, although the current LCL widget set should suffice for most applications. But this makes the deep repository of available VCL widgets inaccessible without conversion. The conversion effort is mostly some editing, unless you hit some of the rare fundamental differences. Missing units in the libraries and COM support are a considerably bigger problem when porting then LCL<->VCL incompabilities.
* Components for Delphi may be installed to the IDE, but they must be converted, which can be a complex process.
* Missing important Media Libraries and widgets. (Needs more examples)
* * Office connectivity
* * Datasnap (not a publically documented system, Borland proprietary enterprise functionality)
* Networking is mostly available, with a wealth of packages to choose from:

* * [http://www.indyproject.org/Sockets/fpc/index.en.aspx Indy].
* ** Status: Linux/x86, win32: 100% to our knowledge.
* ** FreeBSD/x86: also 100%, but requires devel versions,
* ** OS X: servers untested, various endianness problems in demoes.
* ** rest untested afaik, though some client success on wince was claimed.

* * [http://www.overbyte.be ICS] A bit win32 centric, but quite well suited for windows specific customization if needed.
* * [http://www.ararat.cz/synapse/ Synapse] FPC support hugely improved the last year.
* * [http://wiki.lazarus.freepascal.org/index.php/LNet lNet] is a FPC native non-blocking variant, with Linux/FreeBSD specific (KSE/EPoll) optimizations for mass connectivity
* No .NET or (easy) COM support. Missing .NET support is by design.
* Missing dynamically loadable packages support.
* Database support. While providing own subsystems and ported Delphi 3rd party packages, fully compatible Borland will remain a dream, not in the least place. Internals are hardly documented, and Borland often bought them externally.

Licensing


Although Lazarus software is GPL licensed, software developed using it can be deployed on any license. The Lazarus Component Library (LCL) is statically linked into programs and is licensed using a modified version of LGPL specially designed to allow static linking to proprietary programs.
This entry uses material from from Wikipedia, the leading user-contributed encyclopedia. It is licensed under the GNU Free Documentation License. Disclaimer.