PACK - Persistence And Communication Kit

Introduction

PACK is a toolkit that speeds up the development of database driven web based client-server-applications by providing wrappers for database storage and client-server communication. The main component is the Web Object Compiler (WOC) that translates XML based interface descriptions into the target language.

The following languages are currently supported:
  Client Server
C++/Qt 4.x yes partial (no tables)
PHP 5.x planned yes
HTML Documentation Target
XML Schema planned/incomplete for validation and as base for SOAP
XML SOAP planned/incomplete generates WSDL and Schema files for the communication layer only

Building PACK

For compiling PACK you need a C++ compiler (eg. GCC) and Qt4.x. The meta-compiler WOC and the Qt binding require at least Qt 4.7 or 5.x. For compiling and running generated code it all depends on your target:
C++/QtA C++ compiler and at least Qt 4.7 or 5.x, modules: Core, Network, XML, optionally XMLpatterns
PHPPHP, at least version 5.2
SOAPany compatible toolkit that can handle WSDL files

Compiling the meta-compiler is relatively easy: just enter the woc directory and call qmake and make (or open the woc.pro file in QtCreator and compile from there). The same approach works for PACK's Qt base library. The PHP library of PACK does not need to be compiled, just include it in your project.

Concepts

In a classic three-tier architecture (see below) there are two interface layers between the actual tiers: data and communication. The Web Object Compiler helps implementing these interfaces between layers.

Layer 3Client, Presentation
Communication InterfaceCommunication Abstraction Layer
Layer 2Server Business Logic
Data InterfaceDatabase Abstraction Layer
Layer 1Database (eg. MySQL, PostgreSQL)
Three Tier Architecture

PACK currently supports MySQL and PostgreSQL as databases, but it is relatively easy to port to new SQL-based database systems. Non-SQL relational database systems may be usable, but take much more effort to create an interface driver.

The structure of the database is written up as XML statements in PACK's WOLF files - from this PACK generates the code necessary to create the database tables and to execute queries.

The Data Interface provides wrapper classes around tables which are more convenient to use than plain SQL and will also automatically use the correct SQL dialect for queries.

The business logic needs to be written by the user, but using PACK's facilities it is often very easy to do.

The Communication Interface generated by PACK contains two types of structures: communication classes and transactions. Transactions are operations that the client can execute (remotely) in the server. Each transaction has a unique name, input data and output data. This data can use primitive built-in types or project specific communication classes. These classes define structures of primitive types and other communication classes that enclose the data that is transferred between client and server. The classes also wrap the code necessary to serialize and unserialize themselves during transmission. In addition it is possible to write direct translations between database tables and communication classes to assist in some of the typical translations often performed in the business logic.

The Language

Bindings