Extool

Extool is a PHP-based code generation tool. It's designed modularly so that code can be generated for multiple systems and from multiple sources.

   

How Extool Works

Extool is made up of three primary pieces: Adapters, Representations, and Targets

Adapters are designed to read in source material. You can have more than one adapter in your system and chose an appropriate one at runtime. Adapters are designed not only to read the structure from the source material, but are also capable of importing data. Current adapters include ones for reading CSV files and tabbed listings of table fields.

Representations are the heart of Extool. An adapter reads the source material, then builds a representation based on the source material. This representation contains both the structure of the code to be generated and the data to be pre-populated. The representation is primarily structured to represent an MVC application, with support for 'admin' portions of the application.

Targets are called once code is ready to be generated. A target receives the representation, reads all of the structure and data relevant to the target, then writes the code.

   

Requirements

PHP 5.3.0 or greater. If you're using Extool as-is, you will need to also have access to PHP on the command line. Otherwise, Extool can be used as a library to power a web application.

   

How to use Extool

After downloading and unpacking Extool’s core, download all desired adapters and targets. Place the adapters in the adapters folder and the targets in the targets folder.

Extool ships with a simple command-line interface. To run an example, go to the command line and change directory into the root of Extool. From there, type the following command

$ php extool.php TabTables plans/recipes Joomla15

This will use the TabTables adapter to read the file in plans/recipes to generate a Joomla 1.5 component.

   

Why?

Extool started as a side project to help generate component code for different versions of Joomla. Since then, the codebase has been rewritten to be modular so that inputs and outputs are highly decoupled. This allows code to be generated for a targeted platform regardless of the sturcture's source.

Supporting tools

Extool has support for data field type detection, code snippet tokenization, file package virtualization, field type enforcement, and MySQL file generation.

What license is it under?

The core of Extool is licensed under the MIT license. Targets and adapters are released under their own licenses.

Where to get it

Stable

Extool Version 1.0.1
Extool Adapters 1.0
Extool Targets 1.0

Development

The latest version of Extool's core is available through GitHub at http://github.com/jlleblanc/extool. The targets for Extool are maintained at http://github.com/jlleblanc/extool-targets and the adapters are available at http://github.com/jlleblanc/extool-adapters.