LazBrookDojo - Development Machine


PREPARING YOUR DEVELOPMENT MACHINE

Setup Summary
  1.     Ubuntu OS
  2.     Apache2 Web-Server
  3.     FirebirdSQL Database Server (Or Your Choice of DB Server)
  4.     Lazarus FreePascal
  5.     Brook Framework and Samples(Component for Lazarus IDE)
  6.     Dojo Web Toolkit (Or there are lot out there!)
  7.     Skills and Interest to the nth power!

Operating System

Since I was born and raised with Microsoft Windows, I am to quick to jump using the Ubuntu Desktop and I started using and exploring since it earlier releases not for development. When I and my colleagues decided to move away from Windows and embrace the open source technologies and such. So, choosing the current Ubuntu version will do no harm for this setup. Just make sure your development machine meets the required hardware specification to the version you have chosen.

My recent Ubuntu flavor I used is Lubuntu it is much more lightweight and non-bloated compared to the Ubuntu Desktop. Anyways, I don't need or I don't use much of the other software come from the Desktop. Either of the two flavors will do.

Raspbian on Raspberry Pi, we will work this one on later articles. Basically, it runs with the same setup I have previously mentioned.

I have my old desktop setup with all the stuff I needed. And use my Windows laptop to access remotely over LAN

After you are all done with setup on Ubuntu OS, you need the following to be installed. Or simply download and install the LAMP stack.

Follow this link installing LAMP on Ubuntu
Apache 2 Installation

Or if you are quiet familiar in installing Apache 2, and saving disk spaces try doing so.

Here is the quick link for Apache 2 Installation

Open your Terminal Window and enter the command below.
sudo apt install apache2

Install the following Apache modules for fastCGI applications:
libapache2-mod-fastcgi
libapache2-mod-fcgid

Next Step - Enable the modules

Open a Terminal window and enter the command below.
a2enmodule rewrite
a2enmodule fcgid
Finally, restart the Apache 2
apachectl restart

Apache Configuration

Edit this file to any of text editor installed on your machine using your root account.
Configuration may differ to an online setup like what we have at DigitalOcean setup.
/etc/apache2/apache2.conf
 
You will find this line and if not just add this line.


LoadModule fcgid_module "/usr/lib/apache2/modules/mod_fcgid.so"

<IfModule mod_fcgid.c>
FcgidMaxRequestLen 31457280
FcgidBusyTimeout 3600

<Directory "/home/agong2/apps/myhello">
SetHandler fcgid-script
Order allow,deny
Allow from all
Require all granted
</Directory>
ScriptAlias /myhello "/home/agong2/apps/myhello/myhello"

</IfModule>


Testing
http://yourdevmachineIPAddress/myhello/
This configuration is just for the development. Consult your Linux Systems Administrator when doing or making your site available to public.


FirebirdSQL
We are used to developed Client/Server Applications on Windows environment for years.
FirebirdSQL is our RDBMS of choice likewise to our WebApps and for this development framework.Or if you are familiar or by choice, you may use the pre-installed mySQL under LAMP stack.

FDB Server Installation
For more detailed instruction follow this link https://help.ubuntu.com/community/Firebird2.5

Lazarus Free-Pascal IDE
Download and install the Lazarus http://www.lazarus-ide.org/


Brook Framework
https://github.com/silvioprog/brookframework
Extract the files where you wish to and open and locate the .lpk file

Application Directories

For folders or directories, its up to your practices or organization.
We do something like the following:

/home/apps/
/app-folder
/database
/js
/html
/css
/symlink to dojo
/images
/and so fort


On the next article, I will Explain the basics on How to start the development using this framework and setup.

Comments