Workbench

From Cloudrexx Development Wiki
Jump to: navigation, search

Cloudrexx Workbench is the Software Development Kit for Cloudrexx. It includes support for Unit-Testing, Doctrine command line tools and some scripts to simplify develoment.

DO NOT USE CLOUDREXX ON A PRODUCTIVE ENVIRONMENT IF THE WORKBENCH IS INSTALLED!

Simple usage

The workbench can be invoked by calling the following command from the root directory of your Cloudrexx installation:

./cx workbench

This shows a help with all available sub-commands.

Prerequisites

The workbench requires a working installation of Cloudrexx with the component "Workbench" installed.

Installation

If you install Cloudrexx from master, workbench is pre-installed.

Uninstall

The Cloudrexx workbench is not made for a productive environment. If you want to use your code on a production environment you should execute the following call:

./cx deactivate core_module Workbench

Technical

The Workbench component adds a Cloudrexx command "workbench" (aliased by "wb") which provides the following sub-commands:

db

The db sub-command has some sub-commands itself:

update

Updates the database. A filter (either component type or component type and name) can be specified. This command performs the following steps:

  • Generate Doctrine YAML mapping files based on a MySQL workbench file [1]
  • Generate Doctrine entities based on YAML mapping files
  • Generate Doctrine repositories based on YAML mapping files
  • Generate SQL difference to the database based on YAML mapping files

cleanup

This command drops any remaining temporary files generated by the db command.

doctrine

Allows access to the Doctrine command line tools.

diff

Shows the different mappings for a field according to the YAML mapping files and to the database according to Doctrine schema tool.

create

Creates a new component.

test

Executes unit test cases. A filter (either component type or component type and name) can be specified.

export

Creates a zip package of a component.
  1. Only works if a filter with component type and name is specified