Docsity

Desenvolvimento de KWAF: Quadro de Fundos para Engenharia de Software em Aplicativos Web, Notas de estudo de Engenharia Unificada Básica

Pré-visualização parcial do texto

Baixe Desenvolvimento de KWAF: Quadro de Fundos para Engenharia de Software em Aplicativos Web e outras Notas de estudo em PDF para Engenharia Unificada Básica, somente na Docsity!

Pós-Graduação em Ciência da Computação

“A Cloud Deployed Repository for a Multi-View

Component-Based Modeling CASE Tool”

Por

Breno Batista Machado

Dissertação de Mestrado

Universidade Federal de Pernambuco [email protected] www.cin.ufpe.br/~posgraduacao

RECIFE, Agosto/

UNIVERSIDADE FEDERAL DE PERNAMBUCO

CENTRO DE INFORMÁTICA

Breno Batista Machado

A Cloud Deployed Repository for a

Multi-View Component-Based Modeling

CASE Tool

ESTE TRABALHO FOI APRESENTADO À PÓS-GRADUAÇÃO EM CIÊNCIA DA COMPUTAÇÃO DO CENTRO DE INFORMÁTICA DA UNIVERSIDADE FEDERAL DE PERNAMBUCO COMO REQUISITO PARCIAL PARA OBTENÇÃO DO GRAU DE MESTRE EM CIÊNCIA DA COMPUTAÇÃO.

A MASTER THESIS PRESENTED TO THE FEDERAL UNIVERSITY OF PERNAMBUCO IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF M.SC. IN COMPUTER SCIENCE.

ADVISOR:

Prof. Jacques Pierre Louis Robin

RECIFE, 31 de AGOSTO de 2009

Aos meus pais, meus exemplos.

ACACKKNNOOWWLLEEDDGGEEMMEENNTTSS

Agradeço a Deus.

Agradeço também a todos, que de uma forma ou de outra, me ajudaram nesta longa jornada:

Ao meu orientador Jacques Robin, pela orientação, paciência, compreensão e por sempre acreditar

em mim.

Ao Weslei que me ajudou a desenvolver este trabalho, sempre compartilhando e discutindo idéias.

À minha namorada Renata, por toda ajuda e apoio, e por seu imenso amor, sem os quais não

conseguiria terminar.

Aos meus pais, Benicio e Neumann, e minha irmãzinha querida, Bruninha, que sempre acreditaram

em mim e sempre me apoiaram, sempre foram meu porto-seguro.

À toda a minha família por todo apoio que me deram.

Em especial aos meus amigos Cleyton, Fábio e Geovane, que me ajudaram nos momentos finais da

escrita da dissertação.

Ao pessoal da SWFactory pelo incentivo sempre.

À todos os meus amigos, da Casa do Mar, de Campo do Meio, de Lavras, de Belo Horizonte, de

Recife, e de onde mais se espalharam.

Aos membros da banca, Hendrik e Ana Cristina, que se dispuseram a avaliar este trabalho, e

principalmente pelas ótimas contribuições que fizeram para melhorar a qualidade deste trabalho.

À equipe do CIn/UFPE pela infraestrutura e ajudas que foram necessárias.

Ao CNPq, pelo apoio financeiro para o desenvolvimento deste trabalho.

Por final, a todos aqueles que não citei, mas sabem que me ajudaram.

vi

navegação multidimensional, ortográfico e independente de plataforma, entre visões de

baixa granularidade, específica a preocupações, e locais, de um componente.

Dentro do projeto WAKAME, esta dissertação de mestrado investiga três principais

questões em aberto. A primeira é o projeto do KWAF (KobrA2 Web App Framework), um

modelo de ambiente genérico e independente de plataformas para ser instanciado para o

projeto específico de aplicações Web. O segundo é um PIM detalhado do WAKAME

como um exemplo de instanciação do KWAF. O terceiro é a implementação e a avaliação

de serviços baseados na nuvem que (a) persistentemente armazenem as visões PIM e

ortográficas de componentes KobrA2, (b) integre estas visões em um SUM persistente, (c)

verifique a conformidade do SUM com o meta-modelo de artefatos de KobrA2, (d) use as

restrições do meta-modelo tanto para propagar mudanças em uma visão para outras

relacionadas ou enviar mensagens de aviso específicas de uma visão a respeito da violação

de restrições.

As principais contribuições desta dissertação são: (a) o projeto de KWAF, o

