5Producing Flex Screens

5Producing Flex Screens

5.1Using Views ("mxml" files)

To obtain Flex screens, switch into the "Flex Development" perspective and if you switch to the « Design » mode and look in the component toolbox, you will find views modelized by the UML model and which correspond to the « mxml » files.

output_html_f273e84.png

Figure 1 : Flash Perspective

5.2View Conception: "Model Locator" and "Process Model"

Each "mxml" file corresponds to a view. Each view is defined in the UML model thanks to a screen activity diagram. These activity diagrams contain:

  • pin-ins and pin-outs corresponding to instances that were passed as arguments or corresponding to instances of a return of an invoked service (by way of an action)
  • control fluxes corresponding to available actions/events.

Each of these elements will be available on the “mxml” view thanks to a:

  • "model locator" : instances of pin-in/pin-out
  • "process model" : instances of service invocations  control flux

These components are automatically generated thanks to screen activity diagrams.

The "model locator" must be instantiated for each view. In fact, you can have multiple instances of “mxml” views available within our application. The "process Model", on the other hand, is only instantiated once. It is then used by the "mxml" view thanks to a principle of dependence injection.

5.3Example of a View: page "create.mxml"

5.3.1Graphical Display of a View

The screenshot below represents a view containing a simple form. This form contains a drop-down list that will also have to be filled.

output_html_m7010a7d.png

Figure 2: Example of a View from a Graphical Editor

5.3.2UML Model of this View: Screen Activity Diagram

The screen activity diagram of the UML model offers two flux controls at the beginning of the “create” action. The first (evtGetSalutationList) allows you to define an event in order to initialize the list of salutations (calling the operation « salutationFindAll ») while the second (ectCreateContact) saves the contact that was just created (calls the operation "contactCreate”).

output_html_232d4a23.png

Figure 3: Screen Activity Diagram from the Example

5.3.3 "Model Locator" Declaration and Injection of Dependence of the "Process Model" in the View

In the "mxml" file view, the "model locator" instance and the "process model" injection are generated in the following way:

output_html_m45b0ade4.png

This implies that we will add the following operations and attributes to this view:

output_html_7d4efdee.png

Figure 4: List of Available Variables and Operations

The code of the final « mxml » page is the following:

output_html_m2940c88.png

output_html_m3de2c72a.png

My Recent Modifications


BLU AGE is a registered trademark of NETFECTIVE TECHNOLOGY S.A. - Trademarks are property of their respective owners
Do not copy or divulge without written permission