AWA 2.4.0

By Stephane Carrez

Ada Web Application is a framework to build high performance secure web applications. The major change of this new release is a better integration with the Alire package manager. The crates are in the process of being integrated in the Alire Community Index but meanwhile a dedicated index can be used to access the latest AWA crate definitions. Another interesting feature introduced in the new version is the support for Embedded Web Server as an alternative to the Ada Web Server.

The framework provides several ready to use and extendable modules that are common to many web applications. 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 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.

A typical architecture of an AWA application is represented by the picture below:

Ada Web Application architecture

Using AWA with Alire

To use AWA with Alire, you should first register a new index to get access to the AWA crates and its dependencies.

alr index --add git+ --name awa

After this command, the alr command should give you access to the AWA crates and you can check that with the command:

alr search awa

Once you have setup the Alire index, you can import the awa framework and the dynamo associated tool by using the following commands:

alr init demo
cd demo
alr with awa
alr with dynamo
alr with servletada_aws
alr build

Note, if you are using FreeBSD, you should probably use the following command to build (because the MariaDB shared libraries are installed in /usr/local/lib/mariadb directory):

alr build -- -largs -L/usr/local/lib/mariadb

Once the dynamo tool is built, you can use it to setup your project by using the create-project command. To run the dynamo tool, you must run it by using the alr exec command because Alire will setup some environment variables and PATH that gives access to Dynamo and AWA configuration files.

alr exec -- dynamo create-project -l apache --web demo

Change the demo.gpr GNAT project that was generated by alr and replace demo.adb by demo-server.adb. That later source has been generated by dynamo and it contains everything to setup, prepare and run the Web server. Once this is done, build the application:

alr build

The Atlas AWA Demonstrator is also available as Alire crates. Two versions are available, the atlas crate is using the Ada Web Server and the atlas_ews is using the Embedded Web Server. To play to Atlas, you can try one of the following commands:

alr get atlas
# or
alr get altas_ews

Debian packages

Debian packages are also available for Ubuntu 20, Ubuntu 22 and Debian 11. The repository also includes a Debian package for Alire 1.2. Choose one of the following configuration and add it to your /etc/apt/sources.list configuration.

deb focal main
# or
deb jammy main
# or
deb bullseye main

And you can run the following command to accept the signed packages:

wget -O - | sudo apt-key add -

AWA 2.4.0 Download: awa-2.4.0.tar.gz

  • Add support for SQL queries embedded in applications with ARE
  • Fix #20: Do not use git:// protocol
  • New EasyMDE plugin to integrate the Easy Markdown Editor
  • Update AWA blog and AWA wiki to use the EasyMDE editor for Markdown
  • Use Dynamo 1.3.0, Ada Server Faces 1.5.0, Ada Servlet 1.6.0, OpenAPI Ada 0.6.0
  • Use Ada Wiki 1.4.0, Ada Database Objects 2.3.0
  • Use Ada Keystore 1.3.3, Ada EL 1.8.5, Ada Utility Library 2.5.0

Dynamo 1.3.0 Download: dynamo-1.3.0.tar.gz

  • Fix #5: Generated body does not compile when an enumeration of another UML package is used
  • Fix #7: No default type for SQL generation of a column that uses an enumeration
  • Fix #9: Option or configuration to disable some SQL generation
  • Fix #10: Definition of an UML datatype with a tagged value raises an exception
  • Fix #12: Avoid emitting a full qualified type name for types declared in the current package
  • Fix #16: Improvement in Markdown documentation generator
  • Fix #17: YAML parser: accessibility check failure
  • Fix #18: Generate database operation to reload an object
  • Fix #19: Add dynamo configuration through environment support
  • Fix #20: Give access to the man page from alire
  • Fix $21: Generated procedure Create is missing overriding keyword

OpenAPI Ada 0.6.0 Download: openapi-ada-0.6.0.tar.gz

  • Rename Swagger package into OpenAPI and provide a Swagger package for compatibility
  • Update the openapi generator to version 6.0.0
  • Add support for text/plain response
  • Add support to use external Ada types in OpenAPI definitions
  • Add support for multiple response types
  • Add support for binary responses
  • Add support for Ada enum generation for OpenAPI enums
  • Integrate Swagger UI v4.13.0

Ada Server Faces 1.5.0 Download: ada-asf-1.5.0.tar.gz

  • New widget <w:progress> to display horizontal/vertical progress bars

Ada Servlet 1.6.0 Download: ada-servlet-1.6.0.tar.gz

  • Fix #4: Alire servletada_aws GNAT project fails due to missing Naming rule
  • Fix #5: The Input_Line_Size_Limit parameter is not taken into account
  • Fix #6: GNAT configuration project is not correct to build with debugging
  • Fix #7: Constraint error raised when matching empty path routes
  • Fix #11: Support for Embedded Web Server
  • Fix #12: Support for multiple response types in REST operations

Ada Security 1.4.1 Download: ada-security-1.4.1.tar.gz

  • Fix Alire GNAT project to build in debug mode
  • Fix Security.Random that generates shorter random string

Ada Database Objects 2.3.0 Download: ada-ado-2.3.0.tar.gz

  • Fix #4: Is_Loaded predicate operation is false when an object is not yet inserted in the database
  • Fix #5: Exception raised when SQLite Query_Statement is finalized if the SQL query was invalid
  • Fix #7: Update SQLite support to 3.31.1
  • Fix #8: Add SQlite busy handler to handle the SQLITE_BUSY error
  • Fix #9: Better handling of SQLITE_BUSY error
  • Fix #10: Error 'XML query file does not exist' when the query is loaded from a static embedded loader

Ada Wiki Engine 1.5.0 Download: ada-wiki-1.5.0.tar.gz

  • Add support for Textile markup language
  • Rewrote the Markdown parser to better follow the Common Mark Specification

Ada Utility Library 2.5.0 Download: ada-util-2.5.0.tar.gz

  • New examples to illustrate the IO stream composition
  • New examples for JSON parser and Util.Beans.Objects
  • Add support to set environment variables when launching a process (without changing the current process environment!)
  • Add support to indent XML output streams
  • New package Util.Files.Rolling to provide a rolling file manager
  • New package Util.Beans.Objects.Iterators to easily iterate over objects
  • Add a new log appender to support rolling log files with size and time based policies
  • New operation Util.Files.Delete_Tree to delete a directory tree and work arround for GNAT bug gcc/63222 and gcc/56055
  • New operation Util.Files.Realpath to find the canonicalized absolute path of a file
  • New package Util.Blobs to hold binary content with reference counting
  • New package Util.Http.Headers to provide some HTTP helper operations
  • Add support for Blob in bean objects
  • Fix compilation on NetBSD 9.2
  • Fix compilation with AWS >= 22.0

Add a comment

To add a comment, you must be connected. Login