Blog

History of Agile Toolkit

Published by @romaninsh on 14 Mar 2016

Agile Toolkit is my software project that I have started all the way back in 2000 and has been in my care for almost 2 decades now. This projects reflects my desire to simplify life of a web developer and introduce some unique concepts in web development.

What Motivated me to create Agile Toolkit?

Agile Toolkit was created to solve the re-usability problem as I was having while creating series of admin interfaces for a rather simple websites. All of those sites would implement interface where certain type records had to be listed, created, deleted and modified. In a modern days we call this a CRUD (Create, Read, Update, Delete), but back in 2000 this rather new concept. Eventually more modules were added allowing more than the 4 basic actions which resulted in the early name of the framework: "a-modules".

What Shaped Agile Toolkit

In 2003 I have started a major rewrite and thinking about the new concept of writing web application. Object Oriented programming was finally ariving into PHP with the up-coming release of PHP5. I have implemented a whole new way to develop administration interfaces in a new and unique way.

Agile Toolkit is a PHP web framework with a particularly powerful ORM (Object-relational mapping) engine. This ORM goes much further beyond translating your data records into objects. It is fluent with joins, expressions, conditions and subqueries helping developer to take full potential of SQL engine through object-oriented interface.

To help illustrating some of these features, I have created a new enhancement to the Agile Toolkit Kitchen Sink project. The best part, you can download this project and explore it on your laptop, it's available on GitHub.

For data I decided to use a standard test_db repository, that creates about 300,000 employee records in the database along with 2,8 millions of salary records. The data is relational and can be seen in the following ER Diagram:

image

DSQL is a SQL Query Builder of Agile Toolkit - an object-oriented library which helps your PHP application reliably build "SELECT .. FROM .. WHERE .." queries.

DSQL is about to become a stand-alone component. As the part of our Agile Toolkit roadmap we will be moving DSQL, ORM and CSS into their own open-source projects. This change will help us improve the foundation of our framework.

I am looking for open-source enthusiasts who would like to help me with this project. If you would like to help - read my article and fill out simple form at the bottom.

What is DSQL?

For those who are not familiar with DSQL in Agile Toolkit, I'm including some of the major features and code examples.

DSQL is an object-oriented interface to generating vendor-specifig query string:

  • Object-oriented query interface. Build and execute queries simultaneously.
  • Support for FROM, WHERE, JOIN, GROUP, ORDER and other basic keywords.
  • Automatic escaping and sanitization of parameters.
  • Nested query support FROM (SELECT ..) anywhere in your query.
  • Support for UPDATE, REPLACE, DELETE and INSERT queries.
  • Automatic merge of parametric variables in recursive expressions.
  • Extend to create your own query methods (ALTER, DESCRIBE, etc).
  • Support for SQL vendor-extensions (e.g. CALC_FOUND_ROWS).
  • Various data fetching models, iterator support.
  • Well suitable to be used in higher-level frameworks.
  • Stable code, in constant use for over 10 years since first version.

Traditionally CSS frameworks have relied on ability to combine multiple CSS classes for widget styling. While one class may specify the name of the widget (dropdown-menu), a supplementary class (dropdown-menu-right) will define some property such as positioning of a menu:

<ul class="dropdown-menu dropdown-menu-right">
  ...
</ul>

Over the past few years I have worked with Agile CSS which relies very heavily on the concept of modifiers allowing your HTML code to specify size, alignment, paddings, selection of color palette and many other properties. Next example uses Agile CSS to style a span in a format of a green circle with a border:

<span "atk-shape-circle atk-swatch-green atk-padding-xsmall
    atk-text-baseline-reset atk-border-outline"></span>