Discussion and classification of software models

Source: Internet
Author: User

Architect Peter Alexander said: the model describes the problems that occur in a certain scenario (or scenario) and the corresponding solutions. Gof ("") proposes and describes 23 design modes for the frequently-encountered Design Problems in the object-oriented software field, based on the intention of the mode, the model can be divided into three types: the creation mode for object creation, the structure mode consisting of object combination and encapsulation, and the behavior mode involving the assignment of responsibilities between algorithms and behaviors among objects. large-class design model, it is mainly used to solve the Scalability (elasticity) Problem of OO software design.

We know that software elasticity is only one aspect of the quality of software products. In addition, the quality of software products also includes attributes such as performance, security, availability, usability, and testability, therefore, software design should also consider the problems and Corresponding Solutions (models) in these aspects ). At the same time, the generation of software products also includes demand analysis and development, software architecture design, software coding, software testing, software release and maintenance, etc, therefore, there must be various problems and solutions in these aspects, so there are also models.

Therefore, the software model can be classified from the problem domains involved in the software into the following models:

The software analysis mode, software architecture design mode, software design mode, software coding mode, software testing mode, software release and maintenance mode used for Software Requirement Analysis.

The pattern summarized by the gof four-person group is the pattern of the software design method. It is also called the design pattern and is mainly used in the software field at present.

The model corresponding to each software process must be implemented to the model corresponding to the software quality attribute. For example, the implementation of the software design model to the software quality can be further divided: elastic mode, security mode, performance mode, availability mode, ease-of-use mode, and testability mode. The four-person group gof proposed a model of software elasticity.

Software Architecture modes include: independent components (communication process, Event System (implicit call, explicit call), data stream (batch order, pipeline, and filter ), data-centric (repository, blackboard), Virtual Machine (Interpreter, rule-based system), call/Return (main program and subroutine, object-oriented, hierarchical) and other modes.

In addition, there are also corresponding design patterns for specific aspects of the software, such as the uidesign pattern (dynamicuserinterfacepattern, disablejobrequestswhilerunningjob
), Real-time design mode (scheduledtask), J2EE mode, website design mode, and so on.

Patterns or solutions can also be summarized and modeled by tactics, and usually follow certain design principles. Both tactics and patterns are methods for controlling quality attributes. tactics are more like conceptual representations and must be used in certain situations (scenarios)
It is actually a model. For example, 36 is a model used in the military field.

Software Quality Model:

I. elasticity (including maintainability and scalability) tactics and Models

The design principles for improving software elasticity include: Responsibility Assignment principle and single function principle (SRP), "Open-closed" principle (OCP), Lee's replacement principle(LSP)Interface isolation rules (ISP ),Dependency reversal Principle(DIP)
The dimit Law, the synthesis Reuse Principle, and the Hollywood principle.

Tactics for improving the modifyability include localized modification, preventing chain reactions, and delaying binding time.

Localized modification: semantic consistency (single responsibility), expected changes, encapsulation changes, generalization modules, abstract general services, and possible restrictions.

Prevent chain reactions: hiding information, maintaining existing interfaces (adapters, placeholder programs), limiting communication paths, using arbitration (Database, publishing/subscription mode, MVC/PAC Mode, front, bridge, dispatcher, policy, proxy, factory mode, broker, name server, resource manager ).

Delayed binding time: runtime registration, configuration file, polymorphism, build replacement, and compliance with the defined protocol.

Design Mode: gof Mode

Ii. Security and quality tactics and Models

Design Principle: Minimum privilege Principle

Encryption, verification (correctness and integrity), authentication (account and password, digital signature and certificate, physical and biological features, etc.), authorization, isolation, restriction (exposure, access ), intrusion detection and audit tracking.

Security Mode: facetpattern and caretakerpattern

Iii. Performance (improving system throughput and event handling efficiency) Tactics

Generally, the performance is improved from three aspects: resource requirements, resource management, and resource arbitration.

Resource requirements: improve resource efficiency, reduce computing overhead, manage Event Rate, control sampling frequency, limit execution time, and limit queue size.

Resource Management: Introduce concurrency, maintain multiple copies of computing or data, and add available resources.

Resource Arbitration: Scheduling Policies (FIFO, fixed priority scheduling, dynamic priority, and static scheduling policies ).

General Design Patterns for performance improvement include: cache (localization, pooling), concurrency (process, thread, and time-sharing processing), asynchronous mechanism, pre-processing (pre-compilation, pre-loading, pre-storage, pre-allocation, pre-connection), lightweight load, simplified (use as few code and resources as possible), change time with space, hardware, add available resources. Delayed loading and later binding. Storage optimization, batch storage with dirty tags

Iv. Availability tactics:

Availability tactics include error detection, error recovery, and error prevention.

Error Detection (command/response, heartbeat, exception detection, and handling ).

Error Recovery: including detection and recovery, component re-introduction, detection and recovery (voting, active redundancy (hot restart), passive redundancy (Warm Restart, Dual Redundancy, three redundancy ), spare parts), component re-introduction (shadow operation, status re-synchronization, detection point/rollback ).

Error Prevention (delete, restart, transaction, process monitoring from the service ).

V. testability tactics:

Recording/playback, interface isolation (placeholder program, component replacement), special access route/interface (specially used for testing), internal monitor.

Vi. Usability tactics:

Separate user interfaces

Allows you to proactively cancel, cancel, aggregate, and display multiple views)

Support System initiative: maintain a model of the task, maintain a model of the user, and maintain a model of the system to facilitate predictable operations.

You are welcome to repost the document. Please respect the source of the original article.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.