Ontologies Reasoning Components Agents Simulations Introduction to Software Reuse Jacques Robin.

Slides:



Advertisements
Similar presentations
Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Advertisements

Building Bug-Free O-O Software: An Introduction to Design By Contract A presentation about Design By Contract and the Eiffel software development tool.
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Software Reuse SEII-Lecture 28
Ontologies Reasoning Components Agents Simulations Software Components and the KobrA Model-Driven Component-Based Software Engineering Methodoloy Jacques.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
Page 1 Building Reliable Component-based Systems Chapter 7 - Role-Based Component Engineering Chapter 7 Role-Based Component Engineering.
Introduction To System Analysis and Design
Software Factory Assembling Applications with Models, Patterns, Frameworks and Tools Anna Liu Senior Architect Advisor Microsoft Australia.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Introduction to Software Reuse
Creating Architectural Descriptions. Outline Standardizing architectural descriptions: The IEEE has published, “Recommended Practice for Architectural.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
CS 290C: Formal Models for Web Software Lecture 6: Model Driven Development for Web Software with WebML Instructor: Tevfik Bultan.
Reuse Activities Selecting Design Patterns and Components
Course Instructor: Aisha Azeem
Introduction to Software Testing
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Software Product Line Architectures (SPLA) Nipun Shah
Software Architecture premaster course 1.  Israa Mosatafa Islam  Neveen Adel Mohamed  Omnia Ibrahim Ahmed  Dr Hany Ammar 2.
UML and Object Oriented Concepts
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
Introduction To System Analysis and design
MDA Guide Version CYT. 2 Outline OMG Vision and Process Introduction to MDA How is MDA Used? MDA Transformations Other MDA Capabilities Using the.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14Slide 1 Design with Reuse l Building software from reusable components.
Chapter 2 The process Process, Methods, and Tools
Faculty of Informatics and Information Technologies Slovak University of Technology Peter Kajsa and Ľubomír Majtás Design.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
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.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 A Discipline of Software Design.
An Introduction to Software Architecture
Ceg860 (Prasad)L6MR1 Modularity Extendibility Reusability.
Software Component Technology and Component Tracing CSC532 Presentation Developed & Presented by Feifei Xu.
Introduction to MDA (Model Driven Architecture) CYT.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Introduction To System Analysis and Design
CSC 395 – Software Engineering Lecture 12: Reusability –or– Programming was Bjarne Again.
Basic Concepts Software Architecture. What is Software Architecture? Definition: – A software architecture is the set of principal design decisions about.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
Generative Programming. Automated Assembly Lines.
Software Development. Software Developers Refresher A person or organization that designs software and writes the programs. Software development is the.
Systems Analysis and Design in a Changing World, 3rd Edition
Chapter 10 Analysis and Design Discipline. 2 Purpose The purpose is to translate the requirements into a specification that describes how to implement.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
Grid programming with components: an advanced COMPonent platform for an effective invisible grid © 2006 GridCOMP Grids Programming with components. An.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Object-Oriented Programming © 2013 Goodrich, Tamassia, Goldwasser1Object-Oriented Programming.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Winter 2011SEG Chapter 11 Chapter 1 (Part 1) Review from previous courses Subject 1: The Software Development Process.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Chapter 11 Object-Oriented Design
Distribution and components
An Introduction to Software Architecture
Software Components Jacques Robin.
Presentation transcript:

Ontologies Reasoning Components Agents Simulations Introduction to Software Reuse Jacques Robin

Outline  What is software reuse?  Where do we stand?  What to reuse?  Issues, dimension and tasks in reuse  Reuse inhibitors  Reuse organizations, metrics and economics  Reuse techniques  Age-old  Objects  Patterns  Frameworks  Components  Domain and product line engineering  Meta-programming and generator  Model-driven architecture  Aspects  Technique synergy and integration

What is software reuse?  Act: reuse of previously built software artifact/asset to fulfill need in new development task or sub-task  Field: study of methodologies, practices, processes, techniques, languages, frameworks, CASE tools that foster and facilitate reuse  Motivation:  Avoiding wasting time and money redoing same task over and over  Quality standard of previously completed task carries over to new occurrences of same need

Where do we stand?  Reuse is a general common-sense principle, pervasively applied in all human activities  In software engineering: still rare and far from systematic practice  High potential for software reuse remains untapped  Lanergan and Grasso 84: 60% of business applications can be standardized and reused  Gruman 88, McClure 92: range of achievable reuse rates [15%-85%]  Even though:  Old idea proposed in software engineering in 1968  Main focus of recent software engineering research  Consensus that reuse is THE key to most future productivity gains since time to market, development cost and software quality are the main parameters to trade-off during a development project

