COMPONENT – BASED SOFTWARE ENGINEERING MODULE 2 – SECOND SEMESTER MKHIZE, BSC HONS COMPUTER SCIENCES, DIP IT, ICDL
INTRODUCTION Due to the rapid demand for software by most organizations, developing a software from scratch become inefficient in terms of cost and productivity. Hence, the introduction of developing independent, flexible, reliable and reusable components using the concept of component-based software engineering (CBSE).
INTRODUCTION After studying this unit, you should be able to: Demonstrate a detailed knowledge of the term “software component” which may be included in a program as an executable element Demonstrate a detailed, thorough understanding of the key elements of software component models and evaluate the support provided by middleware for those models Demonstrate an understanding of key activities in the component-based software engineering(CBSE) process for reuse as well as the CBSE with reuse Demonstrate an understanding of the three various forms of component composition and problems which may be encountered and how they are going to be resolved during the component composition of new components or systems Definition Component-based software engineering (CBSE), also called as components-based development (CBD), is a branch of software engineering that emphasizes the separation of concerns with respect to the wide-ranging functionality available throughout a given software system.
COMPONENT AND COMPONENT MODELS Component-Based Software Engineering (CBSE) can be defined as an approach to reusing software components of a system. It is a process of defining, implementing, composing or integrating loosely coupled components into systems The introduction of CBSE was due to a frustration of object-oriented development where object classes were too detailed, too specific and at times classes were bound to an application during compilation time. Hence, distributing or even selling the classes was impossible. The following are the essentials of CBSE: a) Independent components must be completely specified by having their own interfaces b) Standard components are embodied in a component model and their interfaces must facilitate the integration of components used. c) There is middleware support component integration, which makes components to be independent, thereby causing distributed components to work together. Also, it handles communication effectively amongst components d) There is a development process which is geared towards the use of CBSE.
PRINCIPLES WHICH SUPPORT THE DEVELOPMENT OF AN UNDERSTANDABLE, EFFECTIVE AND SUPPORTABLE SOFTWARE: a) Components do not interfere with each other, that is they are independent b) Components communicate through well-defined interfaces c) There is a range of standard services which can be used on application systems in terms of the component infrastructure
CHARACTERISTICS OF A COMPONENT: a) Components are composable that is components consists of standard defined interfaces b) Components are self-contained and can be stand-alone components, meaning they are deployable c) Most of the components are properly documented, such that potential users can easily decide whether the component meet their requirements or not d) Components are independent meaning they can operate without using other specific components e) All components meant for reuse must conform to a certain standard component model
THERE ARE TWO IMPORTANT CHARACTERISTICS OF VIEWING A COMPONENT AS A SERVICE: a) The component is an executable entity which operates through defined interfaces. No source code is needed b) The component services are made available through well-defined interfaces and the interfaces are expressed through parameterised operations
All components in principle, have the following interfaces, namely the “provides ” and “requires” interfaces.
DIAGRAM SHOWS TWO INTERFACES OF A COMPONENT WHICH CAN EITHER BE A “REQUIRES” OR “PROVIDES” INTERFACES. Let’s have a brief description of the above-mentioned interfaces: a) The “requires” interfaces specify or define the services which are needed and which need to be provided to other components. If the services are not available, then the component will not work. The UML symbol for the “requires” is a semicircle at the end of the line b) The “provides” interfaces specify or define the services which are provided by the given component to other components This type of interface defines the methods which can be called by the user of a component. The UML symbol to show that it’s a “provides” interface is a circle at the end of the line
COMPONENT MODELS A component model can be defined as a component standard which needs to be met for component implementation, deployment and documentation. These standards must be met for interoperability as well as to provide middleware to support the operation of the components.
Interfaces – components are defined by specifying their interfaces and the component model also specifies how interfaces and elements are defined. Also, the language must be specified by the component model. When defining interfaces, things to include may be parameters, exceptions as well as operation names. Usage – if accessing the component remotely via the RPC (Remote Procedure Call), the component must have a unique number for identification. Component models specify ways in which component metadata can be accessed during component implementation. If the components are generic, there is a need for configuration so as to be incorporated into the application system. Deployment – the component model specifies how the component is going to be deployed and implemented bearing in mind that components are independent entities. So, having this in mind, during deployment, components must be packaged with supporting software which will not be provided by the component infrastructure or the “requires” Interface. All the deployment information such as how it is organised and the contents of the package must be included.
HOMEWORK #1 The component model provides two services, namely platform service and support services during software implementation. Discuss How can a component be incorporated into a new system? In your answer, specify different protocols and technologies which might be used to incorporate a component into a new system. Discuss CBSE processes In pairs, discuss the above CBSE process. Please refer to the prescribed textbook for a detailed explanation Pg. 474 How can organisations make certain components to be reusable? As a software engineer, briefly explain the changes which can be made to a component to make it more reusable. Discuss Component composition Please refer to prescribed textbook Pg 481 for an explanation of the three types of incompatibility which may be encountered during component composition.
HOMEWORK #2 1. Define a component? In your answer, briefly explain the characteristics of a component. 2. With an aid of a diagram, briefly discuss the component interfaces of a standard component. 3. Discuss the CBSE process. Illustrate where necessary. 4. During component reuse, they are factors to be considered. Outline the factors to be considered. 5. Briefly explain the following types of component composition: a) Sequential composition b) Hierarchical composition c) Additive composition Case Study You have recently joined JB Company, which is an upcoming IT company. JB Company wishes to develop their system by implementing component-based software engineering. Management has tasked you, to do a thorough research on how CBSE can be used in their organisation and the main reason for developing a component rather developing the whole system. In your answer, highlight the following issues: Factors which needs to be considered during CBSE Discuss the CBSE process The ideal components composition to be used at JB Company. Support your answer.