Mixed Generative and Handcoded Development of Adaptable data-centric - - PowerPoint PPT Presentation

mixed generative and handcoded development of adaptable
SMART_READER_LITE
LIVE PREVIEW

Mixed Generative and Handcoded Development of Adaptable data-centric - - PowerPoint PPT Presentation

Mixed Generative and Handcoded Development of Adaptable data-centric Business Applications 27th October 2015 Pedram Mir Seyed Nazari, Alexander Roth, and Bernhard Rumpe Software Engineering RWTH Aachen http://www.se-rwth.de/ Alexander Roth


slide-1
SLIDE 1

27th October 2015

Mixed Generative and Handcoded Development of Adaptable data-centric Business Applications

Pedram Mir Seyed Nazari, Alexander Roth, and Bernhard Rumpe Software Engineering RWTH Aachen http://www.se-rwth.de/

slide-2
SLIDE 2

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 2

Motivation

  • A data-centric business application
  • is based on structured, consistent information
  • aims at controlling, accessing and managing data
  • E.g.: MS Access, human resource management, etc.
  • Common business applications provide [MV09, SPHV10]
  • CRUD (create, read, update, delete) functionality for

managed data

  • search functionality
  • persistence functionality
slide-3
SLIDE 3

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 3

Motivation

  • Goal: Generative development of data-centric business applications
  • generate as much code as possible
  • from an abstract description and
  • provide mechanisms for adaptations
  • A solution should regard
  • consistency of generated data structure at all time
  • light-weight approach (consider the different levels of users)
  • rapid and high customizability (regeneration without loss)
slide-4
SLIDE 4

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 4

Generative Development Overview

Parame- terized generator Generator script/template Map: concept code model manually written code runtime system Environment: hardware, GUI, frameworks generated code + included parts

Predefined

components

Predefined

components

Predefined

components

API API domain model describes the domain of interest transforms model into code generated business application handwritten extensions

slide-5
SLIDE 5

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 5

Data Explorer (DEx)

  • DEx is a generator for (parts of) business applications
  • Input: Class Diagram
  • Generated result:
  • Running application for managing data modeled

in the class diagram

  • A graphical user interface
  • Support for storing data in the cloud

DEx generator

DEx product: Java Swing Application CD4A The model: A textual class diagram

slide-6
SLIDE 6

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 6

A Social Network

Person Date lastVisit String firstName String secondName Date dateOfBirth int zip String city String country «abstract» Profile String profileName /int numOfPosts /int friends Group boolean isOpen Date created String purpose /int members profileName 1 *

  • rganizer

1 tagged 1 * replyTo 0..1 Relationship boolean isPending Date requested Date accepted «enum» RelationType FRIEND FAMILY FOLLOWER COLLEAGUE OTHER Tag boolean confirmed Photo double height double width picture InstantMessage Date timestamp String content 1.. * * 1 «interface» Post PhotoMessage

  • rganized

* 1 invited * 1 initiated * member * * * * received 1 * sent {ordered} {ordered}

CD SocNet derived attribute

  • rdered association

qualified associations

slide-7
SLIDE 7

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 7

Modeling data-centric Business Applications

  • Structural description language represent the domain model
  • E.g.: book management, human resource management
  • CD4A is
  • a textual language to describe class diagrams for analysis
  • a simplification of UML/P CD [Sch12]

classdiagram SocNet { abstract class Profile {...} class Person extends Profile{...} association ... ; }

CD

slide-8
SLIDE 8

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 8

Example of generated SocNet application

class and interface managed instances baisc functionality

slide-9
SLIDE 9

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 9

Mapping CD4A to UI Elements

«abstract» Profile String profileName /int numOfPosts /int friends

CD SocNet..

Relationship boolean isPending Date requested Date accepted * 1 invited * 1 initiated

slide-10
SLIDE 10

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 10

Validating Input

association with cardinality [1] a valid String is required

slide-11
SLIDE 11

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 11

Role-based Access Control

CRUD operations for every type Roles and users managed with Apache Shiro

slide-12
SLIDE 12

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 12

Generated Products

  • the DEx product architecture consists of three layers
  • Key: reflect possible static knowledge (import)
  • Specific classes may import more general classes

generated RTE standard components

Application Core

generated RTE standard components

GUI

generated RTE standard components

Persistence

slide-13
SLIDE 13

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 13

Goals of Handcoding

  • The goal of handcoding
  • extend domain model (data structure)
  • add functionality to generated code
  • customize generated code
  • DEx supports extensions for
  • domain model by attributes and methods
  • domain model by signatures
  • generated GUI code
slide-14
SLIDE 14

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 14

  • Generated DEx product has this architecture
  • HC internal architecture is not in generators control:
  • But it is recommended to maintain this architecture

Overview of the Generated Product with HC

RTE standard components

Application Core

RTE standard components

GUI

RTE standard components

Persistence

hand coded hand coded hand coded generated generated generated

slide-15
SLIDE 15

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 15

  • Required steps
  • 1. Add handwritten Java interface XSIG
  • 2. Add handwritten Java class XEIMP
  • 3. Implement new methods in XEIMP

public interface Group extends dex.socnet.GroupSIG { //... } handwritten Java interface «interface» GroupSIG

Product-CD

«interface» Group GroupImpl GroupEIMP

«hc» «gen» «gen» «hc»

Java

«gen» public abstract class GroupImpl implements dex.socnet.Group { //... }

Extending the generated Product

slide-16
SLIDE 16

Alexander Roth Lehrstuhl für Software Engineering RWTH Aachen

Seite 17

Conclusion

  • Brief introduction into data-centric business applications
  • CD4A to create domain models
  • Generative development of data-centric business applications
  • Data Explorer (DEx) Generator
  • handwritten extensions