1 N Degrees of Separation: Multi-Dimensional Separation of Concern (MDSOC) HyperJ: language and concepts of general concern combination.

Slides:



Advertisements
Similar presentations
Chapter 3: The Enhanced E-R Model
Advertisements

Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
1 Chapter 6: Extending classes and Inheritance. 2 Basics of Inheritance One of the basic objectives of Inheritance is code reuse If you want to extend.
Each design pattern is designed to facilitate one kind of change, i.e. changes in one dimension. However, software evolution can happen in multiple dimensions.
Object-Oriented Metrics. Characteristics of OO ● Localization ● Encapsulation ● Information hiding ● Inheritence ● Object abstraction.
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
ASPECT ORIENTED SOFTWARE DEVELOPMENT Prepared By: Ebru Doğan.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
Theme UML Extending UML to treat aspects Presented by Moran Birenbaum.
1 Objectives To introduces the concept of software Design. To introduce the concept of Object- Oriented Design (OOD). To Define various aspects about object.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
Hyper/J George Fairbanks Objects and Aspects 12 November 2004.
1 Introduction to CS Agenda Syllabus Schedule Lecture: the management of complexity.
© Copyright Eliyahu Brutman Programming Techniques Course.
Software Lifecycle A series of steps through which a software product progresses Lifetimes vary from days to months to years Consists of –people –overall.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
Domain-Specific Software Engineering Alex Adamec.
Software Architecture for DSD The “Uses” Relation.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
C++ Object Oriented 1. Class and Object The main purpose of C++ programming is to add object orientation to the C programming language and classes are.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Aspect Oriented Programming Scott Nykl CSSE 411 Senior Seminar.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
By Xiangzhe Li Thanh Nguyen.  Introduction  Terminology  Architecture  Component  Connector  Configuration  Architectural Style  Architectural.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
Hyper/J and Concern Manipulation Environment. The need for AOSD tools and development environment AOSD requires a variety of tools Life cycle – support.
Aspect Oriented Programming Sumathie Sundaresan CS590 :: Summer 2007 June 30, 2007.
Aspect Oriented Programming Gülşah KARADUMAN.
Next-generation databases Active databases: when a particular event occurs and given conditions are satisfied then some actions are executed. An active.
Generative Programming. Automated Assembly Lines.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
Software Engineering Principles. SE Principles Principles are statements describing desirable properties of the product and process.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
Chapter 8: Aspect Oriented Programming Omar Meqdadi SE 3860 Lecture 8 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
1 Software Design Lecture What’s Design It’s a representation of something that is to be built. i.e. design  implementation.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
Business Rules 12 th Meeting Course Name: Business Intelligence Year: 2009.
Advanced Software Development Karl Lieberherr CSG 260 Fall Semester
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Inheritance and Class Hierarchies Chapter 3. Chapter Objectives  To understand inheritance and how it facilitates code reuse  To understand how Java.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Basic Concepts and Definitions
Object-Oriented Design Concepts University of Sunderland.
1 Chapter 2 Database Environment Pearson Education © 2009.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
© 2004 Pearson Addison-Wesley. All rights reserved January 23, 2006 Creating Objects & String Class ComS 207: Programming I (in Java) Iowa State University,
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
The Emergent Structure of Development Tasks
Logical Database Design and the Rational Model
Chapter 6 - Database Implementation and Use
Object-Oriented Software Engineering Using UML, Patterns, and Java,
Chapter 2 Database Environment Pearson Education © 2009.
Module 8 – Database Design Using the E-R Model
An Introduction to Software Architecture
Chapter 2 Database Environment Pearson Education © 2009.
Presentation transcript:

1 N Degrees of Separation: Multi-Dimensional Separation of Concern (MDSOC) HyperJ: language and concepts of general concern combination

2 Multi-dimensional separation of concerns (MDSOC) Multi dimensions separation of concerns refers to the ability to identify, encapsulate, and manipulate those parts of software that are relevant to a particular concern (concept, goal, purpose, etc.). It helps supporting construction, evolution and integration of software.

3 Types of concerns: The prevalent concern in object-oriented programming is the class, which encapsulates data concerns. Feature concerns, like printing, persistence, and display capabilities, are also common. Aspects, roles, variants, and configurations. Concern means “ a particular area of interest ”

4 Multi-dimensional separation of concerns (cont.) Its goals are to enable: Encapsulation of all types of concerns in a software system, simultaneously. Overlapping and interacting concerns. On-demand remodularization. It compliments existing formalisms, giving developers additional modularization flexibility while continuing to use the formalisms of their choice.

