Home arrow Howto arrow Howto Start with UiaML
Howto Start with UiaML PDF Print E-mail
Written by Alex   
Monday, 08 October 2007
Article Index
Howto Start with UiaML
The UiaML sitemap view
The UiaML contentarea view
- The Welcome contentarea
- The Liquorice information contentarea
- The Menu contentarea
- The Assortment contentarea
- The Order contentarea
- The Ordermail contentarea
Documenting it all

The Assortment contentarea

 

Within the SMV we already defined the assortment contentarea as follows:

 

Contentarea ID

Assortment

Description

List of products that can be ordered online, as wel as fields to provide the delivery address, the email address and a comment.


Let's model the corresponding CAV by adding one item at a time, starting with the header and the list of products. Until now we haven't defined what aspects of a product should be shown, so let's say that each product of our product list consists of a name, an image, a weight and a price indication as well as a short description.

Since this site is a very low-budget site, we will only list 10 products. We could model this by placing 10 elements for each product aspect in the Assortment CAV, but we can also use a list element instead.

Image

The AssortmentHeader is a simple TextLabel element. So the documentation of it is straight forward:


TextLabelID

AssortmentHeader

Intended content

A label that indicates that this contentarea shows a part of the available assortment and will allow the user to place an order.


Documenting the elements within the list elements would require that we add 10 tables for each element within our list element. To be able to express that a certain tables belong to the same product instance we use add a referential path to the element identifier, like Product[5].Name or Product[7].Image (Note that there is a dot between the element identifiers; The dot is chosen to ease the communication with developers who often program using an object oriented programming language).

But since the description for each element within our list remains the same we use a generic indicator (n) to express that the element properties remains the same for each instance.



TextLabelID

Product[n].Name

Intended content

Name of the product


TextLabelID

Product[n].weight

Intended content

Weigth of the product


TextLabelID

Product[n].price

Intended content

Price of the product


TextLabelID

Product[n].description

Intended content

Description of the product


ImageID

Product[n].Product image

Intended content

Image of the product


Finally we have to add the properties of our list itself to our documentation.


ListID

Product

Nr of items

10

Sort element

Name

Sort order

Alphabetically in ascending order

Recursion

No


We now have a list but we want to be able to select items from the list. By adding a min and max selection our list becomes a SelectList element . Since our customers are not required to order anything we can set the min selection to 0. But our customers may order all of our products, so the max selection will become 10.

Image

Because our List element has become a SelectList element we have to adjust our property table.


SelectListID

Product

Nr of items

10

Sort element

Name

Sort order

Alphabetically in ascending order

Recursion

No

Min selection

0

Max selection

10

Mandatory

No

Intended purpose

Selected products are ordered by the customer.


Now our customers may only order 1 item of each of our products. So we have to add something to our SelectionList to be able to express an order quantity. We do so by adding a TextInput element together with a corresponding TextLabel element to tell the customer about the purpose of the TextInput element.

Image

 

TextLabelID

Product[n].quantity

Intended content

Label before the input field that tells the customer that the input field is meant for the quantity.


TextInputlID

Product[n].quantity.QTY

Intended content

The initial value of the input field should be zero.

Intended purpose

Tells the shop owner how many items of a product the customer orderd.

Mandatory

No


Next we will add the remaining elements mentioned within the description of the contentarea.

Image

You might have noticed that the InputText elements of delivery address and e-mail address have a shadow. This is a visual representation of the mandatory property.


TextLabelID

txtDeliveryAddress

Intended content

Label before the input field that tells the customer that the input field is meant for the delivery address.


TextInputlID

txtDeliveryAddress . DeliveryAddress

Intended content

none

Intended purpose

Delivery address of the ordered items

Mandatory

Yes


TextLabelID

txtEMailAddress

Intended content

Label before the input field that tells the customer that the input field is meant for the e-mail address.


TextInputlID

txtEMailAddress . EMailAddress

Intended content

none

Intended purpose

E-Mail address of the customer. The shop owner will contact the customer using this address to handle the payment and other issues regarding the order.

Mandatory

Yes


TextLabelID

txtComment

Intended content

Label before the input field that tells the customer that the input field is meant for the delivery address.


TextInputlID

txtComment . Comment

Intended content

none

Intended purpose

Here the customer can add a comments that will be send along with the order.

Mandatory

No


To submit the order we need an order button. We represent the button by a simple text label that can trigger a link.

Image


TextLabelID

OrderButton

Intended content

Label that indicates that the customer should click on it to proceed with the order.


If we take a look at our sitemap than we see that the order link will result in a validation.

 

In the specification of the Choice Element “validate” we already stated that we need information from the contentarea first in order to determine the decision base property.

Based on the decision description, we see that the decision is based on the contentarea elements txtDeliveryAddress . DeliveryAddress and txtEMailAddress . EmailAddress.

To determine whether or not a product has been ordered, we can either state that any item of the CAE Product has been selected. But determine whether or not there is any QTY item within the SelectList Product that has a value greater than zero might be more specific.

Our new specification of the SMV Choice Element “Valide” therefore becomes:


Choice ID

Validate

Decision description

Check if an email address and a delivery address has been provided and whether or not there has been ordered any product (there must be a QTY field with a value greater than zero).

Decision base

txtDeliveryAddress . DeliveryAddress

txtEMailAddress . EmailAddress

Product[n].quantity.QTY


Finally the validation might generate in an error event resulting in a navigation back to the Productpage. Displaying the page as specified we get the problem that the customer doesn't get any feedback and therefore doesn't know that he didn't pass the validation check.

To solve this problem we could add a popup to the link, we however choose to display the error messages within the assortment contentarea.

Image

The error messages are just normal text labels containing a text that informs the customer about the mistake he made. Including the error message within this contentarea doesn't mean that they are always visible (that is handled by another plugin), but that they semantically belong to the content of the assortment contentarea.

Getting back to this contentarea not only means that an error message should be shown, but also that the values entered previously should be visible again. So we not only have to add the property tables of the error messages, but also have to change the intended content of the text input elements.


TextLabelID

errDeliveryAddress

Intended content

Error message that informs the customer that the provided delivery address isn't valid.


TextLabelID

errEMailAddress

Intended content

Error message that informs the customer that the provided email address isn't valid.


TextLabelID

errNoProductsSelected

Intended content

Error message that informs the customer that no products has been selected and the order therefore isn't valid.



TextInputlID

txtDeliveryAddress . DeliveryAddress

Intended content

- the previously entered delivery address, in case the contentarea is shown due to an error generated by the validation check.

- otherwise there is no content to be shown.

Intended purpose

Delivery address of the ordered items

Mandatory

Yes


TextInputlID

txtEMailAddress . EMailAddress

Intended content

- the previously entered e-mail address, in case the contentarea is shown due to an error generated by the validation check.

- otherwise there is no content to be shown.

Intended purpose

E-Mail address of the customer. The shop owner will contact the customer using this address to handle the payment and other issues regarding the order.

Mandatory

Yes


TextInputlID

Product[n].quantity.QTY

Intended content

- the previously entered quantity, in case the contentarea is shown due to an error generated by the validation check.

- otherwise the initial value of the input field should be zero.

Intended purpose

Tells the shop owner how many items of a product the customer orderd.

Mandatory

No


 



Last Updated ( Monday, 07 January 2008 )
 
< Prev   Next >