SOFTWARE ENGINEERING DESIGN WITH COMPONENTS Design with reuse designs and develops a system from reusable software. Reusing software allows achieving better products at low cost and time. LEARNING OBJECTIVES To explain the benefits of software reuse To discuss several different ways to implement software reuse To describe the development of software product lines. REUSE Design Reuse is the building of software from reusable. In most engineering disciplines, systems are designed by composing existing that have been used in other systems. To achieve better software, more quickly and at lower cost, we need to adopt a design process that is based on systematic reuse. REUSE-BASED SOFTWARE ENGINEERING Reused based software engineering can be categorized as the following: Application system reuse Component reuse Function reuse
Application System Reuse The whole of an application system may be reused either by incorporating it without change into other systems (COTS reuse) or by developing application families. Widely practised as software systems are implemented as application families and COTS reuse is becoming increasingly common. Component Reuse Components of an application from sub-systems to single objects may be reused. Component reuse is seen as the key to effective and widespread reuse through component based software engineering. Component reuse must allow easy access and retrieval to the, the component size must be suitable and the functionalities must be easy to comprehend. Function Reuse Software that implement a single well-defined function may be reused. Function reuse is common in some application domains (e.g. engineering) where domain-specific libraries of reusable functions have been established. BENEFITS OF REUSE Increased reliability - Components exercised in working systems are tried and tested under real conditions Reduced process risk -Less uncertainty in development costs. Effective use of specialists The are reused instead of application experts develop instead of repeating the same on multiple projects. Standards compliance - Embed standards in reusable (e.g. menu format). Accelerated development - Avoid original development and hence speed-up production which may reduce testing time as well. REQUIREMENTS FOR DESIGN WITH REUSE The requirements for design with reuse comprises of the following: It must be possible to find appropriate reusable
The re-user of the component must be confident that the will be reliable and will behave as specified. The must be documented so that they can be understood and, where appropriate, modified. REUSE PROBLEMS The challenges encountered during reusing of are as follows: Increased maintenance costs - If source code of is not available, then other parts for modification must be engineered around the which are inflexible Not-invented-here syndrome - Some developers resist reuse due to matter of trust, and question of creativity Lack of tool support Maintaining a component library as an effective library for reuse can be difficult and expensive Finding and adapting reusable GENERATOR-BASED REUSE Program generators involve the reuse of standard patterns and algorithms.these are embedded in the generator and parameterised by user commands from which a program is then automatically generated. Generator-based reuse is possible when domain abstractions and their mapping to executable code can be identified. A domain specific language is used to compose and control these abstractions. Types of Program Generator Application generators for business data processing Parser and lexical analyser generators for language processing Code generators in CASE tools REUSE THROUGH PROGRAM GENERATION Reuse through program generation involves obtaining a well defined application description which contains the details of the application. The application domain knowledge is
gathered, the description and knowledge are fed into the program generator which automatically generates the program which has access to the database. Application description Program generator Generated program Application domain knowledge Database COMPONENT-BASED DEVELOPMENT Component-based software engineering (CBSE) is an approach to software development that relies on reuse. Components are more abstract than object classes and can be considered to be stand-alone service providers. Components provide a service without regard to where the component is executing or its programming language. Components can range in size from simple functions to entire application systems and are independent very loosely coupled. Components are encapsulated to wrap functionalities. The are obtained from the repositories which are composed to develop a component based system COMPONENT INTERFACES Component interface provides the interaction between of a system. A component encompasses two functionalities in terms of interface: Provides interface It defines the services that are provided by the component to other
Requires interface It defines the services that specifies what services must be made available for the component to execute as specified. Requires interface Component Provides interface Example: Printing Services Component Requires interface PrintService Provides interface GetPDfile PrinterInt Print GetQueue Remove Transfer Register Unregister Requires GetPDFile to get printer description file for a printer type, and PrinterInt to transfer commands to a specific printer Provides Print, GetOueue, Remove, Transfer, Register and Unregister. COMPONENTS DIFFERENT LEVELS OF ABSTRACTIONS Components posses different levels of abstraction as follows: Functional abstraction- The component implements a single function such as a mathematical function Casual groupings - The component is a collection of loosely related entities that might be data declarations, functions, etc. Data abstractions- The component represents a data abstraction or class in an objectoriented language
Cluster abstractions - The component is a group of related classes that work together (sometimes called a framework) System abstraction - The component is an entire self-contained system. Provides interface is the so-called API (application programming interface) CBSE PROCESSES The system requirements are modified to reflect the that are available. CBSE usually involves a prototyping or an incremental development process with being glued together using a scripting language. The process involves designing the system architecture. Based on the architecture the are specified, the suitable that can be reused are determined and are incorporated in the architecture for the development of component based software development. Design system aachitecture Specify Search for reusable Incorporate discovered DEVELOPMENT WITH REUSE The development with reuse methodology involves establishing a well defined outline of the system requirements. The requirements are analysed and the that can be reused are determined and selected. Based on the selected the requirements are modified and the architectural system is well established. The reusable are determined and the are specified based on the reusable that are suitable for development of the system. The specified are later incorporated in the development of the system. Outline system requirements Search for reusable Modify requirements accor ding to discovered Architectur al design Search for reusable Specify system based on reusable
CBSE PROBLEMS The challenges that are encountered during component based software development are as follows: Component incompatibilities may mean that cost and schedule savings are less then expected. Finding and understanding. Managing evolution as requirements change in situations where it may be impossible to change the system. APPLICATION FRAMEWORKS Frameworks are a sub-system design made up of a collection of abstract and concrete classes and the interfaces between them. The sub-system is implemented by adding to fill in parts of the design and by instantiating the abstract classes in the framework. Frameworks are moderately large entities that can be reused. The framework classes include: System infrastructure frameworks. Middleware integration frameworks. Enterprise application frameworks. System Infrastructure Frameworks System infrastructure framework supports the development of system infrastructures such as communications, user interfaces and compilers. Best developed of these three is particularly for GUI.
Middleware Integration Frameworks Standards and classes that support component communication and information exchange encompass middleware integration framework. Examples CORBA, COM, DCOM, JavaBeans. Enterprise Application Frameworks Enterprise Application Frameworks supports the development of specific types of application such as telecommunications or financial systems. Extending Frameworks Frameworks are generic and are extended to create a more specific application or sub-system. Extending the framework involves Adding concrete classes that inherit operations from abstract classes in the framework. Adding methods that are called in response to events that are recognised by the framework (call backs). MODEL-VIEW CONTROLLER Model-View Controller provides a system infrastructure framework for GUI design. It allows multiple presentations of an object and separate interactions with these presentations. MVC framework involves the instantiation of a number of patterns.
The controller possesses the application logic which process the users request and gets appropriate response. View provides the visual design and model comprises of the database, sometimes these can be xml or even text files. COTS PRODUCT REUSE COT is the acronym for Commercial Off-The-Shelf systems. COTS systems are usually complete application systems that offer an API (Application Programming Interface). Building large systems by integrating COTS systems is now a viable development strategy for some types of system such as E-commerce systems. Component Reusability Component reusability should reflect stable domain abstractions such as fundamental concepts in the application domain that change slowly e.g. bank accounts, univ students. It should hide state representation and be as independent as possible. Component reusability should publish exceptions through the component interface; different applications will have different requirements for exception handling and the applications handle them rather than trying to handle them in the component.
Reusability Enhancement Name generalisation - Names in a component may be modified so that they are not a direct reflection of a specific application entity. Operation generalisation- Operations may be added to provide extra functionality and application specific operations may be removed Exception generalisation- Application specific exceptions are removed and exception management added to increase the robustness of the component Component certification - Component is certified as reusable Initial component Reusable component Name generalization Operation generalization Exception generalization Component certifica tion