Software Engineering with Reusable Components Ri SEs Seminars

Software Engineering with Reusable Components Ri. SE’s Seminars Sametinger’s book : : Chapters 8, 9 and 10 Eduardo Cruz 25 September 2020

Software Engineering with Reusable Components Summary n Chapter 8 - Component Attributes n Chapter 9 - Component Taxonomy n Chapter 10 - Component Examples 9/25/2020 2

Software Engineering with Reusable Components Previous chapter: platform, composition, interoperation Chapter 8 – Component Attributes Better Classification ¡ ¡ ¡ ¡ Functionality Interactivity Interaction Concurrency Distribution Forms of Adaptation Quality Control 9/25/2020 3

Software Engineering with Reusable Components Chapter 8 – Component Attributes Functionality n Applicability ¡ n Generality ¡ n It is likelihood to be a reuse candidate in the range of software systems for which it was designed to be reused High generality of a component means also high applicability of this component. However, care has to be taken not to over generalize a component. Excessive generality leads to complex components and unnecessary overhead in both execution time and resource consumption Completeness ¡ A component is complete when it offers the functionality expected by reusers in its intended reuse scenarios 9/25/2020 4

Software Engineering with Reusable Components Chapter 8 – Component Attributes Interactivity Interactive components have unpredictable inputs from a external environment. n Functions ¡ ¡ Transform initial state to a final state Complexity by computation cost Do something Self-destruction after completed invocation 9/25/2020 n Objects ¡ ¡ React to messages Complexity of interaction Are something Persist while reaching to multiple invocations by clients 5

Software Engineering with Reusable Components Chapter 8 – Component Attributes Interaction n Component interaction ¡ ¡ n High cohesion - Does one thing and does it well Loose coupling - Low dependencies User interaction ¡ User interface decrease reusability 9/25/2020 6

Software Engineering with Reusable Components Chapter 8 – Component Attributes Concurrency The textual order of the computations does not define the order of execution n n Gain in execution speed Elimination of potential processor idle time Inappropriateness sequential model Synchronization n Is necessary if two components, for example, share any kind of resource 9/25/2020 7

Software Engineering with Reusable Components Chapter 8 – Component Attributes Distribution ¡ ¡ ¡ Distributed components are logically and sometimes geographically separate The main reasons are not cost considerations but increased capabilities, greater flexibility of incremental expansion, and choice of vendors Networks, multiprocessors, multicomputers. . . 9/25/2020 8

Software Engineering with Reusable Components Chapter 8 – Component Attributes Forms of Adaptation n Adaptation ¡ n n What happens to a component between the time a decision is made to reuse it and the time it becomes part of the software systems Customization. Modification 9/25/2020 9

Software Engineering with Reusable Components Chapter 8 – Component Attributes Quality Control n n A market of reusable software components will not evolve without some sort of guaranteed quality Pre and post conditions Fault tolerant software Distributed Components ¡ ¡ Partial Failure and deadlocks Unreliable communication channels 9/25/2020 10

Software Engineering with Reusable Components Chapter 8 – Component Attributes Summary Attributes Examples Sorting, menu handling, database management Component interaction Functional call, database query, server contact User interaction Dialog-box, window display, terminal input Testes, verifications, compiler checks, assertions, process backups Form of adaptation Parameters, inheritance, modification Concurrency Semaphores, critical regions, monitors Distribution Client-server, World Wide Web, file transfer 9/25/2020 Platform Specific Quality control Component Specific Functionality 11

Software Engineering with Reusable Components Chapter 9 – Component Taxonomy Component categories make it easier to determine the reuse potential of specific components ¡ Taxonomy n n n ¡ Interfaces Composition Techniques Platforms Related Work 9/25/2020 12

Software Engineering with Reusable Components Chapter 9 – Component Taxonomy User and data interfaces User and data interface may be used when components do not provide explicit reuse support n User interface ¡ ¡ ¡ n Level 2: Graphical user interface Level 1: Command-line interface Level 0: None Data Interfaces ¡ ¡ Level 3: 2: 1: 0: 9/25/2020 Database I/O Specific file I/O Textual I/O Nome 13

