1. Trang chủ
  2. » Công Nghệ Thông Tin

Sử dụng lại trong phần mềm

46 246 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 46
Dung lượng 562,34 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Tài liệu này dành cho sinh viên, giáo viên khối ngành công nghệ thông tin tham khảo và có những bài học bổ ích hơn, bổ trợ cho việc tìm kiếm tài liệu, giáo án, giáo trình, bài giảng các môn học khối ngành công nghệ thông tin

Trang 1

Software Reuse

Bài 7: Sử dụng lại trong phần mềm

Trang 3

Topics covered

 The reuse landscape

 Design patterns

 Generator based reuse

 Application frameworks reuse

 Application frameworks reuse

 Application system reuse

Trang 4

Reuse of software vs other engineering

Most engineering disciplines

 Systems are designed by

composing existing

components that have been

used in other systems.

used in other systems. need to adopt a design

process that is based on systematic software reuse

 to achieve better software, more quickly and at lower cost,

Trang 5

Reuse-based software engineering

 Application system reuse

 The whole of an application system may be reused

 by incorporating it without change into other systems (COTS reuse)

by developing application families.

 by developing application families.

 Component reuse

 Components of an application from sub-systems to single objects may be reused (Chapter 19.)

 Object and function reuse

 Single well-defined object or function may be reused

Trang 6

Reuse benefits

Increased

dependability

• Has been tried and tested in working systems

• Design and implementation faults are fixed, thus

reducing the number of future failures when reused

Reduced

process risk

• Costs of reusing lower than costs of development

• Easier for project cost estimation

process risk • Easier for project cost estimation

Standards

compliance

• User interface standards, can be implemented as a

set of standard reusable components

• Improves dependability as users when use a

familiar interface.

Accelerated

development

• Speed up system production because both

development and validation time should be reduced.

Trang 7

Reuse problems

Increased

maintenance costs

• Maintenance costs may be increased as the reused

elements of the system may become increasingly incompatible with system changes.

Lack of tool support • CASE toolsets may not support development with

• Maintain a reusable component library and ensuring

the software developers can use it can be expensive.

Managing reusable

components

• Software components have to be discovered in a

library, understood and, sometimes, adapted to work in a new environment.

Trang 8

The reuse landscape

 Many different approaches to reuse

 Not only system components

 From simple functions to complete application systems

 The reuse landscape covers the range of possible

 The reuse landscape covers the range of possible

reuse techniques

Design patterns Component

frameworks

Application product lines Aspect-

oriented Component

based Program

Program generators Service-

oriented

Program libraries

Legacy system wrapping

Configurable applications

Trang 9

Reuse planning factors

 Which reuse technique to use?

 The development schedule for the software

 The background, skills and experience of the

development team

 The criticality of the software and its non-functional requirements

 The application domain

 The execution platform for the software

Trang 10

Concept reuse

 Concept reuse described by

 more abstract

 an implementation independent way

 Two main approaches

 Two main approaches

 Design patterns

 Generative programming

Trang 11

Design patterns

 A pattern is a description of the problem and the

essence of its solution

 It should be sufficiently abstract to be reused in

different settings

 Patterns often rely on object characteristics such as inheritance and polymorphism

Trang 12

Pattern general structure

Trang 13

Eg multiple displays

Trang 15

The Observer pattern

Trang 16

Generator-based reuse

 Standard patterns and algorithms are embedded in

the generator and parameterised by user commands

 A program is then automatically generated

 Possible when domain abstractions and their mapping

 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

Trang 17

Types of program generator

 Types of program generator

 Parser and lexical analyser generators for language processing;

 Code generators in CASE tools.

 Generator-based reuse is very cost-effective but its

applicability is limited to a relatively small number of application domains

 It is easier for end-users to develop programs using

generators compared to other component-based

approaches to reuse

Trang 18

Reuse through program generation

Trang 19

Aspect-oriented development

 Addresses a major software engineering problem - the

separation of concerns

 Concerns are functionality but are cross-cutting

 E.g all components may monitor their own operation

 E.g all components may monitor their own operation

 All components may have to maintain security.

 Cross-cutting concerns are implemented as aspects

and are woven into a program

 The concern code is reused and the new system is

generated by the aspect weaver.

Trang 20

Aspect-oriented development

Trang 21

Application frameworks

 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

 The sub-system is implemented by

 Adding components to fill in parts of the design and

 Instantiating the abstract classes in the framework.

 Moderately large entities that can be reused

Trang 22

Types of application frameworks

 System infrastructure frameworks

 Support the development of system infrastructures

 Eg communications, user interfaces and compilers

 Middleware integration frameworks

 Middleware integration frameworks

 Standards and classes that support component

communication and information exchange

 NET, Java Beans, CORBA

 Enterprise application frameworks

 Support the development of specific types of

application

 E.g telecommunications or financial systems.

Trang 23

Extending frameworks

 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.

 Problem with frameworks is their complexity

 It takes a long time to use them effectively

 Expensive to software development processes

Trang 24

Eg Model-view controller

 System infrastructure framework for GUI design

 Allows for multiple presentations of an object and

separate interactions with these presentations

 MVC framework involves the instantiation of a number

 MVC framework involves the instantiation of a number

of patterns (as discussed earlier under concept reuse)

Trang 25

Model-view-controller

Trang 26

Application system reuse

 Reuse of entire application systems

 By configuring a system for an environment

 By integrating two or more systems to create a new application.

 Two approaches covered here:

 COTS product integration;

 Product line development.

Trang 27

COTS product reuse

 COTS - Commercial Off-The-Shelf systems

 COTS systems are usually complete application

systems that offer an API

 Building large systems by integrating COTS systems is

 Building large systems by integrating COTS systems is

now a viable development strategy for some types of system such as E-commerce systems

 The key benefit is faster application development and, usually, lower development costs

Trang 28

COTS design choices

 Which COTS products offer the most appropriate

functionality?

 There may be several similar products that may be used

 How will data be exchanged?

 How will data be exchanged?

 Individual products use their own data structures and formats

 What features of the product will actually be used?

 Most products have more functionality than is needed

Trang 29

E-procurement system

Trang 30

COTS products reused

 On the client, standard e-mail and web browsing

programs are used

 On the server, an e-commerce platform has to be

integrated with an existing ordering system

 This involves writing an adaptor so that they can

exchange data

 An e-mail system is also integrated to generate e-mail for clients This also requires an adaptor to receive data from the ordering and invoicing system

Trang 31

COTS system integration problems

 Lack of control over functionality and performance

 COTS systems may be less effective than they appear

 Problems with COTS system inter-operability

 Different COTS systems may make different

 Different COTS systems may make different

assumptions that means integration is difficult

 No control over system evolution

 COTS vendors not system users control evolution

 Support from COTS vendors

 COTS vendors may not offer support over the lifetime

of the product

Trang 32

Product lines (application families)

 Applications with generic functionality that can be

adapted and configured for use in a specific context

 Adaptation may involve:

 Component and system configuration;

 Component and system configuration;

 Adding new components to the system;

 Selecting from a library of existing components;

 Modifying components to meet new requirements.

Trang 33

Product lines specialisation

Trang 34

Product lines configuration

 Software product lines are designed to be

reconfigured

 Add/remove components

 Define parameters, constraints, business processes

 Reconfigure at two points:

 Deployment time configuration

 A generic system is configured by embedding knowledge of the customer’s requirements and business processes

 Design time configuration

 A common generic code is adapted and changed according

to the requirements of particular customers

Trang 35

ERP system organisation

Trang 36

ERP systems

 An Enterprise Resource Planning (ERP) system is a

generic system that supports common business

processes

 Ordering and invoicing, manufacturing, etc.

 Widely used in large companies

 represent the most common form of software reuse

 The generic core is adapted by including modules and

by incorporating knowledge of business processes and rules

Trang 37

Design time configuration

 Software product lines that are configured at design

time are instantiations of generic application

architectures as discussed in Chapter 13

 Generic products usually emerge after experience with

specific products

Trang 38

Product line architectures

 Architectures must be structured in such a way to

separate different sub-systems and to allow them to

be modified

 The architecture should also separate entities and

their descriptions and the higher levels in the system access entities through descriptions rather than

directly

Trang 39

A resource management system

Trang 40

 The database includes equipment, vehicle and map

databases.

Trang 41

A dispatching system

Trang 42

Product instance development

Trang 43

 Elicit stakeholder requirements

 Use existing family member as a prototype

 Choose closest-fit family member

 Find the family member that best meets the requirements

 Re-negotiate requirements

 Re-negotiate requirements

 Adapt requirements as necessary to capabilities of the

software

 Adapt existing system

 Develop new modules and make changes for family member

 Deliver new family member

 Document key features for further member development

Trang 44

Key points

 Advantages of reuse are lower costs, faster software

development and lower risks

 Design patterns are high-level abstractions that

document successful design solutions

 Program generators are also concerned with software reuse

system

 Application frameworks are collections of concrete

and abstract objects that are designed for reuse

through specialisation

Trang 45

Key points

 COTS product reuse is concerned with the reuse of

large, off-the-shelf systems

 Problems with COTS reuse include lack of control over

functionality, performance, and evolution and

problems with inter-operation

 ERP systems are created by configuring a generic

system with information about a customer’s business

 Software product lines are related applications

developed around a common core of shared

functionality

Trang 46

 Reading

 Design Patterns

 http://en.wikipedia.org/wiki/Design_pattern_(computer_sc ience)

AOP

 AOP

 oriented_programming

http://en.wikipedia.org/wiki/Aspect- What are pointcuts, jointpoint, advices? Give examples?

Ngày đăng: 22/10/2014, 18:54

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w