primeiro estudo de caso para avaliação do processo KobrA2 para aplicações Web ricas

com gráficos 2D, (b) o projeto de alto nível do WAKAME como estudo de caso para

avaliação de KWAF, (c) a implementação de serviços baseados em nuvem computacional

para persistência das visões e integração e validação das visões em um SUM persistente, e

(d) a integração e testes destes serviços com a parte cliente do WAKAME que permite a

edição ortográfica das visões.

vii

AB ABSSTTRRAACCTT

Models offer abstractions of a system that allows engineers to reason about that system

while ignoring details that are not relevant to focus on the most relevant aspects. The

Unified Modeling Language (UML) has become a de facto standard for system analysis

and design but, in fact, UML has some obvious shortcomings: (1) the set of result types is

too large and heterogeneous, leading the user to ambiguous interpretation, and (2) its tool

support is not satisfactory. It is necessary a system of rules which governs the analysis and

design process, UML is too general.

Developed jointly by Universität Mannheim and UFPE, the KobrA2 method aims

to addresses these weaknesses by incorporating special views to model the layout,

navigation and behavior of GUI components and introducing the concept of orthographic

software engineering in which building a Platform-Independent Model (PIM) for each

software component is piecemealy carried out by constructing largely orthogonal concern-

specific views of the component. These views are then integrated into a Single Unified

Model (SUM) which is in turn verified for conformance to the KobrA2 artifact metamodel.

To bring productivity gains, this integration and verification must be automatically

implemented by model transformations built in a CASE tool. Therefore, to be successful

KobrA2 needs a tool that gives support to its system engineering process.

This Master's Thesis is part of the WAKAME (Web App KobrA Modeling

Environment) project that aims at constructing such CASE tool. In addition to be the first

CASE tool to be process-driven and to support orthographic, model-driven, component-

based OO framework and application engineering, including GUI PIM construction,

WAKAME also aims to innovate by being (a) deployed on a cloud computing platform

and accessible ubiquitously through any web browser, (b) being very easy to learn thanks

to a minimalist, few icons, few actions, Google-style GUI and (c) efficient to use thanks to

a thin client, lightweight design and a multi-dimensional navigation scheme among

cognitively fine-grained, concern-specific, local, orthographic component PIM views.

Within the WAKAME project, this Master's Thesis investigates three main open

questions. The first is the design of KWAF (KobrA Web App Framework), a platform-

