Getting Started

This page describes the KOW Lib and other framework projects and is a quick start guide for anyone who wants to learn how to work with the framework or any of its projects.

Introduction

The Build System

So far the build system has been kept quite simple. There is a makefile that drives all the operations in each project folder. In most cases, all it does is to call gprbuild or gnatmake. But in some other cases, such as in apq-mysql, it also has other target for performing setup tasks (just like a ./configure, but simpler).

Right now we are studing a big change in the framework. We intend to move from this scheme to the well know ./configure && make && make install, but without using auto* tools.

So, to build KOW Lib all you need is to:

$ make

And that's it. The library is built in the place. The gpr file for usage in other projects in it's root folder. And there are ./lib, ./src and ./obj folders. In KOW Lib there is also another folder: depending on your operating system it is ./src-unix or ./src-windows.

Once you got KOW Lib building you need to edit your ADA_PROJECT_PATH variable.

Supose you put all framework projects inside the $HOME/dev/framework folder, then just put this script inside your .bashrc or .bash_profile (it could also be .profile depending on your distribution):

for i in $HOME/dev/framework/*/
do
    export ADA_PROJECT_PATH=${ADA_PROJECT_PATH}:$i
done

To test your setup just type "gnatls -v". Here is the output for mine:

$ gnatls -v

GNATLS GPL 2010 (20100603)
Copyright (C) 1997-2010, Free Software Foundation, Inc.

Source Search Path:
   <Current_Directory>
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/lib/gcc/x86_64-pc-linux-gnu/4.3.6/adainclude/

Object Search Path:
   <Current_Directory>
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/lib/gcc/x86_64-pc-linux-gnu/4.3.6/adalib/

Project Search Path:
   <Current_Directory>

   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/dev/framework/apq/
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/dev/framework/apq-mysql/
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/dev/framework/apqprovider/
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/dev/framework/apqprovider-mysql/
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/dev/framework/kowconfig/
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/dev/framework/kowent/
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/dev/framework/kowlib/
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/dev/framework/kowsec/
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/dev/framework/kowsec-entities/
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/dev/framework/kowview/
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/dev/framework/kowview-entities/
   /home/ogro/toolchains/gnat-2010-x86_64-pc-linux-gnu-bin/lib/gnat/

Supported compillers

So far we are using GNAT GPL 2011 in our main development environment even thought GNAT GPL 2011 has been released. This is so because of how Unbounded Strings are implemented in GNAT GPL 2011. For some reason when dealing with multiple tasks accessing and allocating unbounded strings (even if the unbounded string is available only inside a single task scope).

The framework have been tested with several GNAT-GCC versions and should work fine with the current version unless it uses the mentioned unbounded string implementation.

KOW Framework Projects

Please learn these projects in order. It's really fast to learn them all in order, so please be patient. In a few minutes you'll be ready to develop your own KOW Framework Web Applications with persistent data and Json calls all the way.

  • KOW Lib :: you will learn about KOW Lib's sub packages
  • KOW Config :: you will learn how to load configuration files from your disk
  • KOW Ent :: you will learn how to work with persistent data
  • KOW View :: you will finally learn about your web applications

Once you've got all that covered up it's recomended for you to read the APQ user manual and learn how APQ Provide works.

Also, as KOW View is based on Dojo it's also recomended to learn everything you can about this great JavaScript toolkit.