SWE 316: Software Design and Architecture Objectives Lecture # 18 Introduction to Components SWE 316: Software Design and Architecture To learn:  benefits.

Slides:



Advertisements
Similar presentations
1 CIS224 Software Projects: Software Engineering and Research Methods Lecture 9 Object, Package, Component and Deployment Diagrams (Based on Fowler, 2004,
Advertisements

Component Oriented Programming 1 Chapter 2 Theory of Components.
Software Reuse SEII-Lecture 28
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Modeling Notations.
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
Java Programming, 3e Concepts and Techniques Chapter 5 Arrays, Loops, and Layout Managers Using External Classes.
Objects and Classes First Programming Concepts. 14/10/2004Lecture 1a: Introduction 2 Fundamental Concepts object class method parameter data type.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 19 Slide 1 Component-based software engineering.
- 1 - Component Based Development R&D SDM Theo Schouten.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Component and Deployment Diagrams
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.
ACM/JETT Workshop - August 4-5, 2005 UML Modeling using MagicDraw UML for Java Programmers.
Introducing JavaBeans Lesson 2A / Slide 1 of 30 JDBC and JavaBeans Pre-assessment Questions 1.Which of the given symbols is used as a placeholder for PreparedStatement.
Introducing JavaBeans Identify the features of a JavaBean Create and add a bean to an application Manipulate bean properties using accessor and mutator.
 1. Introduction  2. Development Life-Cycle  3. Current Component Technologies  4. Component Quality Assurance  5. Advantages and Disadvantages.
Ranga Rodrigo. Class is central to object oriented programming.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Programming Languages and Paradigms Object-Oriented Programming.
©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.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
An Introduction to Software Architecture
Software Models (Cont.) 9/22/2015ICS 413 – Software Engineering1 -Component-based software engineering -Formal Development Model.
©Ian Sommerville 2000 Software Engineering, 6th edition. Slide 1 Component-based development l Building software from reusable components l Objectives.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 7 Requirements and Domain Classes SWE 316: Software Design and Architecture.
SWE 316: Software Design and Architecture Objectives Lecture # 19 Java Beans SWE 316: Software Design and Architecture  Understand  what JavaBeans (“Beans”)
Component-based software architecture Overview Divides the problem into sub-problems each associated with component partitions. The interfaces of the components.
CIS 644 Aug. 25, 1999 tour of Java. First … about the media lectures… we are experimenting with the media format please give feedback.
Your First Java Application Chapter 2. 2 Program Concepts Modern object-oriented programs help us build models to manage the complexity found in a problem.
Modelling Class T16: Conceptual Modelling – Architecture Image from
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Java Programming: Advanced Topics 1 JavaBeans Chapter 8.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 19 Slide 1 Component-based software engineering.
Java Bean Definition “A Java Bean is a reusable software component that can be manipulated visually in a builder tool.”
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
Component Oriented Programming 1 Introduction to COP.
Object Oriented Software Development
Part VII: Design Continuous
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
1 OO Analysis & Design - Introduction to main ideas in OO Analysis & design - Practical experience in applying ideas.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 32. Review Behavioral Patterns – Observer Pattern – Chain of command.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 15. Review Interaction-Oriented Software Architectures – MVC.
Java Programming: Advanced Topics1 Introduction to Advanced Java Programming Chapter 1.
Identifying classes, Packages and drawing class Diagrams, Object Diagrams and composite structure diagrams Week 07 1.
Lecture 21: Component-Based Software Engineering
©Ian Sommerville 2006MSc module: Advanced Software Engineering Slide 1 Component-based software engineering.
Chapter 7 Classes and Methods III: Static Methods and Variables Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition)
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
UML Diagrams By Daniel Damaris Novarianto S..
Introduction to Advanced Java Programming
UML Diagrams Jung Woo.
Creating and Using Classes
Component--based development
More Model Elements.
An Introduction to Software Architecture
Chapter 7 –Implementation Issues
Introduction to Classes and Objects
Presentation transcript:

SWE 316: Software Design and Architecture Objectives Lecture # 18 Introduction to Components SWE 316: Software Design and Architecture To learn:  benefits of components  what components consist of  how they are developed and combined with each other and with applications  how components can be executed Ch 10 Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

SWE 316: Software Design and Architecture Process Phases Discussed in This Chapter Requirements Analysis Design Implementation ArchitectureFramework Detailed Design x Key:= secondary emphasis x = main emphasis We want to re-use collections of software. KEY CONCEPT Design Goal At: Reusability IntroductionExampleComponent PartsUML Notation 2/26

SWE 316: Software Design and Architecture Component-based software engineering *  Component-based software engineering (CBSE) is an approach to software development that relies on software reuse.  It emerged from the failure of object-oriented development to support effective reuse. Single object classes are too detailed and specific.  Components are more abstract than object classes and can be considered to be stand-alone service providers. * Software Engineering - Sommerville Introduction ExampleComponent PartsUML Notation 3/26

SWE 316: Software Design and Architecture Without components With components: Parts replaceable without significant rebuilding This affected by window change etc. Building With and Without Components Introduction ExampleComponent PartsUML Notation 4/26

SWE 316: Software Design and Architecture What is a Component?  -- a software collection used without alteration.  The Object Management Group  “A physical, replaceable part of a system that packages implementation and provides the realization of a set of interfaces. A component represent a physical piece of a system’s implementation, including software code (source, binary or executable) or equivalents, such as scripts or command files” Introduction ExampleComponent PartsUML Notation 5/26

SWE 316: Software Design and Architecture Components Can Be Made of …  … Source code  Classes -- one or more, possibly related  … Executable code  Object code  Virtual object code  … Other files  Images, text, indices, etc. Introduction ExampleComponent PartsUML Notation 6/26

