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 Lehrstuhl für Motivation Software Engineering RWTH Aachen Seite 2 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
Alexander Roth Lehrstuhl für Motivation Software Engineering RWTH Aachen Seite 3 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)
Alexander Roth Lehrstuhl für Generative Development Overview Software Engineering RWTH Aachen Seite 4 transforms model handwritten extensions into code domain model describes the domain of interest manually Predefined written code Predefined Predefined components components components model API API Parame- generated code terized + included parts generator runtime system Environment: hardware, GUI, frameworks Generator script/template Map: concept code generated business application
Alexander Roth Lehrstuhl für Data Explorer (DEx) Software Engineering RWTH Aachen Seite 5 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 CD4A The model: DEx product: A textual class diagram Java Swing Application
Alexander Roth Lehrstuhl für A Social Network Software Engineering RWTH Aachen Seite 6 CD SocNet ordered association 1 1 Relationship * invited sent * «abstract» Profile {ordered} «interface» boolean isPending * 1 * Post * initiated received Date requested String profileName {ordered} Date accepted /int numOfPosts derived /int friends attribute 1 * «enum» InstantMessage 0..1 RelationType Date timestamp * * replyTo Person Group FRIEND member String content FAMILY Date lastVisit boolean isOpen FOLLOWER String firstName Date created COLLEAGUE String secondName String purpose OTHER Date dateOfBirth /int members PhotoMessage int zip profileName String city organizer organized String country * picture 1.. * 1 tagged 1 Photo 1 * * Tag double height qualified associations double width boolean confirmed
Alexander Roth Lehrstuhl für Modeling data-centric Business Applications Software Engineering RWTH Aachen Seite 7 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] CD classdiagram SocNet { abstract class Profile {...} class Person extends Profile{...} association ... ; }
Alexander Roth Lehrstuhl für Example of generated SocNet application Software Engineering RWTH Aachen Seite 8 baisc functionality class and interface managed instances
Alexander Roth Lehrstuhl für Mapping CD4A to UI Elements Software Engineering RWTH Aachen Seite 9 CD SocNet.. «abstract» 1 Relationship invited * Profile boolean isPending 1 String profileName initiated * Date requested /int numOfPosts Date accepted /int friends
Alexander Roth Lehrstuhl für Validating Input Software Engineering RWTH Aachen Seite 10 a valid String is required association with cardinality [1]
Alexander Roth Lehrstuhl für Role-based Access Control Software Engineering RWTH Aachen Seite 11 CRUD operations for every type Roles and users managed with Apache Shiro
Alexander Roth Lehrstuhl für Generated Products Software Engineering RWTH Aachen Seite 12 the DEx product architecture consists of three layers GUI standard generated RTE components Application Core standard generated RTE components Persistence standard generated RTE components Key: reflect possible static knowledge (import) Specific classes may import more general classes
Alexander Roth Lehrstuhl für Goals of Handcoding Software Engineering RWTH Aachen Seite 13 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
Alexander Roth Lehrstuhl für Overview of the Generated Product with HC 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 GUI hand standard generated RTE coded components Application Core hand standard generated RTE coded components Persistence hand standard generated RTE coded components
Alexander Roth Lehrstuhl für Extending the generated Product Software Engineering RWTH Aachen Seite 15 Required steps Product-CD • 1. Add handwritten Java interface XSIG • 2. Add handwritten Java class XEIMP «hc» • 3. Implement new methods in XEIMP «interface» GroupSIG handwritten Java Java interface «gen» «gen» public interface Group extends dex.socnet.GroupSIG { «interface» //... Group } «gen» public abstract class GroupImpl implements dex.socnet.Group { GroupImpl //... } «hc» GroupEIMP
Alexander Roth Lehrstuhl für Conclusion Software Engineering RWTH Aachen Seite 17 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
Recommend
More recommend