Overview of Mobile Northwind Sample Application

In the development guide for Agentry applications there is reference to the Mobile Northwind sample application. An overview of this application is provided here, including data structure, client behavior, and synchronization components.

The Mobile Northwind application is a basic order entry application with some light customer relations management and inventory-like functionality included. It is an extension of the Northwind sample database provided with MS SQL Server systems, a database for the fictitious company Northwind Trading.

Module Data Structure and Object Collections

The data definitions within the application include objects and related transactions, a complex table and a data table.

The object definitions include Customer, Order, and Order Item or Product. In the case of the Product and Order Item objects, these terms are interchangeable. The structure, purpose, and usage of the object is the same, regardless of which name is used. These objects are structured within the parent module Customer Accounts in a parent-child relationship:

MainObject > Customers > Orders > Products

The module main object contains a collection of Customer objects. The Customer object definition in turn contains a collection of Order objects. The Order object then contains a collection of Product objects.

The Customer object encapsulates customers of the Northwind Trading company. It contains property definitions for customer ID, company name, contact name, phone number, and address information.

The Order object encapsulates an order placed by the customer. It includes property definitions for the unique order ID, order date, delivery date, required date, and shipping information.

The Product/Order Detail object encapsulates an individual item ordered by a customer. It includes the unique product ID, product name, description, and quantity ordered within its property definitions.

Complex Tables and Data Tables

There is one complex table and one data table defined within the Mobile Northwind application. The data table contains a short list of shippers. The key field contains the Shipper ID value, and the value field contains the shipping firm name.

The Products complex table contains a list of the items which the Northwind company offers to its customers. There are fields defined for the Product ID, Product Name, Unit Price, and Quantity per Unit values. There is one index on the Product ID and one on the Product Name.

Transactions

Transactions exist for all three object types defined within the project. There is an add and edit transaction for the Customer object. The edit transaction allows the user to edit contact information for the selected customer, including contact name and phone number.

There is an add transaction defined for the Order object. Add is in support of order entry, allowing the user to record a new order for the selected customer.This transaction uses initial value rules on its transactions to set the initial value of all shipping address properties to the matching address properties of the selected customer object. the user can modify these values in the wizard for the transaction if necessary. The transaction also captures date and shipper information.

There is an add, edit, and delete transaction defined for the Product object. Products are added to the selected order object for the customer. Products are selected by the user from the Products complex table.

User Interface

The user interface for the Mobile Northwind application includes screen sets to display customers, orders, and products for orders. They are presented in a basic drill down navigation, with actions defined to go from one to the next.

Transactions are presented in standard wizards. The action to add new orders for a customer includes a looping SubAction step in addition to the transaction step for the add transaction for the order. The looping step executes the action for the Add Product transaction in a loop that continues until the user indicates they are finished. The screen flow from this then presents the screen set for the Add Order transaction once, followed by the screen set for the Add Product transaction being presented in a loop until the user has completed the entry of all desired products for the order.

The fields which capture data for the Add Product transaction are defined with update rules to calculate the total cost of the product order by multiplying the quantity being ordered by the unit price.