SEARCH:
Previous: The Order Total  

Tutorial Review: 1-10

We will now review what has been accomplished in our first 10 tutorials. We have the skeleton of an application with some security and automations.

The application contains a customers table, an items table, an order headers table and an orders detail table. Each table has a few basic columns that illustrate Andromeda's approach to development.

One File So Far

So far our application has a single file in it, the Database Specification File, which is in the Application Directory and specifies everything of important to the system, including:

  • Column Definitions (caption, type, size)
  • Table Definitions
  • Child table relationships (foreign keys)
  • Automatic Calculations like price and order total
  • Organization into modules, for menus and security
  • Security Assignments

# Remember! Indent with spaces, not tabs!
module orders:
   uisort: 100
   description: Orders
   
group orders_staff:
   description: Orders - Regular Staff;
   module orders:
      permsel: Y

group orders_admin:
   description: Orders - Administrator
   module orders:
      permsel: "Y"
      permins: "Y"
      permupd: "Y"
      permdel: "Y"

column customer: 
   type_id: char
   colprec: 10
   description: Customer Code

table customers:
   module: orders
   description: Customers
   
   column customer:
      primary_key: "Y"
      uisearch:    "Y"
   column description:
      uisearch: "Y"

column item:
   type_id: char
   colprec: 10
   description: Item Code

table items:
   module: orders
   description: Items
   
   column item:
      primary_key: "Y"
      uisearch: "Y"
   column description:
      uisearch: "Y"
   column price:
      uisearch: "Y"

column order_num:
   type_id: int
   description: Order Number
table orders_h:
   module: orders
   description: Orders
   
   column order_num:
      uisearch: "Y"
      primary_key: "Y"
      automation_id: SEQUENCE
   foreign_key customers:
      uisearch: "Y"
   
   column price_lines:
      suffix: _lines
      automation_id: SUM
      auto_formula: orders_d.price_extended
      
table orders_d:
   module: orders
   description: Order Lines
 
   foreign_key orders_h:
      primary_key: "Y"
      uisearch: "Y"
   foreign_key items:
      primary_key: "Y"
      uisearch: "Y"
   
   column price: 
      automation_id: FETCH
      auto_formula: items.price
   
   column qty:
      uisearch: "Y"
   column price_extended:
      suffix: _extended 
      uisearch: "Y"
      chain calc: 
         test 00:
            return: @qty * @price

Editing Screens

The database specification above has provided us with a complete menu and four editing screens, illustrated here:

and here:

Basic Navigation

The user interface automatically includes links for basic editing, such as this link to order lines from the order header screen (there are also other ways to provide the same functionality).

...and our data entry screens know when to provide drop-down lists (HTML SELECT elements):

Calculations

Our 'free' editing screens do automatic calculations of the order line details:

Imports and Security

We have also imported customers and items directly into the database through the user interface and have established security that will prevent regular staff from modifying the items table.

Worth Repeating: No Code

At this point it is worth repeating that everything we see in the application has been created with only the Database Specification File, and no application code at all. While so far our application is very modest and only contains skeleton elements, the rest of the tutorials will demonstrate that we can do far more than this still without employing at any code.

This is where Andromeda departs company with the MVC frameworks. All MVC frameworks would have required so far not only that we create the database, but that we create at least one program class for each table. No matter how "easy" it would be to do so, the labor amount is still non-zero. This begins to really count when the application expands to 30 tables, then 75, then 300.

Previous: The Order Total