wtorek, 11 lutego 2014

Hello everybody

 Preface 


Few years ago I developed many applications using Borland Delphi (now Embarcadero). I very liked this tool, had a lot of useful components and libraries and excellent community support. Provided very easy way to visually develop application, Object Pascal as a developing language take care about a lot of things, that C++ don't :-)
When Borland announced Kylix - Delphi like IDE for Pascal and C++ for Linux I was very excited: it was a very nice way for developing applications for Windows and Linux in the same way. Unfortunately Borland take a deal with Microsoft for .Net support in Delphi and Kylix project was abandoned.

Later I founded Lazarus Project  It use Freepascal compiler and working similar to the Delphi, but Lazarus follow your own path, trying to maintain compatibility on the language layer with Delphi ObjectPascal.
As we can read on Lazarus website:
Lazarus is a Delphi compatible cross-platform IDE for Free Pascal. It includes LCL which is more or less compatible with Delphi's VCL. Free Pascal is a GPL'ed compiler that runs on Linux, Win32, OS/2, 68K and more. Free Pascal is designed to be able to understand and compile Delphi syntax, which is OOP. Lazarus is the part of the missing puzzle that will allow you to develop Delphi like programs in all of the above platforms. 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 it means you don't need to do any recoding to produce identical products for different platforms.
I try Lazarus for few months and find the same simplicity in developing as Delphi had. Of course many things are different, debugging isn't so nice like in Delphi and numbers of components much smaller, but I think, it will be growing and will be better when more people start using and develop this excellent IDE.

Few months ago we can read on Lazarus forum
Brook 1.0 - A new framework was born
It's developed by Silvio Clecio (Brook website) As we can read:
Brook framework is the perfect Free Pascal framework for your web applications. It's pure Pascal. You don't need to leave your preferred programming language.
It's complete: simple actions or configurable actions for database access, advanced routing features, wizard for Lazarus, support for internationalization, high compatibility with JSON structures, easy and elegant REST implementation, plugins for varied needs, extensible and decoupled brokers... In fact, you have several reasons to adopt Brook as your web development framework.
As other web frameworks with Brook we can use databases and ORM (Greyhound project), template engines, CAPTCHA, mail, RSS and other toold provided as the plugins for Brook framework.
This works as a CGI or FastCGI web application, we can build application using this framework with embedded web server too.
I didn't use FastCGI or CGI before to build web applications, I developed them using PHP. But now I decided to try build web application using Lazarus and Brook framework. Im not professional developer, it's rather hobby but allow me to make some money from time to time :-)

So first, I installed Linux Mint 16 distribution to test it. In distribution repositories are older versions of Lazarus and Freepascal, so I downloaded them directly form the Lazarus and  Freepascal site. Next I downloaded and installed Brook framework. Installation package installs nice wizard for the Brook-based applications. Of course we need web server (I choose Apache2) and database server (my choice is MySQL). If we want to use embedded webserver we don't need Apache, but I decided build application in similar way as I did with PHP and to compare building application process and using application :-)
So now we are almost ready to begin developing, but I will write about it next time :-)