02.04.2013 Views

CONTENTS

CONTENTS

CONTENTS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

RAPID PROTOTYPING OF CONVERSATIONAL WEB FLOWS 195<br />

Figure 1. iComponent Profile Extract<br />

Entity and id can be used to mark instances from domain that have identity. View<br />

corresponds to the view part of an MVC architecture and controllers are defined as<br />

simple components having behavioral elements marked as actions.<br />

For binding data between actions and views we use the context abstraction [2],<br />

and the bijection mechanism [1] which is a generalization of the dependency injection<br />

as follows. Whenever a component’s action is invoked, values from the contexts are<br />

injected into the properties of the component being invoked, and also “outjected”<br />

from the component’s properties back to the contexts.<br />

In this paper we add new stereotypes for modeling two contexts of web applications:<br />

the request context and the conversation context which represent instances<br />

required for processing a request, respectively a conversation. A conversation is a<br />

unit of work from the point of view of the user and can span across multiple requests.<br />

For instance, registering a new customer can be designed as a conversation composed<br />

of two separate requests, submitting the account information and then the personal<br />

details.<br />

RequestScope and ConversationScope are used to associate components and their<br />

properties to these contexts. Information flow direction must be specified using in<br />

and out stereotypes.<br />

View properties can be marked as input properties - for entering data, or as<br />

output properties - for displaying data. The model part of MVC is represented by<br />

all instances associated to the request and conversation contexts. By convention, a<br />

view property is either directly mapped to a context property, or indirectly using a<br />

selection expression written in OCL.<br />

3. Development Approach<br />

Each of the following subsections describes a step of our prototyping approach on<br />

a simple case study for registering a new customer.<br />

A. Create a new action. A creation wizard [3] can be used to rapidly create a<br />

new action. Figure 2 - (a) presents the result of this creation process for a new index<br />

action and a new Home owner component: a Home component type associated to<br />

the RequestScope is created, an index operation is added which is described by an<br />

empty index activity (not shown in Figure 2); an Index view is also created and a<br />

simple out welcome property is associated to the request context. Now we can run<br />

the model prototype, select a controller and then execute an action; a view is selected<br />

in order to render the response - by convention, a view with the same name as the<br />

action.<br />

B. Create domain classes. Entities and value objects can be created using<br />

any UML tool. We establish their properties and then run a generation wizard for

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!