SWE 316: Software Design and Architecture Components and objects *  Components are deployable entities.  Components do not define types.  Component implementations are opaque.  Components are language-independent.  Components are standardised. * Software Engineering - Sommerville Introduction ExampleComponent PartsUML Notation 7/26

SWE 316: Software Design and Architecture Component models  A component model is a definition of standards for component implementation, documentation and deployment.  Examples of component models  EJB model (Enterprise Java Beans)  COM+ model (.NET model)  Corba Component Model  The component model specifies how interfaces should be defined and the elements that should be included in an interface definition. Introduction ExampleComponent PartsUML Notation 8/26

SWE 316: Software Design and Architecture The Controlled Juggler Application Introduction Example Component PartsUML Notation 9/26

SWE 316: Software Design and Architecture BeanBox Environment Introduction Example Component PartsUML Notation 10/26

SWE 316: Software Design and Architecture Selecting Juggler Introduction Example Component PartsUML Notation 11/26

SWE 316: Software Design and Architecture Observations on Juggler Source Code 1  Juggler is a class – actually an Applet, so it implements the Serializable interface  We do not alter (the code for) Juggler  BeanBox recognizes that Juggler is a Component, and displays an image of an instance.  Juggler listens for several kinds of events Introduction Example Component PartsUML Notation 12/26

SWE 316: Software Design and Architecture Observations on Juggler Source Code 2  BeanBox recognizes that Juggler implements the Runnable interface, and automatically executes its run()  Juggler operates by displaying images from the array images of type Image[]. The key lines in run() are Image img = images[ ( loop % 4 ) + 1 ]; … g.drawImage( img, 0, 0, this ); Introduction Example Component PartsUML Notation 13/26

SWE 316: Software Design and Architecture Observations on Juggler Source Code 2  rate is a private variable: A public method is available to set it as follows. public void setAnimationRate( int x ) { rate = x; } BeanBox recognizes animationRate as an int property, and allows it to be set. Introduction Example Component PartsUML Notation 14/26

SWE 316: Software Design and Architecture Observations on Juggler Source Code 2  Juggler code distinguishes the behavior of the bean between “design time,” “run time” etc. For example /* * If switching to runtime, … * If switching to design time and debugging is true, …. */ public void setDesignTime( boolean dmode ) ….. We want to construct and re-use a Juggler instance connected to Start / Stop buttons. KEY CONCEPT Design Goal At: Reusability Introduction Example Component PartsUML Notation 15/26

SWE 316: Software Design and Architecture Adding behavior Causing ExplicitButton Press to call stopJuggling() on Juggler We want the functionality and event sensitivity of a Bean to be available in any context. KEY CONCEPT Design Goal At: Reusability Introduction Example Component PartsUML Notation 16/26

SWE 316: Software Design and Architecture The Parts of a Component  Properties  Methods  in the form of methods, published in interfaces  Reactions to Events  Ability to provide information about themselves  Set of classes providing interfaces  Manifest See below 10.3 Referred as PME model Properties/Methods/Events IntroductionExample Component Parts UML Notation 17/26

SWE 316: Software Design and Architecture Manifests  Identification of the component  Authorship of the component  List of files or classes making up this component  Other components on which this one relies  Encryption information  Means of verifying that all parts of the component are present  Version number properties, functionality, sensitivity to events, a manifest listing its files, and an interface providing a self-description. KEY CONCEPT The Aspects of a Component IntroductionExample Component Parts UML Notation 18/26

SWE 316: Software Design and Architecture Introspection Class Name, superclass, super-interfaces, inner classes, fields, constructors, Mmethods FieldName, type ConstructorParameters, exceptions MethodName, parameters, return type, exceptions Runtime Java Information Includes IntroductionExample Component Parts UML Notation 19/26

SWE 316: Software Design and Architecture components interfaces supported UML Notation for Components 10.4 IntroductionExampleComponent Parts UML Notation 20/26

SWE 316: Software Design and Architecture Assembly Time* Deployment Time Execution Time x x Design / Implementation Time Instance Creation Time* instance application executable Collection of classes; manifest * Performed in a development environment e.g., BeanBox Phases of a Component’s Lifetime IntroductionExampleComponent Parts UML Notation 21/26

SWE 316: Software Design and Architecture 1- Design/ Implementation Phase  Write source code for classes  Ensure that the runtime environment contains library classes required  Conform with required rules, if any (e.g., Java Beans)  Incorporate required non-library classes  Create a manifest listing the component’s parts IntroductionExampleComponent Parts UML Notation 22/26

SWE 316: Software Design and Architecture Compiled collection of classes component instance Component environment Storage component Create instanceStore instance 2- Instance Creation Time IntroductionExampleComponent Parts UML Notation 23/26

SWE 316: Software Design and Architecture Components Related instances Instance creation and connection Storage 3- Assembly Time IntroductionExampleComponent Parts UML Notation 24/26

SWE 316: Software Design and Architecture Compiled classes of the application component Execution environment Storage Complete application 4- Deployment Time Select, design, code source, instantiate, combine instances, deploy in applications, execute. KEY CONCEPT The Lifecycle of a Component IntroductionExampleComponent Parts UML Notation 25/26

SWE 316: Software Design and Architecture Summary: Components …  … are software elements used without alteration  … allow the re-use of compiled parts  Interaction via events reduces interdependence  … typically developed in a convenient container  e.g., for visualizing and interconnecting  to free the developer from common tasks  … consist of classes, files etc. and a manifest IntroductionExampleComponent PartsUML Notation 26/26