Discuz! NT built an excellent architecture at the beginning of design and development, greatly improving the scalability, scalability and reusability of the software. In addition to discuz! The NT structure is clearer and easier to maintain. It also provides great convenience for users to conduct secondary development and improve Forum personalization. Discuz! NT adopts the following layer-4 structure. Let's briefly introduce it:
Www.chinaz.com
(1) display LayerWww.chinaz.com
The display layer can be designed and modified by the user to display the final web page interface and Forum data. It is particularly worth mentioning that discuz! NT did not select the control mode used by the vast majority of Asp.net programs at the front end, but also implemented a convenient and easy-to-use template mechanism. This template allows webmasters to use HTML (or XHTML) to create templates, which are then created by discuz! The template Conversion Function of NT is converted to the Asp.net page program (that is, aspx) file, which has two advantages:
[Chinese webmaster site]
1) Improved ease of use: Asp.net's ascx file is difficult for those who have not learned Asp.net or do not know its development mode, and discuz! The template mechanism of NT allows users to create an Asp.net Forum interface by simply understanding HTML. the Webmaster can easily and freely design and modify the interface.
Station. Long SITE
2) improved performance: In general, foreground programs use discuz instead of the control mode! The template Conversion Function of NT will significantly improve the performance. For example, discuz! The template Conversion Function of NT does not require data binding, does not need to judge the data source and convert the data type, does not need page controls, avoids the use of viewstate, thus greatly improving the page performance. In addition, the control mode is often designed to provide complete functions. When you only need some of the functions, a large amount of useless code will drag down the page performance.
WWW ^ chinaz ^ com
What's more, discuz! The NT display layer is highly flexible. It supports defining the imported namespace and inserting C # code in the template, so that the display layer can easily insert data from other sets.
Chinaz.com
(2) page Data Processing Layer
Chinaz ^ com
Discuz! The page Data Processing Layer of NT is mainly responsible for processing data input and output on the web page, including checking the validity of user data submission and the data source required by the page program. This layer implements the main requirements of the Forum and completes the functional processes of each page on the foreground. For example, when a user posts a post, the page data processing layer first judges the user permissions and then checks whether the data submitted by the user is valid, finally, call the method in the encapsulation class of the corresponding business object to actually store the user data. China webmaster site
If the webmaster wants users to interact with other programs at the same time during input and output at the front end, they can process them at this layer. For example, a phishing website wants to be in discuz! You can add the fishing rod category option to the personal data of NT users and store it in the user information database of the primary website. Then, you can add the fishing rod category in the front display layer, and then in the page data processing layer, call the method of storing the data into the user information database of the primary website to complete the storage. China National site long site
Discuz! The page Data Processing Layer of NT can access the database, but it is not recommended that developers increase interaction with the database at this layer. The database access is in the Business Object encapsulation layer to be introduced below. Www.chinaz.com
(3) Business Object encapsulation Layer
Webmaster. Station
For forums, users, themes, posts, forum, user groups, and so on all belong to the category of business objects. discuz! NT describes Business Objects as object classes and provides a variety of methods to perform various operations on these objects. For a topic object, you can create, modify, delete, and update a topic in the encapsulation method. discuz! NT uses these methods internally to process topics. Likewise, developers can directly call these methods to implement discuz! The specific operation of NT, instead of having to operate the database on its own.
Chinese Webmaster. Station
(4) database access layer
Chinaz @ com
The database access layer encapsulates access methods for different databases. Currently, discuz! NT has access encapsulation for access and SQL Server databases respectively. For SQL Server users, you can also modify discuz! NT database stored procedures to efficiently meet some specific needs. China National site long site
The discuz! The four-layer structure of NT. In general, the Forum is like a hotel. Forum visitors are guests; the display layer is the dining table and Hall of the hotel, so that guests can eat. The page data processing layer is a waiter, the customer is responsible for receiving the food from the guests and placing orders with the cook. The Business Object encapsulation layer is the cook, which is responsible for preparing the dishes and returning them to the waiter. The database access layer is the purchaser who purchases the raw materials required by the cook; the structure serves as a hotel process or rules and regulations. By improving the division of labor and collaboration among all members, the structure gives the guests a Good dining environment and service.
Station. Long SITE
In addition, whether the developer is using C #, VB.net, or any other language that supports. net, you can directly call the public methods in the above four layers to implement discuz! NT call. With discuz! With the improved open source, more and more developers will be involved in the development. I believe that with our joint efforts, discuz! NT will be improved.
Webmaster. Station
Series of articles: Chinese, Chinese, station, long, and station
Contact discuz! NT management:
Community Desktop client webmaster management new utility
Chinaz
Contact discuz! NT Open Source: free open source code
Grow with users
Contact discuz! NT platform: compliant with ASP. NET platform
Replacing ASP forum software
Chinaz
Contact discuz! NT inheritance: inheritance of discuz! Advantages
Launch of the. NET Forum
China webmaster site
Contact discuz! Functions of NT: Powerful and novel
More Considerate Detail DesignChinaz
Source: http://www.fyis.cn/2007/11/01/%e4%ba%b2%e5%af%86%e6%8e%a5%e8%a7%a6DiscuzNT%e4%b9%8b%e6%9e%b6%e6%9e%84%e7%af%87%e4%bc%98%e8%89%af%e6%9e%b6%e6%9e%84%e6%96%b9%e4%be%bf%e7%bd%91%e7% AB %99%e6%95%b4%e5%90%88%e4%b8%8e%e4%ba%8c%e6%ac%a1%e5%bc%80%e5%8f%91.aspx