1 / 33

Software Engineering with Reusable Components

Software Engineering with Reusable Components. RiSE’s Seminars Sametinger’s book :: Chapters 6 and 7 Fred Durão. Summary. Software Components (Chapter 6) Component Definition Component Interfaces Component Platforms Component Composition (Chapter 7) Forms of Composition

pmark
Download Presentation

Software Engineering with Reusable Components

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Software Engineeringwith Reusable Components RiSE’s Seminars Sametinger’s book :: Chapters 6 and 7 Fred Durão

  2. Summary • Software Components (Chapter 6) • Component Definition • Component Interfaces • Component Platforms • Component Composition (Chapter 7) • Forms of Composition • Forms of Interoperation • Composition Mismatches

  3. Software Components

  4. Software Components :: Chapter 6 History • In 1969 McIlroy envisioned an industry of reusable software components [McI76]. • In 1982 Wasserman and Gutz saw the programmer of the future working with “standard components…” • Today we are making that dreams becaming true.

  5. Software Components :: Chapter 6 Component Definitions • Reusable software components are self-contained, clearly identifiable artefacts that describes and/or perform specific functions and have clear interfaces, appropriate documentation and a defined reuse status. • Self-Contained • Identification • Functionality • Interfaces • Documentation • Reuse Status

  6. Software Components :: Chapter 6 Related Work • [HP88] describes a component as “logical part of a system or program” • [MDK96] defines a component as “…any unit that provides a relatively independent piece that is used in combination with a number of components in different configuration” • [HC91] use the term software component “to mean any type of software resource that may be reused…”

  7. Software Components :: Chapter 6 Component Interface • Components are not completely independent of other components and of their environments; • Many components are implemented in a specific language programming; • Interface determines how a component can be reused and interconnected; • It defines an operation or a set of operations that is available for a component; • It provides abstraction and hides the details of implementation.

  8. Software Components :: Chapter 6 Component Interface • Interfaces are crucial to composition of components; • The components can be connected by the interfaces; • Multiple Interfaces; • Useful to structure of complex functionality. • Single Interface; • Useful to structure of specific functionality

  9. Software Components :: Chapter 6 Interface Types • Data interface • Data Handling; • Programming interface • API’s; • User interface • Require interaction from the user - scripts • Command language interface • Provide communication mechanisms between interactive programs

  10. Software Components :: Chapter 6 Component Platforms • Components generally require different platforms. • Platforms can be described as: • Run-time systems; • Operating systems; • Window systems; • Libraries; • Components are the more reusable the less platforms they depend on and more portable are these platforms;

  11. Software Components :: Chapter 6 Platforms Categories • Execution Platforms • Necessary in order to execute a component. • Hardware, Operating System, Programming Systems, Virtual Machines. • Composition Platforms • Necessary for components that do not run their own but have to be integrated with other components to form a executable program. • e.g. compilers, libraries, data storage and GUI (Win 95).

  12. Software Components :: Chapter 6 Component and Platforms Dependencies • Two components or more can work together only if they: • share the same execution platform or; • use different execution platform but common composition platform. • The relationship between component and platform is responsible for level of the portability. • The portability of a component correlates with its reusability.

  13. Software Components :: Chapter 6 Open Systems • The less platform dependencies a component has the more portable and reusable is a component. • Advantages: • Composability • Two components can work through well-defined interfaces. • Component portability • Components developed on one platform should be usable on different platforms with no or minimal change. • User portability • Ease of switching among user interfaces of different components • Integration • The ease case which a component can be used by other components

  14. Software Components :: Chapter 6 Open Systems • Standards are crucial for open system • e.g. a component might execute under Unix, yet be restrict to certain Unix implementation. So all Unix variations should implement standard interfaces.

  15. Software Components :: Chapter 6 Design Patterns • Are not considered software components; • Can be regarded as platforms of component development or application “frameworks”;

  16. Component Composition

  17. Component Composition :: Chapter 7 Component Composition • [ND95] defines software composition as “the process of constructing applications by interconnecting software components through their plug[s]”. • [dM95] defines component composition as “communication between components through their interfaces”

  18. Component Composition :: Chapter 7 The two basic forms: • Internal Composition • Integrated into a system and become an inherent part of the system; • e.g. Source code or executable code; • External Composition, • Independent; • Run on their own; • Can be used as complete programs by themselves; • e.g. Web Services Components

  19. Component Composition :: Chapter 7 Component Distinction • [ND95] • Functional Composition; • Blackboard Composition; • Composition by extension; • [NM95] • Macro Expansion; • to compensate lacking of language programming features. • High Order Functional; • Binding of communication channels;

  20. Component Composition :: Chapter 7 Textual Composition • Best represented by Macros; • Macros are code extensions; • Composition by textual replacement; • There is no interface defined, can be arbitrary chosen; • Use more C and C++ programming language; • e.g. Part of a function or expression;

  21. Component Composition :: Chapter 7 Functional Composition • Most widespread mechanism; • Most programming languages offer this mechanism; • e.g. libraries and packages; • Disvantages: • Usually written in the same language; • Solution: e.g. Web Services or Cross Platforms Languages. • Remote procedure Call • Distributed computing; • Provide some abstraction

  22. Component Composition :: Chapter 7 Modular Composition • Collection of data structures and/or functions; • Important abstraction mechanism • Data encapsulation and information hiding. • Avoid implicit interfaces; • e.g. Ada Math Advantage (consisting of over a hundred frequently used mathematical and utility components);

  23. Component Composition :: Chapter 7 Object-Oriented Composition • Use of inheritance, polymorphism, dynamic-binding and encapsulation; • Advantages: • Reuse of existing source code; • Adaptation of programs to work in similar but different situations; • Extraction of commonalties from different classes, and • Organization of objects into hierarchies • More flexibility; • Increases the reuse potential of existing code.

  24. Component Composition :: Chapter 7 Source Code Parameterization • In order to make source code adaptable and thus reusable; • Is a textual composition technique.

  25. Component Composition :: Chapter 7 Distributed Computing • Modules of components exchange messages over communications network or by sharing memory; • Advantages: • High speed; • High availability; • Functional specialization; • Parallelism;

  26. Component Composition :: Chapter 7 Object Models: Components running on different machines and platforms • Corba • Use a OO paradigm and hide programming language and operating system differences. • Interface Definition Language (IDL) • Describe a common interface component. • Object Request Broker • Channel of communication between components in different platforms.

  27. Component Composition :: Chapter 7 Compound Documents: Reducing the complexity of mega-applications • A lean of software components that work cooperatively rather than to develop monolithic mega-applications • The end user partly takes the role of a software developer • Increase of software reuse • Examples: • OpenDoc • Ms/OLE

  28. Component Composition :: Chapter 7 Component Application • Integrated Components • Open Platform Composition CORBA

  29. Component Composition :: Chapter 7 Forms of Interoperation • Interoperability is the ability of software components to communicate and cooperate despite differences in language, interface and execution platform [Kon95, Weg95]. • Successful composition does not imply in successful interoperation; • Integration mechanisms: • Control Integration; • Accomplished by means of exchange message; • Data Integration; • Accomplished by means of database or file system;

  30. Component Composition :: Chapter 7 Categories of Interoperation : Exchanging Data • No control • Components share data without directly communication with each other • Static Control Components share data without directly communication with each other • The sending component has a fixed received component; • Dynamic Control • Function call with dynamic binding. More flexibility. • Broadcast Control • Components may share separate data.

  31. Component Composition :: Chapter 7 Composition Mismatches • Component composition is compared to eletrictal appliances...standardization ends at in the country´s border. • [Sha95] listed ad-hoc tricks to connect mismatched components: • Component Modifications – decreases the potencial reuse. • Parallel component version – e.g. Unix Operation, problem: short life. • Adapters / Wrappers – avoid direct modifications of the component. • Components with converters – able to read something and write several formats. • Multilingual components – can be executed on various plataforms. • Intermediate forms – useful when many components are involved.

  32. Component Composition :: Chapter 7 Interface Bridging and Standardization • The two major mechanisms for the solving of component mismatches. • Interface transformation language are used to express how on offered interface can be transformed to the requested interface[Kon95]. • Interface definition language are used to express specific interfaces in a programming language independent way[Kon95]. • e.g. Object Models like Corba [mz95] provide interface standardization.

  33. References • SAMETINGER, J. Software Engineering with Reusable Components. Springer-Verlag, 1997.

More Related