Sample Home

Sample Home - Application Launch Page

  Three (3) Sample Application Demonstration Pages

The sample mini-application has three pages built with the ProtoSmart framework.  They demonstrate the agility of the protodev approach for documenting transactional processing requirements.  Business users are able to enter and manipulate "live" test data on the following:
  1. Form Page With The Full Suite Of Form Elements
  2. Verification Page Saving Form Values
  3. Confirmation Page Complete With Confirmation Number
Note: Consistent with a first-cut protodev prototype, the sample application does not provide data validation.


Technical WalkThru

  Technical Overview

The JavaScript source code file psSampleActionFunctions.js supports application functions while psTechnicalWalkThru.js supports "WalkThru" functions.  The source code links demonstrate the ability of the ProtoSmart API to enable transactional processing with relatively few lines of code.

Both framework and application objects are viewable from the "WalkThru" portion of each sample application web page.  One can observe state changes in these objects as the transaction progresses.

  The Three (3) Framework Objects - Session, Form and Error

Upon creation, a Session Object can store name/value pairs available until the object is invalidated or the browser is closed.  A Session Object was created when this page loaded.  After creation, the Session Object contains:
      


A Form Object stores name/value pairs consisting of the form element name and the submitted value.  Depending on whether or not a form has yet been submitted the Form Object contains:
      


The Error Object contains validation messages for displaying on the page if data input failed to pass the validation checks.  Typically, a first-cut protodev prototype does not implement validation rules.
      

 
  The Two (2) Application Objects - Confirmation Table and Transaction Table

The sample application has a Confirmation and Transaction Table Object which originate as XML PDtables.  (See the Component Model for a visual representation of the framework architecture.)  In a practical sense, a Table Object provides database services.  Since the original PDtable is not modified, a Table Object (database) can be "refreshed" or restored to its initial state.

Each transaction (in the sample application) is assigned a unique confirmation number.  The single row PDtable called SAMPLE-CONFIRM-NUM.xml stores the base confirmation number, "1000".  This number is incremented and stored in the Transaction Table Object for each form submitted.  "Refreshing" this Table Object reinitializes the confirmation number to "1000".
             


Each transaction (row) in the Transaction Table Object contains the confirmation number in the first column followed by the form data submitted.  "Refreshing" this table results in data being discarded since the SAMPLE-TRANSACTION.xml PDtable is empty.  The PDmodel SAMPLE-TRANSACTION-MODEL.xml provides the cloneable reference for adding rows.