02291 system integration
play

02291: System Integration Components (Part Ia) Hubert Baumeister - PowerPoint PPT Presentation

02291: System Integration Components (Part Ia) Hubert Baumeister huba@dtu.dk DTU Compute Technical University of Denmark Spring 2020 Software architecture Software architecture building blocks: components glue: connectors ports:


  1. 02291: System Integration Components (Part Ia) Hubert Baumeister huba@dtu.dk DTU Compute Technical University of Denmark Spring 2020

  2. Software architecture Software architecture ◮ building blocks: components ◮ glue: connectors ◮ ports: interfaces to the outside

  3. Software architecture Software architecture ◮ building blocks: components ◮ glue: connectors ◮ ports: interfaces to the outside Decompose the system into smaller components and their interconnection ◮ Components based on business responsibilities

  4. Components Components: replaceable BankATM piece of software Clearing− Bank ATM Company CB BC BA AB → Resuable → Pluggable

  5. Components Components: replaceable BankATM piece of software Clearing− Bank ATM Company CB BC BA AB → Resuable → Pluggable Well-defined interfaces: provided and required → ports → connectors

  6. Components Components: replaceable BankATM piece of software Clearing− Bank ATM Company CB BC BA AB → Resuable → Pluggable Well-defined interfaces: provided and required → ports → connectors ◮ Similar to classes: better encapsulation ◮ Component = set of collaborating classes ◮ Microservices are components

  7. Example Bank–ATM: UML 2.0 Component Diagram BankATM verifyPIN verifyPIN withdraw Bank ATM Clearing− Company CB BC AB BA pinOk pinOk pinNotOK pinNotOK withdrawOK withdrawNotOk

  8. Example Bank–ATM: Configuration (composite structure diagram) :BankATM atm 0 :ATM :AB c:Clearing− b:Bank :BA Company :CB :BC :BA atm 1 :ATM :AB

  9. Strong encapsulation of components ◮ Strong encapsulation ◮ What is provided to others ◮ What is needed of others ◮ Ports define a portal to a component ◮ Have interfaces: provided / required ◮ Connect to other components

  10. Showing interfaces Required Interface Provided Interface by port BA by port AB Port AB Clearing Company Bank ATM Provided Interface Required Interface Port BC Port BA by port BA by port AB

  11. Port BA <<interface>> BankToAtm verifyPIN(iban:IBAN, pin:int) withdraw(iban, amount:Money) Bank ATM <<interface>> AtmToBank pinOK pinNotOK withdrawOk withdrawNotOk «interface» «interface» I1 I2 «refine» C1 m 1 m 1 C2 m 2 m 3 m 3

  12. Component Meta-Model Conceptual meta-model (not actual UML 2.0 meta-model)

  13. Implementing components by components UML User Manual, Grady Booch

  14. Implementing components by components UML User Manual, Grady Booch ◮ External ports are mapped to some port of a subcomponent.

  15. Bank component with Implementation Bank component seen from the outside Bank component seen from the inside Bank ClearingCompanyToBank BankToATMPort BankToAtm «delegate» «delegate» * * «delegate» «delegate» Bank BankToClearingCompany AtmToBank Account Customer

  16. Detailed Class Diagram for the Bank Component Port BA <<interface>> BankToATMPort BankToAtm verifyPIN(a,p) verifyPIN(a,p) withdraw(a,m) Account * withdraw(a,m) pinOK number : IBAN pinNotOk balance : int <<interface>> AtmToBank withdraw(amount:int): bool ... pinOK 1 atm pinNotOK withdrawOk 1..* withdrawNotOk Bank 1..* name: String Port BC 1 b Customer ... name pinOK <<interface>> address c BankToClearingCompany pinNotOk * * ... accountFor(a): Account pinOK ... pinNotOk <<interface>> ClearingCompanyToBank 1 cc verifyPIN(a,p) ◮ Rules for classes implementing components

  17. Detailed Class Diagram for the Bank Component Port BA <<interface>> BankToATMPort BankToAtm verifyPIN(a,p) verifyPIN(a,p) withdraw(a,m) Account * withdraw(a,m) pinOK number : IBAN pinNotOk balance : int <<interface>> AtmToBank withdraw(amount:int): bool ... pinOK 1 atm pinNotOK withdrawOk 1..* withdrawNotOk Bank 1..* name: String Port BC 1 b Customer ... name pinOK <<interface>> address c BankToClearingCompany pinNotOk * * ... accountFor(a): Account pinOK ... pinNotOk <<interface>> ClearingCompanyToBank 1 cc verifyPIN(a,p) ◮ Rules for classes implementing components ◮ Provided interfaces must be implemented by some class

  18. Detailed Class Diagram for the Bank Component Port BA <<interface>> BankToATMPort BankToAtm verifyPIN(a,p) verifyPIN(a,p) withdraw(a,m) Account * withdraw(a,m) pinOK number : IBAN pinNotOk balance : int <<interface>> AtmToBank withdraw(amount:int): bool ... pinOK 1 atm pinNotOK withdrawOk 1..* withdrawNotOk Bank 1..* name: String Port BC 1 b Customer ... name pinOK <<interface>> address c BankToClearingCompany pinNotOk * * ... accountFor(a): Account pinOK ... pinNotOk <<interface>> ClearingCompanyToBank 1 cc verifyPIN(a,p) ◮ Rules for classes implementing components ◮ Provided interfaces must be implemented by some class ◮ Required interfaces must be used by one or serveral classes

  19. Detailed Class Diagram for the Bank Component Port BA <<interface>> BankToATMPort BankToAtm verifyPIN(a,p) verifyPIN(a,p) withdraw(a,m) Account * withdraw(a,m) pinOK number : IBAN pinNotOk balance : int <<interface>> AtmToBank withdraw(amount:int): bool ... pinOK 1 atm pinNotOK withdrawOk 1..* withdrawNotOk Bank 1..* name: String Port BC 1 b Customer ... name pinOK <<interface>> address c BankToClearingCompany pinNotOk * * ... accountFor(a): Account pinOK ... pinNotOk <<interface>> ClearingCompanyToBank 1 cc verifyPIN(a,p) ◮ Rules for classes implementing components ◮ Provided interfaces must be implemented by some class ◮ Required interfaces must be used by one or serveral classes ◮ No access to and from classes of other components (exception: common datatypes)

  20. Detailed Class Diagram for the Bank Component Port BA <<interface>> BankToATMPort BankToAtm verifyPIN(a,p) verifyPIN(a,p) withdraw(a,m) Account * withdraw(a,m) pinOK number : IBAN pinNotOk balance : int <<interface>> AtmToBank withdraw(amount:int): bool ... pinOK 1 atm pinNotOK withdrawOk 1..* withdrawNotOk Bank 1..* name: String Port BC 1 b Customer ... name pinOK <<interface>> address c BankToClearingCompany pinNotOk * * ... accountFor(a): Account pinOK ... pinNotOk <<interface>> ClearingCompanyToBank 1 cc verifyPIN(a,p) ◮ Rules for classes implementing components ◮ Provided interfaces must be implemented by some class ◮ Required interfaces must be used by one or serveral classes ◮ No access to and from classes of other components (exception: common datatypes) ◮ Use packages to indicate classes belonging to a component

  21. Realizing components through programming ◮ No runtime representation (usually)

  22. Realizing components through programming ◮ No runtime representation (usually) ◮ No programming language support (usually)

  23. Realizing components through programming ◮ No runtime representation (usually) ◮ No programming language support (usually) ◮ Different types of component concepts

  24. Realizing components through programming ◮ No runtime representation (usually) ◮ No programming language support (usually) ◮ Different types of component concepts ◮ EJB, CORBA, COM/DCOM, .NET, JavaBeans, . . .

  25. Realizing components through programming ◮ No runtime representation (usually) ◮ No programming language support (usually) ◮ Different types of component concepts ◮ EJB, CORBA, COM/DCOM, .NET, JavaBeans, . . . ◮ Microservices

  26. Defining components ◮ Take your use cases

  27. Defining components ◮ Take your use cases ◮ Execute the use case scenarios using CRC cards

  28. Defining components ◮ Take your use cases ◮ Execute the use case scenarios using CRC cards ◮ Play with the level of abstraction ◮ Start with ”hardware” components ◮ Do the ”hardware” components have ”software” subcomponents? ◮ How are your components realized with classes?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend