Ada Web Application

Build Status Test Status codecov Documentation Status Download License Commits

Ada Web Application is a framework to build a Web Application in Ada 2012. The framework provides several ready to use and extendable modules that are common to many web application. This includes the login, authentication, users, permissions, managing comments, tags, votes, documents, images. It provides a complete blog, question and answers and a wiki module.

AWA simplifies the Web Application development by taking care of user management with Google+, Facebook authentication and by providing the foundations on top of which you can construct your own application. AWA provides a powerful permission management that gives flexibility to applications to grant access and protect your user's resources.

AWA Features

AWA integrates the following projects:

These projects are distributed under the Apache License 2.0 or MIT license for Ada LZMA.

AWA relies on the following external projects:

These projects are provided as tarball in 'external' directory. They are distributed under different licenses (GNU GPL).

The AWA framework integrates a set unit tests and provides a framework to build unit tests for AWA applications. The unit tests are based on Ada Util test framework which itself is built on top of the excellent Ahven test framework (Ahven sources is integrated in Ada Util). You may get Ahven or Aunit at:

Version 2.0.0 - May 2020

  • Refactoring of build process and installation
  • New audit manager for database auditing
  • Support for Postgresql
  • Improvements of images and storage plugins
  • Update Trumbowyg editor to version 2.18.0
  • Update Flot library to version 4.2.0
  • Support for commands to configure, start, stop the server
  • New mail UI component mail:attachment to send attachments

List all versions

Using git

The AWA framework uses git submodules to integrate several other projects. To get all the sources, use the following commands:

   git clone --recursive https://github.com/stcarrez/ada-awa.git
   cd ada-awa

Development Host Installation

The PostgreSQL, MySQL and SQLite development headers and runtime are necessary for building the Ada Database Objects driver. The configure script will use them to enable the ADO drivers. The configure script will fail if it does not find any database driver.

Ubuntu

First to get the LZMA and CURL support, it is necessary to install the following packages before configuring AWA:

sudo apt-get install liblzma-dev libcurl4-openssl-dev

MySQL Development installation:

sudo apt-get install libmysqlclient-dev

MariaDB Development installation:

sudo apt-get install mariadb-client libmariadb-client-lgpl-dev

SQLite Development installation:

sudo apt-get install sqlite3 libsqlite3-dev

PostgreSQL Development installation:

sudo apt-get install postgresql-client libpq-dev

FreeBSD 12

First to get the LZMA, XML/Ada and CURL support, it is necessary to install the following packages before configuring AWA:

pkg install lzma-18.05 curl-7.66.0 xmlada-17.0.0_1 aws-17.1_2

MariaDB Development installation:

pkg install mariadb104-client-10.4.7 mariadb104-server-10.4.7

SQLite Development installation:

pkg install sqlite3-3.29.0

PostgreSQL Development installation:

pkg install postgresql12-client-12.r1 postgresql12-server-12.r1

Once these packages are installed, you may have to setup the following environment variables:

export PATH=/usr/local/gcc6-aux/bin:$PATH
export ADA_PROJECT_PATH=/usr/local/lib/gnat

Windows

It is recommended to use msys2 available at https://www.msys2.org/ and use the pacman command to install the required packages.

pacman -S git
pacman -S make
pacman -S unzip
pacman -S base-devel --needed
pacman -S mingw-w64-x86_64-sqlite3

For Windows, the installation is a little bit more complex and manual. You may either download the files from MySQL and SQLite download sites or you may use the files provided by Ada Database Objects and Ada LZMA in the win32 directory.

For Windows 32-bit, extract the files:

cd ada-ado/win32 && unzip sqlite-dll-win32-x86-3290000.zip
cd ada-lzma/win32 && unzip liblzma-win32-x86-5.2.4.zip

For Windows 64-bit, extract the files:

cd ada-ado/win32 && unzip sqlite-dll-win64-x64-3290000.zip
cd ada-lzma/win32 && unzip liblzma-win64-x64-5.2.4.zip

If your GNAT 2019 compiler is installed in C:/GNAT/2019, you may install the liblzma, MySQL and SQLite libraries by using msys cp with:

cp ada-lzma/win32/*.dll C:/GNAT/2019/bin
cp ada-lzma/win32/*.dll C:/GNAT/2019/lib
cp ada-lzma/win32/*.a C:/GNAT/2019/lib
cp ada-ado/win32/*.dll C:/GNAT/2019/bin
cp ada-ado/win32/*.dll C:/GNAT/2019/lib
cp ada-ado/win32/*.lib C:/GNAT/2019/lib
cp ada-ado/win32/*.a C:/GNAT/2019/lib

Ada Web Server

The Ada Web Server should be compiled with the SSL support if you want to use the OAuth 2.0 protocol and integrate with Google or Facebook authentication systems. The AWS version shipped with GNAT 2019 will not work because it does not support SSL.

You may build AWS by using:

   git clone --recursive -b 20.2 https://github.com/AdaCore/aws
   cd aws
   make SOCKET=openssl setup build install

Building AWA

The framework uses the configure script to detect the build environment. In most cases you will configure, build and install with the following commands:

   ./configure --prefix=/usr/local
   make
   make install

Next steps

Once you have built and installed the Ada Web Application framework, you can use the dynamo command to create your first project by using the create-project command:

dynamo create-project -l apache atlas [email protected]

Have a look at the Dynamo(1) documentation for the detail of the dynamo command options.

Then, configure and build the project by using:

cd atlas
./configure
make generate build

At this step, you will get the binary server in bin/atlas-server and you can launch it with:

./bin/atlas-server setup

The generated binary server provides several commands that you can use. The list of commands and their options is described in: command (1).

Follow the Tutorial section and the Ada Web Application programmer's guide to proceed to the next development steps.

Docker

A docker container is available for those who want to try AWA without installing and building all required packages (See Ada Web Application on Docker. To use the AWA docker container you can run the following commands:

   sudo docker pull ciceron/ada-awa

Documentation

The Ada Web Application programmer's guide describes how to setup the framework, how you can setup and design your first web application with it, and it provides detailed description of AWA components:

Tutorial

You may read the following tutorials to lean more about the technical details about setting up and building an Ada Web Application:

Presentations

Articles

Sites Using AWA

Ada Awa

Ada Web Application - Framework to build high performance secure web applications

Ada Awa Info

⭐ Stars 58
🔗 Source Code github.com
🕒 Last Update 8 months ago
🕒 Created 6 years ago
🐞 Open Issues 1
➗ Star-Issue Ratio 58
😎 Author stcarrez