Architecture Model memo

Source: Internet
Author: User

I am about to find a job after graduation, and I have forgotten many other things. I will make it easy for me and my friends. If you have good information, hope to share with me!

** Blackboard mode **

The blackboard mode is a common architecture model. Different Data Processing logics in applications affect each other and collaborate to complete data analysis and processing. As if multiple different experts exchange ideas on the same blackboard, each expert can obtain information written by other experts on the blackboard, you can also use your own analysis to update information on the blackboard, thus affecting other experts.
Common implementation modes in practical applications include:
A Exploitation Database
Using the database as a blackboard, different applications share information in the database and can update data information. This is also the most common implementation method.
Features:
1. It facilitates information query, filtering, and statistics. In this regard, relational databases provide powerful support for SQL 92.
2. It cannot be used in environments with high real-time requirements. This implementation works in the PULL mode, and high-frequency database access can cause serious system performance problems.
B. Use the publish-subscribe Mode
This implementation usually uses message queue as the blackboard. The queue works in Topic mode, and experts act as the subscribers of the queue. At the same time, messages can be sent to the queue and the messages will be sent to all subscribers. The above process enables information exchange between experts.
Features:
1 can be effectively applied to systems with high real-time requirements. This implementation works in the "Push mode.
2. It is difficult to achieve Statistical Analysis of Information. Unlike the implementation method 1 that can be supported by SQL, these tasks must be completed by developers themselves.

** MVC mode (Model-View-Controller )**


The user interface, especially the graphical user interface, plays a role in displaying the problem model to the user and performing operations and I/O interaction with the user. Users want to maintain relatively stable interactive interfaces, but want to change and adjust the displayed content and format as needed. For example, different interface standards or display effects must be supported to meet different operation requirements. This requires that the interface structure can be adjusted by the user without changing the functions and models of the software.

To achieve this, from the perspective of interface composition, the difficulty lies in how to make the software computing model independent of the Interface Composition while meeting the interface requirements. Model-View-control (MVC: Model-View-Controller) is a structure organization Model of the interactive interface.

For the requirement of Interface Design variability, MVC divides the composition of the Interaction System into three parts: model, view, and control.

The model component is the internal abstraction of the problem logic processed by the software independent of the external display content and form, and encapsulates the computing relationship of the core data, logic, and functions of the problem, it is independent of specific interface expressions and I/O operations.

The view component displays the information and specific forms of model data, logical relationships, and statuses to users. It obtains the display information from the model and can have multiple different display forms or views for the same information.

The control component is used to process the interaction between users and software. Its responsibility is to control the propagation of any changes in the model and ensure that the user interface corresponds to the relationship between models. It accepts user input, the input is fed back to the model to control the calculation of the model. It is a part of the coordination between the model and the view. A view usually has a controller.

The separation of models, views, and controllers allows a model to have multiple display views. If you change the model data through the controller of a view, all other views dependent on the data should reflect the changes. Therefore, the Controller will notify all views of the changes at any time, resulting in display updates. This is actually a model change-propagation mechanism.

Implementation:

Analyze Application Problems and separate systems

Analyzes Application Problems and separates kernel functions, controls input of functions, and outputs of the system. Design model components to encapsulate kernel data and computing functions, provide access to and display data operations, and provide operations to control internal behaviors and other necessary operation interfaces. The above forms the data structure and computing relationship of the model class. The composition of this part is closely related to specific application problems.

Design and implement each view

Design the display form of each view. It obtains data from the model and displays them on the screen.

Design and implement each controller

For each view, specify the response time and Behavior for user operations. Under the influence of the model status, the Controller accepts and interprets these events in a specific way. The initialization of the controller establishes a connection with the model and view, and starts the event processing mechanism. The specific implementation method of the event processing mechanism depends on the work platform of the interface.

Use a installable and detachable Controller

The availability and uninstallation of the controller bring higher degrees of freedom and help to form applications with high flexibility. The separation of controllers and views supports the flexibility of Combining views with different controllers to achieve different operation modes, such as read-only views created for common users, professional users, or no controllers. This separation also provides a way to integrate new I/O devices in applications.

Similar Structure PatternThere are also PAC (Presentation-inform action-Control), Forward-Receiver, Publisher-Subscriber, and various visual user interface controls.

Specifically, the "representation-abstract-control" structure mode (PAC) is also proposed from the processing of data models and their differentiated relationships. The representation corresponds to the view, the abstraction corresponds to the model, and the control corresponds to the control. In essence, there is no big difference between the two. However, MVC and PAC are different.

(1) MVC control focuses more on user I/O processing on the view, while PAC control mainly refers to the transfer and coordination from abstraction to representation.

(2) In addition, PAC divides the system into a collaborative but loosely coupled intelligent body, while MVC is dedicated to handling interactive interfaces, and the associations between components are closer.

(3) In terms of architecture, PAC belongs to the system level, because the problems it solves are more inclined to coordinate and associate between systems and components.

 

 

 

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.