Software Engineering with Reusable Components Chapter 9 – Component Taxonomy Composition and Interoperation Programming interfaces represent the most important aspect for reuse Level 8: Open platform composition Level 7: Specific platform composition Level 6: Object model composition Level 5: Subsystem composition Level 4: Object-oriented composition Level 3: Modular composition Level 2: Functional composition Level 1: Textual Composition Level 0: None 9/25/2020 14

Software Engineering with Reusable Components Chapter 9 – Component Taxonomy Platforms and Attributes In order to support systematic reuse, we have to overcome the boundaries of component platforms n Platform categories Level 4: Programming languages ¡ Level 3: Libraries ¡ Level 2: Programming system ¡ Level 1: Operating system ¡ Level 0: Hardware Some attributes are platform specific ¡ n The standardization of platforms is important for increased reusability of components. For example, the definition of virtual machine is one step in this direction 9/25/2020 15

Software Engineering with Reusable Components Chapter 9 – Component Taxonomy Related Work n Structures ¡ n n Denote objects or classes of objects (abstract data type) Tools ¡ Denote algorithmic targeted to structures Subsystems ¡ n Denote logical collections of cooperating structures and tools 9/25/2020 Scope ¡ n Purpose ¡ n n Capture the characteristics of the problem Domain /technology Granularity Abstraction ¡ General / Specific 16

Software Engineering with Reusable Components Chapter 9 – Component Taxonomy Related Work n Active ¡ n Operating system Passive ¡ Classes, functions 9/25/2020 n n State Inheritance Concurrency Distribution 17

Software Engineering with Reusable Components Chapter 10 – Component Examples n Visual Basic: Reuse of Visual Controls n Java: Reuse on the World Wide Web n Unix Filters: Reuse based on ASCII Pipes n Frame. Maker: Reuse of an Application n Field: Reuse in a Programming Environment 9/25/2020 18

Software Engineering with Reusable Components Chapter 10 – Component Examples Visual Basic: Reuse of Visual Controls n Steps ¡ ¡ ¡ n n n Create the user interface n Ser Properties Write code Platform Event Handling Between Object-oriented composition and subsystem composition Consists of ¡ ¡ ¡ Forms modules Code modules Custom controls 9/25/2020 19

Software Engineering with Reusable Components Chapter 10 – Component Examples Java: Reuse on the World Wide Web n n n Java designers addressed many problems of today's software developer Java. Beans Extensive libraries with support for graphical user interface n Characteristics ¡ ¡ ¡ ¡ ¡ 9/25/2020 Simplicity Object-orientedness Robustness and reliability Security Portability High Performance Heterogeneity and distributed networks Architecture neutrality Dynamic adaptability 20

Software Engineering with Reusable Components Chapter 10 – Component Examples Unix Filters: Reuse based on ASCII Pipes n Pipelines ¡ n Bounded pipes ¡ n Have the amount of data restricted Typed pipes ¡ n Are linear sequences of filters Have a type defined for their data dir *. * | more input Filter 9/25/2020 pipe output pipe Filter 21

Software Engineering with Reusable Components Chapter 10 – Component Examples Framemaker: Reuse of a Desktop Publishing Application n Complex commercial application for publishing ¡ n Word processor, spell checking, cross-reference, API - Write C programs to control Framemaker ¡ ¡ FDE – Framemaker Development Environment Communicate with the user Add functionality Modify user interface Framemaker client API 9/25/2020 Framemaker client API 22

Software Engineering with Reusable Components Chapter 10 – Component Examples Field: Reuse in Programming Environment n Integrated Programming environment on Unix platforms ¡ ¡ ¡ Simplicity Base for existing tools Black box n ¡ Wrappers send and receive messages and also communicate with the tools to be reused White box n Integrate tools into a message-based environment 9/25/2020 23
- Slides: 23