Play Demo Installation

BusLogicDemoPlay is a simple (but not trivial) application, which demonstrates the use of some of the basic concepts in ABL's transactional logic engine in a Play environment.  This page explains how to load and run the demo.  To load the entire product (with samples and documentation), see the downloads page.

Prerequisites

The only prerequisite for this demo is the Play framework, version 1.2.4 or later. Make sure that it is running properly; you should be able to invoke play from the command line:



Installing the demo

First download the demo archive (or get the source from Github -- see below):

Alternatively, you can grab the project from Github -- the result is the same.

In a command window, set your current directory to the project directory, and execute:
play dependencies

which should download whatever libraries are required, then:
play run

which should start the application. You can then run the demo by connecting to:

http://localhost:9000

in your favorite browser.

What does the demo do?

The demo itself is a straightforward customer/order/line item application. The point of it is that all the business logic behind the app is done using just 5 simple logic annotations, yet these take care of 11 use cases:
  • create order
  • delete order
  • reassign order to different customer
  • pay order
  • unpay order
  • create line item
  • delete line item
  • change line item quantity
  • change line item price
  • change line item product
  • change customer credit limit

Opening the demo in your IDE

To see how the demo is written, you can open it in your favorite IDE. Before you do that, you will want to run one of the following commands:
  • play eclipsify for Eclipse
  • play idealize for IntellJ
  • play netbeansify for NetBeans

Then import the project into your IDE. We suggest you look in particular at the files in the app/businesslogic directory. This is where all the business logic is defined. Their simplicity is deceptive: there is a lot going on here.

For further information, please see the BusLogicDemo page, which goes into a lot more detail about this.

Comments