Component Oriented Programming 1 Chapter 2 Theory of Components.

Slides:



Advertisements
Similar presentations
.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
Advertisements

Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
CIT731: Database Development Object Oriented Modeling (OOM)
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 04. Other.
COMPONENT DIAGRAM in UML 2.0 Veronica Carrega
Unified Modeling Language
Basic Concepts in Component-Based Software Engineering
Object-Oriented Analysis and Design
C OMPONENT & D EPLOYMENT D IAGRAMS Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn.
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
CBSD – Component Based Software Development - Introduction -
Unified Modeling (Part I) Overview of UML & Modeling
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Data and Process Modeling
HAS. Patterns The use of patterns is essentially the reuse of well established good ideas. A pattern is a named well understood good solution to a common.
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen - Bolzano Lesson 2 – Components.
Page 1 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Chapter 4 Component Models and Technology.
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
Introducing JavaBeans Identify the features of a JavaBean Create and add a bean to an application Manipulate bean properties using accessor and mutator.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Object Oriented Software Development
The Design Discipline.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 19 Slide 1 Component-based software engineering 1.
Chapter 10 Introduction to Components. Process Phases Discussed in This Chapter Requirements Analysis Design Implementation ArchitectureFramework Detailed.
An Introduction to Software Architecture
Software Models (Cont.) 9/22/2015ICS 413 – Software Engineering1 -Component-based software engineering -Formal Development Model.
Introduction to MDA (Model Driven Architecture) CYT.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part V: Design The Design Workflow Design Classes Refining Analysis Relationships.
Hyper/J and Concern Manipulation Environment. The need for AOSD tools and development environment AOSD requires a variety of tools Life cycle – support.
Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.
Object-Oriented Modeling Chapter 10 CSCI CSCI 1302 – Object-Oriented Modeling2 Outline The Software Development Process Discovering Relationships.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
Systems Analysis and Design in a Changing World, 3rd Edition
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
SWE 316: Software Design and Architecture Objectives Lecture # 18 Introduction to Components SWE 316: Software Design and Architecture To learn:  benefits.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Technology Layer. Technology Layer Metamodel Technology Layer Concepts.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 27 JavaBeans and.
Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.
COMPONENT DIAGRAM in UML 2.0 Veronica Carrega. PLAN OF TALK  Introduction about components  Components and component diagrams in uml 2.0  Case study.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 32. Review Behavioral Patterns – Observer Pattern – Chain of command.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 32 JavaBeans and Bean.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 15. Review Interaction-Oriented Software Architectures – MVC.
Object-Oriented Design Concepts University of Sunderland.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
Basic Concepts of Software Architecture. What is Software Architecture? Definition: – A software system’s architecture is the set of principal design.
UML (Unified Modeling Language)
Design Patterns: MORE Examples
Course Outcomes of Object Oriented Modeling Design (17630,C604)
COMPONENT & DEPLOYMENT DIAGRAMS
Object-Oriented Analysis and Design
Introduction to Advanced Java Programming
Unified Modeling Language
Distribution and components
The Object-Oriented Thought Process Chapter 08
UML Class Diagrams: Basic Concepts
Hands-on Introduction to Visual Basic .NET
Analysis models and design models
An Introduction to Software Architecture
Chapter 17 - Component-based software engineering
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
Modeling Tangible User Interfaces
Software Development Process Using UML Recap
Presentation transcript:

Component Oriented Programming 1 Chapter 2 Theory of Components

Component Oriented Programming 2 Major Topics Discuss principles of COP and its major features Investigate the infrastructures of COP technologies Provide a framework to unify various component technologies Formal definitions of software components Formal definitions of connections for component assembling Formal definitions of component deployment

Component Oriented Programming 3 Principles Components represent decomposition and abstraction. Reusability should be achieved at various levels. CBSD increases the software dependability. DBSD could increase the software productivity. CBSD promotes software standardization.

Component Oriented Programming 4 Philosophy Software components are associated with their component infrastructure. Different component technologies have different component infrastructures, and thus have different component definitions.

Component Oriented Programming 5 Infrastructure The basic, underlying framework or features of a system or organization The fundamental facilities serving a country, a city, or area, as transportation and communication systems. What is a component infrastructure?

Component Oriented Programming 6 Component infrastructure (1) Component definition revisit – reusable, self-contained, independently deployable software units. Component Infrastructure: The underlying foundation or basic framework to construct, assemble, and deploy components. Components do not exist without infrastructure.

Component Oriented Programming 7 Component Infrastructure (2) CI = (Comp, Conn, Depl) Comp = component model –What is a component in the CI? Conn = connection model –How to generate a new component via the existing ones? Depl = deployment model –How to put components into applications?

Component Oriented Programming 8 Formal Definition A component C is a quadruple C = (P, M, E, I) Where –P = { p : T | p is an identifier, T is a type } –M = { (v, a, t, i (p)) | v € visibility, a € access, t € type, i € identifier, p € parameter } –E = { e : T | e is an event, T is a type } –I 2 P × 2 M × 2 E