ix

  • Chapter 1 Introduction CO CONNTTEENNTTSS
    • 1.1. Context and Motivation
    • 1.2. Research Goals
    • 1.3. Research Methodology
    • 1.4. Master Thesis Structure
  • Chapter 2 Software Engineering Background
    • 2.1. Model‐Driven Engineering
      • 2.1.1 MDE Goals, Principles and Vision
      • 2.1.2 Precise Modeling and Metamodeling with OCL2.0
    • 2.2. Component‐Based MDE
      • 2.2.1 Component‐Based Software Engineering
      • 2.2.2 The KobrA1 CBMDE Method
      • 2.2.3 The KobrA2 CBMDE Method
    • 2.3. Cloud Computing
      • 2.3.1 Principles and Related Concepts
      • 2.3.2 Benefits of Cloud Computing
      • 2.3.3 Google App Engine
      • 2.3.4 Google App Engine and others cloud computing platform........................................
    • 2.4. Model‐Driven CASE Tools
      • 2.4.1 MDE CASE Tools
    • 2.5. Chapter Remarks
  • Chapter 3 WAKAME Project
    • 3.1. Long‐Term Goals and Principles
    • 3.2. KWAF
      • 3.2.1 KWAF Framework: Principles, Structure and Case Study
      • 3.2.2 Structural models of the KWAF Component
      • 3.2.3 Structural Models of the Webservice Component
      • 3.2.4 Structural Models of GUIClient Component
      • 3.2.5 KWAF Assessment Remarks
    • 3.3. WAKAME Top‐Level PIM
      • 3.3.1 WAKAME as an Instance of KWAF
      • 3.3.2 The WAKAME Component
    • 3.4. Chapter Remarks
  • Chapter 4 The WAKAMEWebService and the Model Repository
    • Repository 4.1. The KWAF instance Platform Independent Model for the WAKAMEWebService and Model
      • 4.1.1 The Component WAKAMEWebService
      • 4.1.2 The Component WAKAMEModel x
      • 4.1.3 The Component PIMManipulationAction
      • 4.1.4 The Component ViewManipulationAction.................................................................
      • 4.1.5 The Component ModelIOAction
      • 4.1.6 The Component OCLEngine
    • 4.2. The WAKAMEWebService and the Model Repository Implementation
      • 4.2.1 Platform Definition
      • 4.2.2 Model Repository with PyEMOF
      • 4.2.3 Model Repository with EMF
      • 4.2.4 The KobrA2 Metamodel in Ecore
      • 4.2.5 Model Repository Generation
      • 4.2.6 Server Implementation
      • 4.2.7 WAKAMEWebService Integration with WAKAMEGUI, Tests and Deployment
    • 4.3. WAKAME Overall
  • Chapter 5 Assessment Experiments with Early Adopters
    • 5.1. Experiment Definition
    • 5.2. Execution and Analysis of the Case Study
    • 5.3. Experiment Findings
    • 5.4. Chapter Remarks
  • Chapter 6 Conclusion
    • 6.1. Contributions..................................................................................................................
    • 6.2. WAKAME Server Limitations
    • 6.3. Future work on WAKAME Server
    • 6.4. Limitations of WAKAME as a whole
    • 6.5. Future work on WAKAME as a whole
    • 6.6. Concluding Remarks
  • Chapter 7 Bibliography
  • Appendix A Survey: WAKAME Evaluation
  • Figure 2.1. ‐ Typical MDE Transformation scheme LI LISSTT OOFF FFIIGGUURREESS
  • Figure 2.2 ‐ Locality Principle of KobrA
  • Figure 2.3. Komponent Structure.
  • Figure 2.4 ‐ Multiple Views with SUM.
  • Figure 2.5 – KobrA2 Views
  • Figure 2.6 ‐ Prototypical Structural Class Service View
  • Figure 2.7 ‐ Prototypical Structural Class Type View........................................................................
  • Figure 2.8 ‐ Prototypical Specification Operational Service View
  • Figure 2.9 – Services offered by Cloud Computing. (Source: Levitt, 2009)
  • Figure 2.10 – Layers in a computer system in the clouds. (Source: Yousef et al , 2008)
  • Figure 2.11 ‐ Ecore Metamodel. (Source: Ecore, 2009)
  • Figure 2.12 ‐ Example of GUI generated by EMF
  • Figure 2.13 ‐ Framework for Generated Model. (Source: Backvanski and Graff, 2005)
  • Figure 2.14 ‐ Epsilon Architecture. (Adapted from: Kolovos et al , 2008)
  • Figure 2.15 ‐ ATL Module.
  • Figure 2.16 ‐ ALTL Module Element.
  • Figure 2.17 ‐ ALT Input and Output Patterns.
  • Figure 3.1 ‐ The Web Application Photo Album
  • Figure 3.2 ‐ Structural Model of the KWAF Component
  • and MVCModel Figure 3.3 ‐ The WebService Component with its sub‐components: Service Controller, MVCAction
  • Component....................................................................................................................................... Figure 3.4 ‐ Platform Independent Model of the of the Photo Album application WebService
  • Figure 3.5 ‐ Platform Specific Model of the Photo Album application WebService component
  • Figure 3.6 ‐ The MVCModel Component Structure
  • MVC Figure 3.7 ‐ Entities and data types for the MVCModel component, representing the Model in
  • Figure 3.8 ‐ GUIClient component structure
  • Figure 3.9‐ PhotoAlbum GUI Navigation Model...............................................................................
  • Figure 3.10 ‐ PhotoView Component Structural Model
  • Figure 3.11 ‐ GUIController Component Structural Model
  • Figure 3.12 ‐ PhotoAlbumGUIController Component and the Definition of one Action using OCL
  • Figure 3.13 ‐ WAKAME Top‐Level xii
  • Figure 3.14 – KWAF component structure.
  • Figure 3.15 ‐ WAKAME Specification Structural Class Service View
  • Figure 3.16 ‐ WAKAME Realization Structural Class Service View
  • Figure 3.17 ‐ WAKAME Realization Structural Class Type View
  • Figure 4.1 ‐ WAKAMEWebService Specification Structural Class Service
  • Figure 4.2 ‐ WAKAMEWebService Realization Structural Class Service
  • Figure 4.3 ‐ WAKAMEModel Specification Structural Class Service
  • Figure 4.4 ‐ WAKAMEModel Specification Structural Class Type
  • Figure 4.5 ‐ PIMManipulationAction Specification Structural Class Service
  • Figure 4.6 ‐ PIMManipulationAction Specification Operation Service
  • Figure 4.7 ‐ ViewManipulationAction Specification Structural Class Service View..........................
  • Figure 4.8 ‐ ViewManipulationAction Realization Structural Class Service
  • Figure 4.9 ‐ ViewManipulationAction Realization Operational Service
  • Figure 4.10 – Transformations Abstractions and a Expression Transformaton example.
  • Figure 4.11 ‐ Transformations Specification Structural Class Service
  • Figure 4.12 ‐ Transformations Specification Operational Service
  • Figure 4.13 ‐ ModelIOAction Specification Structural Class Service
  • Figure 4.14 ‐ ModelIOAction Specification Operational Service
  • Figure 4.15 ‐ OCLEngine Specification Structural Class Service
  • Figure 4.16 ‐ metaWAKAME Architecture........................................................................................
  • Figure 4.17 – metaWAKAME Prototype
  • Figure 4.18 ‐ Dependencies between KobrA2 and UML
  • Figure 4.19 ‐ Dependencies between KobrA2 and OCL
  • Figure 4.20 ‐ Dependence between SUM and UML.
  • Figure 4.21 ‐ Classes Package from KobrA2 metamodel..................................................................
  • Figure 4.22 – OCL Constraint on ComponentClass
  • Figure 4.23 ‐ KobrA2 View Package Nesting.
  • Figure 4.24 ‐ Package Dependencies between Views and SUM.
  • Figure 4.25 ‐ Package dependencies between Views and SUM.......................................................
  • Figure 4.26 ‐ "Subject" component and its View‐SUM relationship.
  • Figure 4.27 – Relationship between View and Subject ComponentClass
  • Figure 4.28 ‐ Transformation Abstrations.
  • Figure 4.29 ‐ Transformation Abstraction
  • Figure 4.30 – OCL Constraint on View
  • Figure 4.31 ‐ KobrA2 Metamodel Packages in Ecore
  • Figure 4.32 ‐ Process to Generate the Model Repository from Ecore File xiii
  • Figure 4.33 ‐ Package Structure of WAKAMEWebService Implementation.
  • Figure 4.34 – Example of Transformation OCL Expression
  • Figure 4.35 ‐ WAKAME Issue Tracker
  • Figure 4.36 ‐ WAKAME Main Page
  • Figure 4.37 ‐ WAKAME Create Model Page
  • Figure 4.38 ‐ WAKAME Import Model Page
  • Figure 4.39 ‐ WAKAME Select Model Page
  • Figure 4.40 ‐ WAKAME Edit Model Page
  • Figure 4.41 ‐ WAKAME Modeling Page
  • Figure 5.1 ‐ Educational Level of Participants
  • Figure 5.2 ‐ Familiarity of the Participants with the RSM and WAKAME tools.
  • Figure 5.3 – Model Completeness Comparison.
  • Figure 5.4 –Availability Related Answers Comparison.
  • Figure 5.5 ‐ Performance Related Answers Comparison.
  • Figure 5.6 ‐ Ease of Use Related Answers Comparison.
  • Figure 5.7 ‐ Diagram Layout Control and Legibility Related Answers Comparison........................
  • Figure 5.8 ‐ Standard Compliance Related Answers Comparison.

