Brook 4 is coming! | Brook framework is the perfect framework for your web applications.
Pascal Other
Switch branches/tags
Latest commit 744d7d3 Aug 12, 2016 @silvioprog committed on GitHub Update README.markdown


Aww yeah, Brook 4 is coming! :-)


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.


  •  Advanced routes management – Actions are performed by means of routes. Brook knows how to receive a request and choose the correct URL and the correct method to reply to it.
  •  Integrated data persistance – Brook offers a table object where data can be handled. Less instantiations, less coding, with an elegant syntax.
  •  JSON native supportJSON is widespred in the web for data exchange purposes. You will really appreciate Brooks' good JSON support.
  •  REST architecture supportREST is an architecture able to simplify and standardize data requests and replies. Brook is powerful even if you don't use REST – but you will want to use it.
  •  Lazarus wizards for installation and usage - With Lazarus, development is easier; with the Brook wizards, only a few clicks are required to start and configure your Brook projects.


  If you use Free Pascal only:

Create three files:

  • cgi1.lpr;
  • unit1.pas;
  • brokers.pas;

In cgi1.lpr, type:

program cgi1;
{$mode objfpc}{$H+}
  BrookApplication, Brokers, Unit1;

In unit1.pas, type:

unit Unit1;
{$mode objfpc}{$H+}
  TMyAction = class(TBrookAction)
    procedure Get; override;
procedure TMyAction.Get;
  Write('Hello world!');

In brokers.pas, type:

unit Brokers;

{$mode objfpc}{$H+}





Compile the project cgi1.lpr and copy the resulting file to CGI directory of your web server. Now, in your web browser, access the following URL:


  if you are a Lazarus user:

Open and install the file brookex.lpk. After the installation, select File | New ... and, in Brook framework, choose the Simple CGI application option as shown in the figure below:

Brook - New project

Save and compile the project. Copy the resulting file to the CGI directory of your web server and enjoy! See the final result:

Brook - Hello world


  •  dOPF – This plugin is sleek, intuitive and fast object persistence for faster and easier database development.
  •  RUtils – This plugin offers some general purpose routines on string conversions, parsings, encodings and others.
  •  JTemplate – This plugin helps you to fill variables in a template file.
  •  QTemplate – This plugin implements an alternative to FPTemplate engine.
  •  EasyRSS – This plugin is the easiest way of Pascal developers provide news updating services in their applications.
  •  XMailer – This plugin offers a really simple way to send e-mails using Free Pascal..
  •  AlgEx – This plugin helps you to process algebric expressions passed as string.
  •  Captcha – This plugin provides the handling of verification images, usually to block bot access in login pages.
  •  MGeoIP – This plugin allows you to identify the name of country or city which IPs come from.
  •  ConvUtils – This plugin allows you to convert one measure (centimeters, inches, liters etc.) to another.
  •  HtmlDoc – Whith this plugin you can write headers, body and other relevant tags using Object Pascal.
  •  LJGridUtils – This plugin offers easy conversion from LCL to JSON and vice versa.


The source code of the Brook framework is distributed under the GNU Lesser General Public License. See the project licence for copyright/license details.


Free Pascal 3.0.0 or the latest stable version. If you prefer the Lazarus interface, choose the 1.6.0 or the latest stable version.


The project documentation is available in two formats: HTML and PDF.


For transparency and insight into our release cycle, and for striving to maintain backward compatibility, Brook framework will be maintained under the Semantic Versioning guidelines as much as possible.

Releases will be numbered with the following format:


And constructed with the following guidelines:

  • Breaking backward compatibility bumps the major (and resets the minor and release);
  • New additions without breaking backward compatibility bumps the minor (and resets the release);
  • Bug fixes and misc changes bumps the release;

For more information on SemVer, please visit


Please use the issues page. Your cooperation will be appreciated.


Brook would not be possible without important and active contributors. See their names here.

See the name of all donors here.


You can download the last release here. Alternatively, you can also follow the project's GIT repository. The address is:



The Brook supports third party solutions and, for these, there is a broker file implementing your features. You can download the package containing all files here.

Welcome to world of Brook! Welcome to the Brook's world!