"Java and Mode" learning notes (1) - the maintenanceability and reusability of software

xiaoxiao2021-03-06  75

"Java and Mode" learning notes (1)

---- Maintainability and Reuse of Software

Author: Lonely Firefly

For object-oriented software system designs, while supporting maintainability (Reusability) is a core issue.

It has low maintenanceability of a software design, that is, as there is four real reasons for "rotten" as performance requirements:

1. Too stiffity: It is difficult to add a new performance in a software system.

2. Abragility: Modifying a place will cause malfunctions in other places, and break it.

3. Immobility: resulting in only the code you can rewrite, or scrap source code to reach multiplexed.

4. Viscosity: It is difficult to maintain the original intent and framework when maintaining, and seduce the programmer maintained its programmer to take a wrong maintenance plan.

The benefits of software reuse are:

1. Higher production efficiency.

2. Higher software quality.

3. Appropriate use multiplexing can improve the maintenanceability of the system.

The abstraction and inheritance relationship of data makes concepts and definitions can be multiplexed, polymorphisms make the implementation and application can be reused, while abstracting and packaging can maintain and promote the maintenanceability of the system.

The client relies on an abstract interface, not a specific class, which makes a new class with the same interface can replace the old class, and not affect the client, which is a multiplexing of the abstract interface.

The design principles that will be learned later include:

· "Open-CloseD PrinciPle OCP)

· Liskov Substitution PrinciPLE LSP)

· Dependency Inversion PrinciPle Dip

· Interface Isolation Principle (Interface SegRegation PrinciPle ISP)

· Combination / aggregate multiplexing principle (Composition / AGGREGATION Principle Carp)

· Dimit France (LAW OF DEMETER LOD)

The scalability of the system is ensured by OCP, LSP, DIP, and CARP.

The flexibility of the system is ensured by OCP, LOD, and ISP.

The interpolation property of the system is ensured by OCP, LSP, DIP, and CARP.

转载请注明原文地址:https://www.9cbs.com/read-94581.html

New Post(0)