240 likes | 411 Views
SCHOOL OF COMPUTING QUEEN’S UNIVERSITY. Model-driven rapid prototyping with Umple. Andrew Forward, Omar Badreddin , Timothy C. Lethbridge , and Julian Solano School of Electrical Engineering and Computer Science, University of Ottawa, K1N 6N5, Canada . Saad eldin Moustafa
E N D
SCHOOL OF COMPUTING QUEEN’S UNIVERSITY Model-driven rapid prototyping with Umple Andrew Forward, Omar Badreddin, Timothy C. Lethbridge, and Julian Solano School of Electrical Engineering and Computer Science, University of Ottawa, K1N 6N5, Canada SaadeldinMoustafa saad@cs.queensu.ca 08/03/2013
Outlines • Introduction • Problem Definition • Umple Features • Model-Driven Software Development and its Challenges • Properties of Prototypes • Umple Modeling and Prototyping Approach • Class Diagram In Umple • Umple User-Interface Prototype Generator • State Machines in Umple • Mixins and Substitution • Umple’s Architecture • Conclusions
Introduction • Umple: • Stands for “UML Programming Language” • Currently, Model-driven software development brings new opportunities and challenges for rapid prototyping . • Modeling process is inherently abstract, removing the prototyper from details. • Modeling process allows the prototyper to focus on exploring design alternatives for various aspects of the system.
Problem Definition • Most popular modeling languages and tools entirely omit the modeling and generating of user interfaces. • The benefit of user interface prototypes as a medium for interaction with the user and customer is lost.
Model-Driven Software Development • The philosophy of MDSD is that these models should be used to directly generate executable systems. • It should always be inherently possible to generate prototypes from a model.
MDSD Challenges • The most popular types of models are not intended for modeling the user interface. • Combining code generated from models with other necessary code is not easy. • There is a need to generate tangible artifacts and prototypes for business-domain stakeholders. • Software modellers often do not fully understand the consequences of their modeling decisions. • There are limitations in existing approaches to prototype generation from UML models.
Umple Features • Umple allows end users to quickly create class and state machine models and to incrementally embed implementation artifacts. • At any point in the modeling process, users can quickly generate a fully functional prototype that exposes modeling implications on the user interface (Quick user interface creation). • Umple provides a set of textual notations for UML modeling abstractions such as classes, associations, states, and transitions. • Quickly and abstractly prototype the data and behavior of a software system.
Umple Features - conti • Umple can be embedded directly in several programming languages to reduce the amount of code required and speed up the programming process. • Umple provides a tool to allow editing of UML class diagrams in their graphical form. • Subsequent editing of the model can be performed textually or visually.
Desirable Properties of Prototypes • Accurate reflection of system components (data & Design). • Quick and cheap generation of a prototype. • Maximized potential for reuse and composition. • Support for different levels of abstraction. • Support for incremental development. Umple Support all of these properties
Umple Modeling and Prototyping Approach • Umple supports modeling either visually or textually. • Textual Editor Supports: • Syntax-Driven editing • Searching • Auto indentation • Mixins • Graphical Models Support: • Better communication & collaboration. • Relationships are clearer.
Class Diagram In Umple • Code Sample class Student {} classCourseSection {} class Registration { String grade; // an attribute: get and set methods are generated * -- 1 Student; // an association: A registration has 1 Student * -- 1 CourseSection; // another association } A class diagram corresponding to Umple code
Umple User-Interface Prototype Generator • At any point in the modeling or development activities, the user can automatically generate a system prototype. • The system prototype has the following features: • It allows the user to create instances of classes (objects) and links of associations. • Semantic rules are respected at run time (Error message is displayed if violation of the multiplicity). • The user can view and update an object’s attributes. • The user can follow links. • The user can change predefined themes.
Umple User-Interface Prototype Generator School_Person Example:
State Machines in Umple • Umple supports the specification of state machines. • Umple adheres to UML semantics except as described later. • State machines provide a very compact representation of behavior, and hence are ideal for rapid prototyping.
State Machines in Umple • Traffic Control System Example: class trafficLightSystem { carTraffic { Red { Entry / {goingRed();} // Call this when entering the state // The following is a timed transition that is also // guarded, meaning the state changes only if the condition // in square brackets (arbitrary Java) evaluates to true after(redTimer)[!emergency] -> Yellow; emergencyNotice -> AllRed; } Yellow { ... } ... } pedestrianTraffic { DontWalk { goingRed [!emergency] -> Walk; emergencyNotice -> DontWalk; } ... } ... }
Mixins and Substitution Mixin allows independently-developed code to be injected into a set of classes StatemachinecoreTrafficController { Red { After(redTimer) -> Green; } Green { After(greenTimer) -> Yellow; } Yellow { After(yellowTimer) -> Red; } } Substitution Mixin
Mixin Benefits • Code Reuse • Easy to add and remove transitions • Quickly draft • Iterative refinement
Umple’s Architecture Ecore Visual Editor TextualEditor XMI Interface Generator • Umple Core System Layout Information Third Part Tools Umple Compiler Runtime Object Persistence Mechanism Repository Umple Code Generator
Conclusions • Umple Provides: • Accurate reflection of system components and data. • Accurate reflection of current system design directions. • Quick and cheap generation of a prototype. • Maximized potential for reuse and composition. • Support for different levels of abstraction. • Support for incremental development.