What to reuse?  A software asset:  Any artifact resulting from one stage in a development task  Any mapping from the artifact produced by one development stage to the artifact produced by the next  Assets can be at any level of abstraction and software process stage:  Domain/business analysis/model  Application requirements  Application architectures and generic architecture patterns  Application design/model and generic design patterns  Source code  Libraries, modules, packages  Classes, templates, idioms  Objects, functions, subroutines, data  Executable code: executable components, bytecode, binary code  Documentation and meta-data  Test suites and test generators  Any information, formalism or tool used during development can also be subject to reuse  Languages, CASE tools, IDE, processes

Requirements of reusable software artifacts  Common to special-purpose artifacts:  Usable: user-friendly  Reliable: conform to functional and non-functional requirements  Additional for reuse:  Pervasively useful:  Fulfills a need that recurs across projects, domains, applications, concerns or platforms  Adaptable:  Modular: useful by separable parts  Generic: useful as a whole in many different context  Understandable: documented,  Portable: platform independent

Reuse issues and dimensions  Asset composition vs. asset mapping with meta-assets (generative)  ex. composing existing DLL vs. generating DLL from precise UML model  Transformations can be use for both  Asset abstraction level  Asset executability level:  ex, model, source code, bytecode, binary code  Asset granularity level  ex. package, class, method  Asset process stage  Asset visibility  Black-box, i.e. reuse “as is” based on specification vs.  White-box, i.e. reuse with modifications based on realization/implementation  Asset built with reuse x asset built for reuse  Asset reuse scope:  Across domains, across applications, within same application

Reuse sub-tasks  Define boundaries of reusable assets (knowledge units with reuse potential)  Organize and structure reusable assets together with descriptive and operational meta-data in searchable, persistent repositories  Retrieve reusable assets  Assemble/integrate reusable assets  Adapt/modify reusable assets

Technical reuse inhibitors  Current lack of:  Available reuse-oriented CASE tool  Model-level component libraries ready to reuse across platforms  Immaturity of:  Comprehensive methodologies integrating multiple reuse techniques  KobrA 2002 integrates MDA, full-life cycle components with built-in contract testing, product lines, aspects, patterns, object-orientation, top-down recursive development  Only applied to a few real-world development projects  Standard languages to support model-level reuse:  UML2, OCL2, MOF2, XMI  QVT for model-level mapping-based reuse 2005  Distributed architecture for third-party component publication, search and access  Web services 2003

Non-technical inhibitors  Economical:  Cut-throat competition of software industry, especially start-up survival  Leads to obsession with time-to-market of next product or product release  Reuse ROI only long-term and almost impossible to precisely or objectively estimate  Lack of business models for providers of components, non-code artifacts, non- code abstract artifact mappings and generators  Organizational and managerial:  Effective leveraging of reuse requires costly software house organization re- engineering, changing team structures, roles, incentives, productivity measures,  Educational and human resource:  Design for reuse and design from existing assets (as opposed to from scratch) heavily under-taught  Developers with reuse skills hard to find  Psychological:  “Not invented here” syndrome  Hacker mentality: code worship, autistic character structure  Resistance to change habits

Reuse-oriented software house organizations Application Development Team Reusable Asset Management Team Reusable Asset Base Application Assemble Submit potentially reusable assets Develop for reuse Refactor for reuse Project Team Experience Factory Application Application requirements Design specification Reusable Asset Base Code Components Component assembly Integration testing Basili et al. 92 Five years experiment at Software Engineering Laboratory (U. Maryland, NASA, Computer Science Corp.) with new structure Reuse rates increased from 26% to 96% Cost dropped 58% Bug rates dropped 400%?

Reuse metrics  Overcoming non-technical reuse inhibitors, especially economic ones, requires estimating the cost-benefit of: 1. Reuse an available asset in an application development project 2. Pro-actively develop reusable assets for current and future projects 3. Launch an organization-wide systematic reuse program  Pitfalls of the line of code metric:  Manually designed for reuse assets and automatically generated assets larger than manually design for one-shot use assets with equivalent functionalities for the application at hand  Versatile, multiple functionality components underused in any given application

Reuse economics  Reusability overhead:  Estimated between 50% and 100%, 60% of which at the design stage (Margono & Rhoads 92, Poulin & Caruso 93)  Black-box building block reuse:  Cost-effective, but limited potential until reuse program has matured (deadlocks reuse)  White-box building block reuse:  Boehm 94 estimates that modifying 20% of code costs 90% of development from scratch  Adaptation costlier across application domains and for third-party components (inhibits component markets)  Building block granularity trade-off:  The larger the component, the more is saved each time it is reused  The smaller the component, the more often it can be reused  Suggests recursive sub-component structure  Meta-level reuse:  Development cost of asset generators rises sharply as their requirements approach full automation