xv

LI LISSTT OOFF AACCRROONNYYMMSS

API – Application Programming Interface

ATL – ATLAS Transformation Language

AWS – Amazon Web Service

CASE – Computer Aided Software Engineering

CBD – Component Based Development

CBE – Component Based Engineering

CIM – Computer Independent Model

CMOF – Complete MOF

CPU – Central Processing Unit

CSS - Cascading Style Sheets

DSL - Domain-specific language

DSML - Domain-Specific Modeling Languages

ECL - Epsilon Comparison Language

EJB – Enterprise Java Beans

EGL - Epsilon Generation Language

EMC - Epsilon Model Connectivity

EMF – Eclipse Modeling Framework

EML - Epsilon Merging Language

EMOF – Essential MOF

EOL - Epsilon Object Language

ETL – Epsilon Transformation Language

EVL - Epsilon Validation Language

EWL - Epsilon Wizard Language

xvi

GAE – Google App Engine

GQL – Google App Engine Query Language

GUI – Graphical User Interface

HTML - Hypertext Markup Language

HTTP – HyperText Transfer Protocol

HTTPs – HyperText Transfer Protocol Secure

IaaS – Infrastructure as a Service

IDE – Integrated Development Environment

JAR – Java Archive

JDO – Java Data Objects

JPA – Java Persistence API

