Lazarus reviewed

Lazarus_Logo_(new)

Having dabbled with Lazarus for a month, i can conclude that Lazarus is a viable RAD platform. Here are some of the features of Lazarus/Free Pascal that make application development easy (in comparison to the Java platform):

  • Comprehensive library of functions – i was able to find each and every function needed within the supplied units and there was no need to download/install any package (which is often the case for Java)
  • The Pascal syntax is easier to read and code. For example, string comparisons can be done using the “=” operator, which is much more intuitive for a beginner. Function calls that do not involve parameter passing do not require parentheses (e.g. Query1.Open;)
  • Property value assignment consistently causes the related events to be triggered. For example, setting a query object to be active (like so – Query.Active := True) is equivalent to calling the query open method (Query.Open). At the same time, if there is an onActive method defined for the query, it will be triggered with either the ‘Active’ property value assignment or the ‘Open’ method call. In Java, the property value is usually protected from direct access and has to be retrieved through a getter method, which is not a bad practice, but Pascal just seem to allow for more freedom.
  • The generated form GUI design code is placed in a separate file (.lfm) and this is effective in preventing users from messing around with it. Where necessary, users can indeed mess around with the lfm file as the syntax is quite easy to read. This seems better than for the case of Java where the generated code for the GUI design is within the same file as the rest of the code.
  • Automatic type conversion when using the Query objects. Say for the query “select * from payment where payment_date = :paymentdate”, to set the value of the parameter paymentdate with the current date, the code is simply “Params.ParamByName(‘paymentdate’).AsDateTime := Date”. The Query object would handle translating the date value into the correct formatted string for the underlying database against which it is executed. Similarly, the values from the query resultset can also be automatically translated to desired type where applicable.
  • As with Delphi, Lazarus generates a single executable file. This makes deployment easy (no need to package into a jar file).
  • As an added bonus, Lazarus has multi-platform support, including Android and iOS, allowing the same source code to be compiled on different platforms.

It’s mind boggling to think that such an enormous tool was put together and offered for free. Contrast that to the current Delphi product with pricing starting from US$899. Some kind souls even compiled the collection of free components and libraries and had them pre-installed into the Lazarus IDE, and made it available for free download.

If i need to develop another GUI intensive application, Lazarus will be the choice tool.

(Visited 48 times, 1 visits today)

Leave a comment

Your email address will not be published. Required fields are marked *