5 Hyper/J Hyper/J supports multi-dimensional separation of concerns for JavaTM. It provides: Ability to specify modules according to concerns. Synthesize systems and components by integrating those modules.

6

7 Personnel Software - Requirements Personnel feature: name Print Business rules: 1-3 managers for each employee The payroll feature: Salary information Tax regulations minimum and maximum wage.

8 Personnel Software – Class hierarchy name() print() check() position() pay() Employee name() print() check() position() pay() Sales name() print() check() position() pay() Research name() print() check() position() pay() Staff name() print() check() position() pay() ResearchMgr name() print() check() position() pay() Secretary name() print() check() position() pay() Maintenance name() print() check() position() pay() SalesMgr

9 The tyranny of the dominant decomposition Existing formalisms provide only restricted sets decomposing and composing mechanisms, and these typically support only a single, “ dominant ” dimension of separation at a time. We would like the system to encapsulate all relevant kinds (dimensions) of concerns simultaneously.  MDSOC.

10 Features are Scattered and Tangled Scattering – a single requirement affects multiple design and code modules. Tangling – material pertaining to multiple requirements is interleaved within a single module. In general: Features are coherent entities from a conceptual and requirement point of view, BUT  Features are not modules in design or code So, I is difficult to: Find and work with the code for a feature Add a new feature Remove a feature Mix-and-match features Non-Invasive In a Non-Invasive way!

11 Hyper/J concepts HyperslicesHypermodulesHyperspaces

12 S etting the context and introducing terminology for Separation of Concerns units It is convenient to think of the descriptive material in each artifact as being made up of units. Primitiveunits Primitive units – e.g. methods of a class, declarations. A unit might also be a state chart or requirement specification – depending upon the artifact. Compoundunitsmodules Compound units or modules – e.g. classes, interfaces. A single concept is typically modeled by a collection of many units (primitive or compound). A single unit often participates in modeling more than one concept.

13 Multi-Dimensional Decomposition: Hyperslices hyperslice A hyperslice is a set of units. Hyperslices are intended to encapsulate concerns in dimensions other than the dominant one. The modules within it contain all, and only, those units that pertain to a given concern. Hyperslices can overlap – a given unit may occur in multiple hyperslices.

14 Hyperslices in the personnel software: position() pay() Employee position() pay() Sales position() pay() Research position() pay() Stuff position() pay() ResearchMgr osition() pay() Secretary position() pay() Maintenance position() pay() SalesMgr Payrollhyperslice name() check() print() Employee name() check() print() Sales name() check() print() Research name() check() print() Stuff name() check() print() ResearchMgr name() check() print() Secretary name() check() print() Maintenance name() check() print() SalesMgr Personnelhyperslice

15 Multi-Dimensional Decomposition: Hypermodules hypermodule Each hypermodule is composed of: hyperslices A set of hyperslices composition rule A composition rule that specifies how the hyperslices are to be integrated.

16 Multi-Dimensional Decomposition: Hyperspaces hyperspace A hyperspace is a concerns space whose structure supports our approach to multi- dimensional separation of concerns. Concerns are grouped into dimensions, giving hyperspaces an explicitly multi-dimensional structure. A dimension of concern is a set of concerns that are disjoint (i.e., they have no units in common).

17 Personnel Software - Hyperspaces Code Class Feature Employee Research Sales Secretary Artifact Payroll Personnel Requirements Design The Hyperspace is a multi dimensional space. The Hyperspace is a multi dimensional space. Axes are dimensions of concern Axes are dimensions of concern Points on axes are concerns Points on axes are concerns Software units fall at points in the space Software units fall at points in the space Encapsulation and composition via Hyperslices and Hypermodules Encapsulation and composition via Hyperslices and Hypermodules

18 Hyperspaces (cont.) A hyperspace can contain many hypermodules realizing different modularizations of the same units. Systems can be composed in many ways from hypermodules. Hypermodules are not, in general, complete, executable programs.

19 Hyperspaces - Advantages comprehensibility The explicit identification of concerns and dimensions, and the alignment of units according to concerns, are significant aids to comprehensibility. traceability Hyperspaces are intended to include artifacts from all phases of the software lifecycle (e.g., requirements, design, code), and the alignment of units promotes traceability. Changes that add functionality Changes that add functionality can always be accomplished by adding new units, and either including them within existing hypermodules or adding new hypermodules. limits the impact of all changes The structure of hypermodules and their composition rules significantly limits the impact of all changes.