JPEG – Joint Photographic Experts Group

JSP – Java Server Pages

KM3 – Kernel Meta MetaModel

KWAF – KobrA Web App Framework

MARTE – Modeling and Analysis of Real-Time and Embedded Systems

MDA – Model Driven Architecture

MDD – Model Driven Development

MDE – Model Driven Engineering

MDR - Metadata Repository

MDT - Model Development Tools

MOF – Meta Object Facility

MT – Model Transformation

MVC – Model View Controller

OCL – Object Constraint Language

OMG – Object Management Group

CHCHAAPPTTEERR 1 1

ININTTRROODDUUCCTTIIOONN

In this chapter we present the context on which this work is present, the motivation for this

work, its goals, the used methodology and its structure.

1.1. Context and Motivation

According to (Beydeda and Gruhn, 2005) it’s tempting to say that software development is

easy, but many issues such as the complete understanding of the problem space, large

numbers of restrictions applied on the solutions being considered and many types of

changes in all stages of development make it much more challenging. Software

Engineering presents many methodologies that searches for addressing these issues in

software development. These methodologies can be divided into two main groups (Vinekar

et al , 2006): the traditional methodologies – like the Rational Unified Processs (RUP)

(Kruchten, 2003) – and the agile methodologies – where are highlighted SCRUM

(Schwaber, 2004) and XP (Beck and Andres, 2004).

The traditional methodologies, like RUP, also known as “heavy weighted”

methodologies, are characterized by being subdivided into large well defined phases

(Pressman, 2009) and are focused in documentation. The main contributions of these

methodologies are: (i) project decomposition in phases largely orthogonal to process steps;

(ii) CASE tool assisted construction of digitally stored, abstract requirement, architecture

and design models, prior to coding; (iii) use of visual, standard notation for these models

(UML); and (iv) allow a high level of customization in their processes and steps. These

methodologies are usually applied to large, distributed projects with a heterogeneous

development time with a high turnover during the lifecycle. As weaknesses, we can depict

the lack of practices and guidance to: software reuse; the specification of which part of the

UML2 metamodel to use; the code generation from behavioral models; and how to build

test models.

In contrast to the traditional methodologies we have the agile methodologies, also

called “lightweight”, which are focused on deliverable artifacts development and

cooperation and communication among team members. The eXtreme Programming (XP),

one of the agile methodologies, present a set of practices, principles and values where we

can highlight as strengths: (i) pair artifact construction; iterative requirement test

construction after partial only partial requirement elicitation and before requirement

implementation; (ii) focus on artifacts that directly lead to running code; and (iv)

continuous integration to tested running prototype. Another agile methodology, which is

more focused in management practices, is the SCRUM, from where we can highlight the

informal, collective task allocation and time estimates with focus on creating team spirit

and maintaining motivation. The common scope of agile methodologies are projects that

present a small stable teams of developers with solid experience with application type,

implementation platform(s), all software engineering roles with continuous access to

known and committed users. However, agile methodologies present drawbacks, such as

lack of practices and guidelines for software reuse; deployment platform fragmentation and

rapid changes; team turnover, team geographical scattering, rookies; innovative

applications with no experienced developers nor even know users; and high-level

architectural design of large, complex software and product lines.

In an attempt to overcome the existing limitations present in these two methodology

groups, the traditional and agile methodologies, the Model-Driven Engineering (MDE)

(Stahl et al, 2006) depict as principles: separate business analysis and design refinement

from platform-specific coding; build a Platform-Independent Model (PIM) refined enough

to serve as input to full code generators, including behavioral code; reuse integrated

consolidated comprehensive self-extensible standard modeling language family like

Metamodel Object Facility (MOF2) (MOF, 2006), Object Constraint Language (OCL2),

Unified Modeling Language (UML2), Diagram Interchange (DI). The MDE application

scope is domains with platform heterogeneity, fragmentation and rapid evolution (e.g.,

mobile and desktop clients, cloud servers). In despite of this attempt to overcome previous

limitations MDE is mere an engineering philosophy, no consolidated and only widely

adopted with specific methods yet. Other limitations of MDE is the lack of practice and

guidelines for reusing functionalities across applications, and how to define for each

artifact which part of the huge UML2 metamodel to use.