The first reuse techniques  Subroutines and functions:  Source code level reuse  Specific to given platform  Finest grain  Within given application  Modules, libraries and packages:  Source code level reuse  Specific to given platform  Larger grained  Across applications

Object-orientation: reuse strengths  Pervades all life-cycle, abstraction and executability levels  Associated with detailed engineering processes and methods  Classes bundle a structural and a behavioral template that is reused each time an object of the class is created  OO platforms usually come with vast libraries of built-in classes  Inheritance provides structural and behavioral model and code reuse through specialization  Abstract class and interfaces provide structural and service specification reuse through variable realization/implementation  Private attributes accessible only through public access methods provide encapsulation, making classes and objects reusable units  Overloading, polymorphism and dynamic binding provide client reuse across diverse realizations of servers sharing a common specification  Entity-centered modeling at gradual abstraction levels and associated standard visual notation (UML) greatly facilitates OO model and code comprehension for white-box reuse

Object-orientation: reuse weaknesses  Public attributes break encapsulation along associations, hindering model and code element locality and thus ease of reuse  Protected attributes and methods break encapsulation down the class hierarchy,  Even private attribute and methods inheritance breaks encapsulation up the class hierarchy  Attribute value and method realization overriding down the class hierarchy breaks interface semantics inheritance and thus encapsulation  Classes too fine grained reuse units  Packages more adequate and more variable grained reuse units but lack most reuse-fostering features of classes

Patterns  Modeling patterns:  Artifact view: abstract analysis/design template which instances recur across domains and applications  Mapping view: pair associating a set of requirements (generic design problem) to a analysis/design template known to satisfy it (generic design solution)  Capture know how of experienced analysts  Two granularity levels: architectural, design  Two complementary aspects: structural/static and behavioral/dynamic  Architectural patterns:  Template for decomposition of system into modules/components with names and roles together with their data flows, structural and behavioral relationships  Coarse-grained modeling patterns  Specified in special-purpose architectural languages or in UML  Design patterns (generally object-oriented):  Template for associated classes that together provide a given generic service  Finer grained modeling patterns  Programming patterns (idioms, styles):  Conventional, restricted use of programming language constructs to realize design pattern

Object-oriented frameworks  In contrast to patterns, frameworks are specific to a given domain, but independents of any particular application requirements  Two main elements:  Set of interrelated interfaces and abstract classes that represent a predefined software architecture skeleton  Set of interrelated concrete classes that provide as built-in the conceptual entities of the domain and the common services shared by most applications in the domain  Building an application with a framework consists of:  Reusing the concrete classes by calling their methods  Reusing the concrete classes by specializing them, with or without overriding  Reusing the abstract classes and interfaces by realizing them  All three guided by the application’s requirements  Reuse occurs massively at the domain engineering and design stages (almost entirely avoided) and partially at the implementation stage  Sometimes comes associated with:  A domain-specific development process/method  A domain-specific CASE tool or IDE

Components  What is a component?  No standard, universally accepted definition  In essence, any software unit that:  Is “independently” deployable  (albeit) reuses/requires a set of typed and constrained operations (typically provided by other components that its uses at servers)  To provide a set of typed and constrained operations  Executable by either:  Humans through a user interface (stand-alone deployment)  Other software through an calling interface (for which it then acts as a server)  Encapsulates:  Meta-data allowing the deployment platform or development environment to automatically assemble it with other components to provide complex services  Several related classes, routines, or functions

Components vs. objects Component:  Independently deployable  Possesses user-interface for stand-alone deployment  Not necessarily object-oriented  Mid-size grained unit intermediate between objects and systems  At run time subject to service invocation  At deployment time subject to composition/assembly Object:  But be wrapped inside a program to be executed  Only subject to method invocation

Component diversity  Component class vs. component instance  Component instance: run-time entity  Component class: subject to specialization, instantiation and inheritance  Distinction relevant mostly for components within OO paradigm  Deployment-only components:  UML 1, Java Beans,.Net DLL, Web Services  Packaging and assembly mechanisms for abstract services implemented by classes and objects  Full-life cycle components:  UML 2, KobrA  Encapsulates requirements, model, code, test suites  With composition/assembly meta-data at each stage/abstraction level  With traceability meta-data between each stage/abstraction level