20 Using Hyper/J – for personnel software

21 Class Feature Employee Research Sales Secretary Employee Research Sales Secretary Personnel name() check() print() position() pay() EmployeeResearchSalesSecretary Basic Personnel hyperspace name() check() print() position() pay() name() check() print() position() pay() name() check() print() position() pay() hyperspace payrollPlusPersonnel composable class Personnel.*;

22 Different organization – Different requirements No need for payroll information Different business rules Each employee must have exactly one manager.  Mix-and-match the payroll feature.  Modify an existing well-formed constraint

23 On-demand remodularization Hyper/J permits developers to identify and noninvasively encapsulate new concerns at any time Including concerns that are scatterd across, and tangled within existing software.

24 On-demand remodularization The developer needs to identify those pieces of the existing software that are part of the new concern(s) concern mapping And express this information in Hyper/J using a concern mapping: package Personnel: Feature.Personnel operation position: Feature.Payroll operation pay: Feature.Payroll By default, all members of the classes and interfaces in the Java package Personnel belong to the personnel concern in the feature dimension The subsequent statements override this to say: positionpay Any method named position or pay belongs to the payroll concern in the feature dimension (irrespective of its class)

25 Hyper/J creates a hyperslice for each feature (each row) name() check() print() name() Position() pay() Identification of Concerns name() Position() pay() name() Position() pay() name() Position() pay() Class Feature Employee Research Sales Secretary Employee Research Sales Secretary Payroll Personnel name() check() print() name() check() print() name() check() print() EmployeeResearchSalesSecretary Employee ResearchSalesSecretary public float pay() { System.out.println ( “Paying” + name() ); return _salary; }

26 Declarative Completeness name() Position() pay() name() Position() pay() name() Position() pay() Class Feature Employee Research Sales Secretary Employee Research Sales Secretary Payroll Personnel name() check() print() name() check() print() name() check() print() name() check() print() Employee ResearchSalesSecretary name() Position() pay() Employee ResearchSalesSecretary Hyper/J inserts abstract declarations for any members referred to, but not implemented within the hyperslice

27 Composing hyperslices The developer needs to write a hypermodule declaration: hypermodule PayrollPlusPersonnel hyperslice: hyperslice: Payroll, Personnel; relationship relationship: mergeByName; end hypermodule Name the hypermodule List of hyperslices to be composed The relationship section lists all the ways in which the hyperslices are related

28 Class Feature Employee Research Sales Secretary Employee Research Sales Secretary PayrollPlusPersonnel name() check() print() position() pay() EmployeeResearchSalesSecretary name() check() print() position() pay() name() check() print() position() pay() name() check() print() position() pay() Composing hyperslices (cont.) What happened with the method name () ? PayrollPlusPersonnel.Employee

29 Composing – general strategies mergeByName Units in different hyperslices, that have the same name correspond and should be merged. nonCorrespondingMerge Units in different hyperslices accidently have the same name, but are not actually related to one another. This strategy does not work correctly and is disabled! overrideByName The last unit (according to the specification order) should override the others.

30 What about the changes to the business rules? method Personnel.Employee.check : BusinessRule.ThreeManagers dimension Creates a new dimension: BusinessRule ThreeManagersconcern And creates the ThreeManagers concern on that dimension. method SingleManagerPkg.Employee.check: BusinessRule.OneManager OneManagers concern Creates the OneManagers concern on that dimension.

31 Changes for Business Rules Feature None Class Payroll Personnel Business Rule ThreeManagersOneManager Position() pay() Employee name() check() print() Employee check() Employee check() Employee Compose for new one-manager check Compose for original 3 managers check

32 HyperJ - summary With HyperJ, a program can be decomposed according to different concerns. New separate modules can be created, in standard Java, that encapsulate concerns from scratch, without modifying the rest of the program or interfering with the work of other developers. Modules can also be extracted from existing Java programs. Selections of these modules can then be integrated to yield programs that are executable on standard JVMs. Multiple system decompositions can be created simultaneously and new decompositions added at any stage of the software development lifecycle. HyperJ helps in managing the interactions across different decompositions. HyperJ also provides a powerful composition capability, which can be used to combine separated concerns selectively into an integrated program or component.

33 Hyper/J vs. Aspect/J tool  Hyper/J is a tool language  Aspect/J is a language  Hyper/J supports integration of multiple models  Aspect/J supports augmentation of single model  Hyper/J – composing and decomposing can be done at any time.  Aspect/J – incremental changes only