Component Oriented Programming 9 A Component Chart

Component Oriented Programming 10 Why do we need Interface? C = (P, M, E, I) (P, M, E) part answers the question: What does this component do? The interface part “I” answers the question: How can it be used? Interface is a subset of 2 P ×2 M ×2 E Interface can be modified by operations

Component Oriented Programming 11 Compositions There are three kinds of compositions among device beans: 1.Add (+): two device beans are added together without direct interactions. 2.Multiply (*): Hook up an event from a source component to a method in a target component. 3.Modifications of the interface (p+, p-, m+, m-, e+, and e-)

Component Oriented Programming 12 Addition (+) C1 = (P1, M1, E1, I1), C1 = (P2, M2, E2, I2) P M E1 P M E2 C1 + C2

Component Oriented Programming 13 Multiplication (*) C1 = (P1, M1, E1, I1), C1 = (P2, M2, E2, I2) P M E1 P M E2 C1 * C2

Component Oriented Programming 14 Modification C1 = (P1, M1, E1, I1), p - (C1) = (P2, M2, E2, I2) P M E1 P M E2 P - (C1)

Component Oriented Programming 15 Example Start Stop B1 * (start)A + B2 * (stop)A

Component Oriented Programming 16 Formal Semantics Each device bean is represented by a component chart, which is an extension of statechart, and is similar to objectchart (Coleman et. al.) The behavior of a device bean in component communication is described by the traces of its component chart. The system behavior can be described in terms of component traces

Component Oriented Programming 17 Specifying Contracts For each method in an interface of a device bean, a contract is specified using the following: –Precondition – a definition of the situations under which the postcondition will apply –Postcondition – a description of the effects of that method on its parameters and the information model

Component Oriented Programming 18 Example: The Air Conditioning System

Component Oriented Programming 19

Component Oriented Programming 20

Component Oriented Programming 21 Definition of embedded components What is a component in embedded systems, informally? What is a component in embedded systems, formally? For embedded systems, we define embedded components as device beans explained below.

Component Oriented Programming 22 Device Drivers

Component Oriented Programming 23 Device beans are basic components A typical embedded system can be defined as a collection of devices reading, processing, and controlling physical plant and quantities. Example: In an intruder alarm system, motion sensors are devices installed near windows and doors to detect the presence of an intruder. The alarm is a device to generate audible signal. The microprocessor is also a device to collect signals from sensors and to trigger the alarm under certain conditions.

Component Oriented Programming 24 Device beans are reusable Especially in a product line, one device is reused in several similar products. A sensor controller, for instance, can be reused in a fire alarm system, an intruder alarm system, or a home security system. A timer device, being hardware or software, can be reused in all those embedded systems requiring time service.

Component Oriented Programming 25 Device beans are building blocks Embedded systems are usually cost sensitive and require short-time to market. Reusable building blocks offer pre-built, thoroughly tested, and ready-to-use components for constructing a new embedded system, thus reducing cost and time.

Component Oriented Programming 26 Device beans are executable The object form of device beans are executable. We can implement device beans with any programming in principle. However, it will be natural to use Java or JavaBeans technology, thus the object forms of device beans are binary components (Java bytecode). Rapid prototyping is possible since they could be integrated at design time and executed at run time.

Component Oriented Programming 27 Device beans support visual design Visual design provides a convenient and intuitive method to construct a system. Since each device bean is implemented in Java, all the visual design tools for Java could be used to design embedded systems. To name just a few of them: JBuilder, Visual Café, Visual Age, Forte for Java, etc. We are building our own IDE to support embedded system design and prototyping.

Component Oriented Programming 28 Device Beans (informal) Name: An identifier presenting the device bean. Property: Properties encapsulate states or attributes of a device bean. Each property has a type. Method: Methods describe behavior and services of a device bean. Each method has a signature : v isibility access return- type Method-name (parameter-list) Event: Events describe actions this device bean can initiate. Each event has a type.

Component Oriented Programming 29 Graphical Representation P M E Property Interface Method Interface Event Interface

Component Oriented Programming 30 Major differences between device beans and Java beans There is a formal definition for device beans specification with formal syntax and formal semantics, while there is no formal definition for Java beans specification yet. DBSL (Device Bean Specification Language) defines connectors as operators in component algebra, while Java beans do not have formal connectors defined. The component algebra provides several laws for component connections and semantics for each connector, while Java beans do not have formal laws to govern their design-time behavior or run-time behavior. After composing two Java beans we got a JAR file which is no longer a component anymore. In device beans, however, two device beans are composed with composition laws and the result is also a component. This makes incremental development with component-based approach possible.

Component Oriented Programming 31 Examples A Button device bean An animation device bean A sensor device bean A processor device bean

Component Oriented Programming 32 Summary A software component is a piece of self- contained code with well-defined functionality and can be reused as a unit in various contexts. A component infrastructure is the basic, underlying framework and facilities for component construction and component management. A component infrastructure consists of three models: a component model, a connection model, and a deployment model. Device beans are reusable software components for embedded systems.