Component-based architectures  Architectural and design patterns using components instead of objects as basic building blocks  Arbitrary assembly based on various relations between components:  At run-time between component instances  Composition  Clientship  At design-time between component types  Ownership/Nesting  Access  Specialization/Generalization

Domain engineering  The product portfolio of most software house can be structured in families/lines  All family members in same given domain, share common core conceptual entities and functionalities  Domain engineering: leverage distinction between common core and variable parts in a product family to foster reuse in the development process  Hardest issue: scoping domain  Too large, excessive overhead, not cost-effective  Too small, reuse potential poorly exploited

Product lines  Uses past, present and planned future products in a given domain (product line) to delimit domain engineering  Domain restricted to common core of product line

Meta-programming and generative development  Raises asset abstraction:  From artifact at given development stage s  to meta-artifact defining mapping/transformation/generation  from artifact template at stage s to artifact template at stage s+1  Mapping often specified declaratively and executed by generator tool

Assembly reuse vs. generative reuse  Assembly reuse generator tool reusable mapping meta-artifact Development Stage a new artifact a1 reusable artifact a3 reusable artifact a2 source artifact template target artifact template Development Stage b new artifact b1 reusable artifact b3 new artifact b2 manual assembly manual specification  Generative reuse artifact stage a artifact stage b matches input output manual specification manually specified or generated from previous stage

Model-Driven Architecture Abstraction Scale Executability Scale UML + NL Application Requirements UML Model Source Code Virtual Machine Code Binary Code Current Standard Practice: Object-Oriented Development

Model-Driven Architecture Abstraction Scale Executability Scale Virtual Machine Code Binary Code UML/OCL Business CIM UML/OCL Application Specification PIM UML/OCL Application Realization PIM Profiled UML/OCL Application Realization PSM Source Code Today’s MDD: Extreme Modeling

Model-Driven Architecture Abstraction Scale Executability Scale Virtual Machine Code Binary Code UML/OCL Business CIM UML/OCL Application Specification PIM Source Code Profiled UML/OCL Application Realization PSM UML/OCL Application Realization PIM Model Translation Patterns Model Refinement Patterns Tomorrow’s MDD: UML Programming

Separation of concern  Object-oriented design structures models and code solely based on the entity classes of the application and their relationships  This results into an non-isomorphic mapping between:  The N concerns of the software being developed, i.e., its functional and non-functional requirements and the functionalities/behaviors realizing them in the model and code  The M entity classes of the model and code  This makes adding or changing a single concern extremely costly for it requires:  Inspecting the entire OO model/code  Coherently modifying the many different classes in which it is scattered  It also prevents exploiting the high concern reuse potential:  Most concerns are conceptually orthogonal to one another and to the entity class structure of the application domain  Yet they end-up entangled together in its model and code

Aspect-Oriented Programming  Practice of:  Encapsulating orthogonal concerns in different aspects, to cleanly separate them from the core program and from one another  Link each aspect with the core program (that captures the dominant decomposition) through point-cuts  Automatically generate the complete source code by using AOP tools that weave together the aspects with the core program at the indicated point-cuts Error Handling Aspect Debugging Aspect Persistence Aspect Distribution Aspect Core Domain Functionalities Security Aspect Weaving tool Complete Application Code

Aspect-Oriented Development  Generalize aspect-oriented approach throughout the entire life- cycle at all level of abstraction and development stage  Aspects such as persistence, distribution, security, logging/tracing are largely orthogonal to the domain and functional requirement of any particular applications  Once modeled and implemented separately as aspects they can be reused  Even various ontological features of an application domain display a large extent of orthogonality than can be exploited using AOD:  ex, recurrent e-commerce functionalities such as item browsing, item search, general promotions, personalized recommendations, payment, authentication, gifts, shopping cart management, delivery method and tracking, customer complaints

Integration of reuse techniques  Most reuse techniques are complementary and can be combined in synergy  MDA/AOD synergy:  At the various MDA model levels (CIM, PIM, PSM)  Modeling aspect weaving can be implemented by generic model transformation  Separation between platform independent and platform dependent aspects further foster reuse  PLE/AOD synergy:  Many PLE variations correspond to inclusion/exclusion of different aspects  Recent reuse-oriented software engineering methods combined most of them:  ex, KobrA  Combines objects, patterns, frameworks, components, product lines, MDA.

Exercise Reuse Dimensions Reuse Techniques w/ Reuse 4 Reuse Assembly / Mapping VisibilityProcess Stage AbstractionExecutabilityGranularityScope Subroutines Objects Patterns Frameworks Components Domain Eng. Product Lines Generators MDA Aspects