|
Last Modified 1-1-2011 |
Shop the Low Price Leader from Home:
|
IUSB |
||||||||||||
|
Home Software Engineering Software ArchitectureUser Interface Design Software Reusability Component Based SE Service Orientation Global Software Development Software Architecture Architecture IntroductionSoftware Life Cycle Architecture Design Architecture Design Decisions Architectural Views Architecture Styles Main Program with Subroutines Abstract Data Type Implicit Invocation Pipes And Filters Repository Style Layers Architectural Style Architecture Assessment Architecture Summary User Interface Design Seeheim ModelPart-Whole Decomposition Model View Controller User Interface Aspects Human Computer Interaction Humanities Artistic Design Ergonomics HCI Models HIP Models IS Mental Models UIDC Models Interactive System Design Design Activity Structure Design Collaboration Task Analysis HCI Task Analysis Collaborative Work Collection Methods Task Analysis Specification Details UVM Dialog UVM Representation UVM Evaluation Decision Evaluation Specification Evaluation Prototype Evaluation Summary Component Based SE CBSE Justification Component Models Component FormsComponent Architecture CBSE Development Process CBSE System DevelopmentComponent Assessment Component Development Architectural Approaches Product LinesCOTS Development Select Approach Summary |
Component Based Software Engineering
The section on Software Reuse gave a general discussion on software reuse. In this section, we focus on a particular type of reuse, that of components. A component is a building block for software, much like an LCD screen is a building block for a monitor and a chassis is a building block for an automobile. The idea behind Component Based Software Engineering (CBSE) is to assemble systems out of existing, independently developed components. Component Based Software Engineering entails more than mere reuse of components, though. It also aims to increase the flexibility of systems through improved modularization. The idea of separating the manufacturing of parts and the assemblage of those parts into a product was pioneered around 1800 in the production of rifles. This idea has fundamentally changed the hardware-manufacturing business. The same idea can be applied to the production of software. The production of software parts - the components - is separated from the assemblage of those parts into applications. As a consequence, there will be two separate development processes, one for components and one for applications. These processes are not independent. Applications need certain components and components had better be used in applications. So there are dependencies between the two development processes. LEGO is often taken as an example of a component-based approach. LEGO is a set of building blocks in a large variety of shapes and colors. LEGO is sold in boxes that contain a number of blocks that can be composed to make up toys such as cars, trains or airplanes. In order to enable their composition, all LEGO blocks provide small cylindrical stubs on the top and complementary holes on the bottom of the shape. The conformance of the blocks to this convention ensures that blocks, possibly even different from LEGO boxes can be combined. Moreover, they can be combined into constructions other than the construction suggested by the manufacturer. Hence, LEGO blocks have the characteristics that they are easily composable and are generic. These are also the characteristics we look for in software components. Components are to become parts of a bigger system. As such, they have to fit the architecture of those systems. One possibility would be to first design the architecture and then search for components that fit the architecture. A second possibility is to design an architecture of a family of similar systems and develop components that fit into a variety of products within that family. A third possibility is to use a bottom-up approach in which the architecture is made to fit the available components. A warning about terminology is warranted. In Component Based Software Engineering, the word component has a more specific meaning than its meaning in Standard English. Whereas component in general means part, in Component Based Software Engineering a component is a piece of software that conforms to the rules of a particular software component model. The component model used in one system may be very different from that used in another system. As a result, the notion of component differs between different domains. Justification for the use of Component Based Software EngineeringComputer Based Software Engineering contributes to the following business goals:
Developing software in a component based way requires a discipline of strict modularization. The strict modularization limits the domino effects of changes in the system. Hence, the effort needed to change a component-based system is likely to be less effort needed when the same changes are made to a system that is not modularized according to a component based design discipline. This property improves maintainability. When subsystems are strictly modularized, it becomes easier to change parts to support new features. This improves the ability of the system to evolve. Component Based Software Engineering increases productivity through the reuse of building blocks that have been developed in earlier efforts or by other parties. In order for this to enhance productivity, the acquisition and integration of a component should of course be cheaper than developing the component from scratch. The size of professional software systems is in the order of millions of lines of code. The time needed to realize such software systems may span several years. Component Based Software Engineering contributes to reducing the development time of software by using existing components rather than developing components from scratch. Another way in which Component Based Software Engineering may reduce development time is by enabling concurrent development of components. Concurrent development of components is easier if components have minimal mutual dependencies. Any dependencies that do exist between components must be specified explicitly. Hence, in Component Based Software Engineering, components are designed and specified in such a way that they can be constructed independently of, and concurrently with, other components. Component Models and ComponentsIn the world of engineering, the conventions for components are chosen such that they can be used for constructing systems with certain properties. For example, a racing car requires components that are lightweight and aerodynamic in order to obtain a system that is fast on the road. An army tank requires components that are tough in order to obtain a robust system. Software components encapsulate functionality in a form that conforms to a set of conventions. These conventions ensure composability and determine the properties of systems that can be built using a particular type of component. Rather than physical properties of shape, density and color, software components are required to have properties such as computational efficiency, resource efficiency, and reliability. These characteristics are captured in the following definition:
Informally, a component model defines the types of building block and the recipe for putting those building blocks together. This definition stresses a generic constraint: components are composable. A Component is a building block that conforms to a component model. The key aspect of this definition is composability. For software, composability may be achieved by using explicit interfaces for defining what is offered as well as what is required by a piece of software. Composability also defines the manner in which a component can communicate with other pieces of software. Whereas composability is a necessary technical requirement, a generic (modularized) component is a desirable requirement from a business perspective. A generic component can be used more often and hence has greater potential for creating revenue. The genericity characteristic implies certain technical characteristics. For instance, components with lower coupling, or dependencies can be applied in a wider context. The following definition fo a component is more specific to software:
Whereas a component model defines a standard, a component technology is the collection of implmentation artifacts that realize this standard. A software component technology is the implementation of a component model by means of:
The composability requirement for components entails the standardization of interfaces and interaction. These conditions may be sufficient to ensure composability at the implementation level of the component. However, much more can be said about properties that are generally desired from software components such as granularity, encapsulation, cohesion, and testability. These additional properties are related to the design and development of components. Although the definition of a component model allows a lot of freedom, in practice there is a lot of commonality amongst component models. Comparing component technologies shows they standardize conventions that cover multiple stages of the development of components. Component Forms in Component ModelsDuring the life cycle of a component, the component passes through the following global stages: development, packaging, distribution, deployment and execution as indicated in the following diagram:
The following diagram shows the component life cycle with operations:
The component specification describes properties that are, or should be, realized by the corresponding component implementation. Many different properties are included in a specification. A component specification typically includes the following important properties:
The interface of a component is defined in the design stage and continues to play an important role in execution time. A component interface defines the actions through which components may communicate with each other. Interfaces are offered by one component in order to be used by other components. The component that offers an interface is responsible for realizing the actions of the interface. the component that uses the actions of an interface only needs to know what the action achieves, not how it is achieved. In this sense, users of an interface are shielded from the machinery that is used to implement it. This shielding is a means of abstraction - details about the realization are omitted. As a result of this abstraction, different implementations of an interface may be used to realize some action without users of the interface being aware of it. A typical use of this property of interfaces is to replace a component by a newer version. The following figure shows that component P can be replaced by component P', if P' realizes the same interface LX. Component R that uses interface LX need not be changed. This is illustrated in the following diagram:
Component R that uses interface LX need not be changed. The component that offers an interface is called the Provider, while the component that uses the interface is called the Requirer of the interface. The purpose and scope of a component specification differ from the purpose and scope of a component interface. The most important difference is that specifications define a realization contract, while interfaces describe usage contracts. During development of a component, the specification is a prescription of what the implementation should realize. As such, the specification may include the definition of the interfaces. Once the implementation of a component is finished, a specification describes what architects and developers who wish to use a component may want to know about it. Here, the specification is used to describe the component. A component specification and an interface also differ in scope: if a component has multiple interfaces, these are all listed as part of the specification. The scope of a specification is the component as a whole. As such it needs to specify the way in which the interfaces of a component relate to each other. A component implementation is a realization of a component specification. There has been some discussion on how strict the hiding of the internals of components should be. The black-box requirement for components has been criticized as being too strong a constraint. For the purpose of tailorability or testability, components should disclose more of their internals. Several variants of black box have been proposed; the differ in the degree to which the internals of components can be inspected and changed by parties other than its developer:
A component package is a unit of distribution. A package contains the implementation of a component, relevant data files, meta data about the component, and meta data about the package. The meta-data of a package contains a table of contents of files in the package. It may be compressed to save download time, and encrypted to improve security. It can be compared to the way a ZIP file can be used to package a collection of files as a single unit. Finally, the component instance consists of the executable code and associated data in the target machine. The relation between a component implementation and a component instance is similar to the relation between a class and an object. The component instance will form part of the execution architecture of the running system. The execution architecture determines the performance of a system by defining the mapping of functionality onto run-time entities (such as processes and resources) in a system. The component instance has to conform to conventions that are dictated for this purpose by the software architecture. Architecture and Component ModelsThe goal of software architecture is to define the key principles and guidelines for developing a software system such that the resulting system and processes meets its functional and quality requirements. The functional requirements can be achieved by defining the set of functional requirements for the system. Functionality behaves nicely in an additive manner. In general, to increase the functionality of a system, we only need to add a new subsystem. Achieving the quality properties, however, may prove a more daunting task. One complication is that quality properties do not have the additive property, but are the collective result of the interaction of all parts in the system. The performance of a system is not handled by one component, but rather is distributed throughout all the components in the system. In order to achieve some set of quality properties, all parts of a system must adhere to certain principles. Since quality is to a large extent determined by the software architecture, component based software engineering requires the proper amount of attention be paid to the software architecture. To successfully develop systems in a component based manner, an architectural plan needs to be in place that organizes how components fit together and how, once assembled, a system meets its quality requiremets. In an ideal case, the development of a system is driven by an architecture that is developed up front. Based on this architecture, a component model is selected or a dedicated component model is developed such that the rules of the component model match those of the architecture. Component models are developed in domains that have specific quality requirement. Developing a proprietary component model takes a lot of effort. Therefore, a practical alternative is to select the architecture and component model in concert. To this end, a set of architecture styles and component models are selected. The choice of a particular component model limits the number of architecture styles that can be realized. If a component model is not an ideal match for the target architecture style, then some additional work will be required to provide extra features or to eliminate superfluous features. So an architecture contains the possible component models and a component model contains the possible architectures. Typical issues that are the subject of architectural decisions which may influence the choice between a custom component model and custom architecture versus a commercial component and a commercial architecture are: security mechanisms, transaction mechanisms and scheduling policies. Typically, policies for such issues are fixed in commercial component models, but can be tailored when designing a custom component model. There are different approaches to dividing the responsibility for managing quality properties between components and the execution platform. The different types of approach are characterized in the following diagram:
The logic that handles quality properties is located within the EFP Management containers. These reference architecture diagrams apply to quality properties in general. There are two main dimensions in which these approaches differ in managing quality properties:
Many component models provide no specific facilities for managing quality properties. The way a property is handled is left to the designers of the system, and as a result, may not be managed at all. Comparison of different quality management methods per Figure CM-4:
A third approach is that the components should be designed such that they address only functional aspects and no quality properties. Consequently, in the execution environment, these components are surrounded the by quality management properties container. This container contains the knowledge on how to manage quality properties. The container approach is a way of realizing separation of concerns in which components concentrate on functional aspects and containers concentrate on quality aspects. In this way, components become more generic because no modification is required to integrate them into systems that may employ different policies for managing quality properties. Since in this approach components do not address quality properties, they are simpler and smaller, and hence simpler and more cost effective to implement and integrate. In addition to the differences just noted, component models also have a number of features in common. The features common to component models are:
→ component model can use either standard programming language, or → component model can use special language for expressing interfaces. → .COM and .NET allow several languages to be implemented. → Enterprise Java can be used for platform independence. → Interfaces must be specified independent of a programming language. → Usually an Interface Description Language (IDL) is used for this purpose. → Acheived using an intermediate language. → Intermediate language can be interpreted or Just-In-Time Compiler → Current trend shifting towards run-time phase of software life cycle. → Which properties are important depends on the problem domain. Development Process and Life Cycle of Component Based Software DevelopmentThe process of component-based software development differs from the classical process of software systems. The main difference is in the separation of the development process of components from the development process of systems. Since the component-based approach is a relatively young approach in software engineering, the main emphasis in the area has been on the development of technologies. Furthermore, process modeling of Component Based Software Engineering is still a relatively unexplored area. The main idea of the component-based approach is the building of systems from already existing components. This assumption has several consequences for the system life cycle:
The Component-Based System Development ProcessThe main components of a typical component-based waterfall life cycle model are:
This concept is illustrated in the following diagram:
The primary idea of the component-based approach is to reuse the existing components instead of implementing new and unproven components. For this reason, the availability of existing components must be considered even in the requirements and design phases. The following procedures should be followed at the various stages to most successfully implement Component Based System Design:
Figure CM-5 shows a simplified and idealized process. Its assumption is that the components selected and used are sufficiently close to the units identified in the design process. It is also assumed that the selection and adaptation processes require significantly less effort than the component's implementation. Furthermore, the figure only shows the processes directly related to system development but not the supporting processes that have to do with the assessment and development of components. Component AssessmentWhile development of component-based systems significantly decreases the detailed design and implementation effort during system development, it requires additional effort in other activities. For example, instead of implementing the required functions, developers have to search for components that provide the required characteristics. Developers must also verify that the selected components provide the required functionality, and they can be successfully integrated with other components. A consequence might be that the best components are not selected but rather the components that best fit together. To make the system development process more efficient, many assessment activities can be performed independently, separate from system development. A generic assessment process should include the following activities:
The Component Development ProcessThe component development process is in many respects similar to the system development process: Final product requirements must be captured, analyzed and defined. The component must be designed, implemented, verified, validated, and delivered. When building a new component, developers will reuse other components and will use similar procedures of component evaluation as is done for system development. There is, however, a significant difference: components are intended for reuse in many different products, many of them yet to be designed. The ramifications of this difference are summarized as:
In order to properly develop components the following considerations should be taken into account during each phase of the development process:
In order to have a reusable component, the component must be designed in a general way, rather than being custom tailored for a unique situation. Components intended to be reused require adaptability. This will increase the size and complexity of the component. At the same time, they must be concrete and simple enough to serve particular requirements in an efficient way. Even more difficult problems will arise during blame analysis. The issue will encompass the manifestation of the fault and the origin of the fault. A fault might be detected in one component, but the cause of the fault could be in another component. Addressing these concerns will take extra effort, and should be noted in the contract, but these concerns should be addressed before the component is released if at all possible. Maintenance activities can be much more extensive than expected. It is important that component producers build a strategy for performing maintenance, and take the corresponding actions to ensure the realization of this strategy. For example, a component producer may offer maintenance support, which could offset any costs as well as allow the producer to retain credibility in the case of an error occurring. Architectural approaches in component-based development.Industrial practice has established several approaches to using component-based development. These approaches, while similar in that they use component technology, have quite different processes as well as different solutions at the architectural level. Product Line DevelopmentThe component-based architecture for product-line development has a strong top-down direction, but also comes with some bottom-up elements. In contrast to the component-based architecture for component development, this approach aims to enable efficient development of many variants of a product. A product with a variant is often called a product family. Some common families in consumer products would inlclude cell phones, televisions or home audio equipment. Product-line development tries to cater to easily making and maintaining many variants of a product with minimal technical diversity at a minimization of cost to produce the different variants. This is the concept driving the component-based architecture for product-line development. The architecture defines the common parts of the system and the variations that are available. As an example of this approach consider a product family of consumer products that includes CD players, DVD players, and mobile phones. In this case, careful design of the architecture would allow easy integration of MP3 decoding across all product lines. The characteristic of the component-based architecture plays a crucial role is: Enabling Reuse of Components and Efficient IntegrationComposability and minimizing time-to-market are also equally important. Typically product lifetime will be longer the sooner the product can be introduced and assimilated into the market, leading to the maximum profit potential for the developer. It is characteristic of product lines that the architectural solution has a direct impact on the component model. The component model must comply with the predefined reference architecture. In practice, many companies have developed their own component model that suits their proprietary architecture. A second characteristic of product-line architectures is a high degree of concurrency between the component development process and product-line development process. A third characteristic is that is uses a combination of top-down and bottom up procedures. Commercial-Off-The-Shelf (COTS) Based Component DevelopmentCommercial-Off-The-Shelf component development is mostly a bottom-up approach: Assemble a system from existing components. The architecture of the system is secondary to the combinations of components that are avaialble. From the perspective of the system developer, the strongest driver for this approach is time-to-market A typical question developer will ask is Which components can be used to quickly assemble a functioning system?. For this approach to work, there must be component developers that aim at developing highly reusable functionality. Overall, this approach assumes that the system development process is completely separate from the development process for components. While the commercial-off-the-shelf approach gives instant value in new functionality, there are a number of problems with this approach that can complicate its realization: If components were not designed to comply to a component model, or the components were not designed to fit with the other components in the intended system, this approach may run into problems of composability. This may occur if the semantics are not precisely stated or if the architectural properties of the components are not properly and adequately documented. For Commercial-Off-The-Shelf based development, component assessment plays a much more important role than in component or product-line development architectures. As an example of this approach consider a Web store. Web store architecture has a fair amount of commonality with the architecture of many business information systems. A Web-store can be assembled by buying components that are sold as building blocks on the software market. Typical components include: Database, Web-Server, Search Engine, Payment Handler, and an inventory control system. In this case, a selection is made of which combination of components is the most appealing, and then an architecture is designed which successfully integrates these components. Selection of the Optimal Architectural StyleWhich of the preceding approaches produces the optimal architecture? There is no definitive answer. After a surge of enthusiasm in both industry and research, the commercial-off-the-shelf market has decreased without indication of revolutionary improvement. The greatest difficulty lies in the seemingly mutually exclusive constraints: Components need to be general, effective and simple. Yet, at the same time, components must provide attractive functionality, trustworthiness, component verification and certification. The product-line approach has been successful in many domains and its combination with component-based software engineering is a promising approach. Possible threats are the increasing costs of development and maintenance of the component technogies developed internally, That coupled with technological innovations in compilers, debuggers and integrated development environments may make the components obsolete. SummaryThe goals of component-based software engineering are to:
In order to enable the composition and integration of components, the components need to be compatible. This compatibility is achieved by developing component models that define a set of conventions to which the individual components must adhere. Component models are developed to satisfy the quality requirements of particular application domains. To successfully develop systems in a component-based manner, an architectural system needs to be in place that:
The process of Component-Based Software Engineering is characterized by a separation of the development processes of individual components and the development process of the system that uses the components. |
|