Layer-3 architecture 1 (self-organizing T-phbs)

Source: Internet
Author: User

Based on. NETLayered Architecture of the Platform (I)-Overview

ViewArticleI found that many of my friends are particularly interested in the layered architecture. I just finished my graduation project and specialized research.. NetLayered architecture on the platform. Net"). Through this paper, I have a certain understanding of the layered architecture, so I want to write a series of articles to elaborate on the layered architecture. However, the thesis is too theoretical to be published online, especially for beginners, instead, we will discuss the basic method of layered architecture through a complete case, which will be much more intuitive. I hope that I can learn and make progress together with my friends in the writing process of this article series.

In order to let friends focus on understanding the layered architecture rather than the case itself, I am going to choose a relatively simple message-based system.DemoThe name of this system isNguestbook.

We plan to divide this article series into the following:
1.Summary
2.System Requirement Analysis and database design
3.Architecture Overview Design
4.Entity class implementation
5.Interface Design and Implementation
6.Dependency injection andIOCDesign and Implementation
7.The first implementation of the data access layer --Access +Dynamic generationSQLLanguage
8.The second implementation of the data access layer --Sqlserver +Stored Procedure
9.The third implementation of the data access layer -- Based onNbearFrameworkORMImplementation
10.Implementation of the business logic layer
11.Presentation Layer implementation

Of course, the above is only a preliminary plan, which may be adjusted according to the specific situation during the writing process, but the content is generally the same.

This article series will not explain in detail the technologies used. For more information, see the relevant literature. Before reading this article, you 'd better understand the following technologies:
1. C #Language
2. ASP. NET
3.Design Mode
4.Basic relational database knowledge
5.Basic Principles of software architecture and basic knowledge of Software Engineering
6.Based onNbearFrameworkORMTechnology
7. JavaScript and Ajax
8. ASP. NET AjaxFramework (especially client programming)
9. html, CSS,Standardized Layout

In addition, this article series is based on. Net framework2.0Discuss the Framework Platform,3.5New features of the Platform (suchLINQ,ASP. NET
MVCWill not be discussed,IDEUseVisual Studio
2005, The database will useSqlserver2005 ExpressAndAccess2003.

Based on. NETLayered Architecture of the Platform (II)-Requirement Analysis and database design

In actual projects, requirement analysis and database design are very important. This step will directly affect the development process and quality of the project. In reality, this step requires not only computer experts such as system analysts and software engineers, but also expert participation in related fields.

However, in this article seriesDemoThis is just an example, and its business is extremely simple. Therefore, it is not a real requirement analysis and database design, butDemoThe requirements and databases are listed so far thatDemoHave a general understanding to facilitate the understanding of the development process in subsequent articles.

MSO-font-kerning: 0pt "> requirement analysis: MSO-font-kerning: 0pt ">
MSO-bidi-font-family:; color: #333333; MSO-font-kerning: 0pt "> this project is a message book and its business is extremely simple. The description is as follows.
1. Any visitor can leave a message. After the message is completed, the body is not displayed immediately, but is displayed only after being verified by the Administrator.
2. Any visitor can comment on the message. Comments without verification are not allowed.
3. the administrator can reply to the message (This reply is different from the comment, which is directly displayed under the body and can only have one reply ), you can also delete messages and comments, and verify the messages.
4. administrators are divided into super administrators and common administrators. Only one super Administrator is responsible for adding and deleting common administrators. Common administrators can manage messages and change their logon passwords.

The example of this project is as follows:

Figure2.1,NguestbookUse case diagram

Database Design:
Before designing a data table, identify and determine entities and relationships.
Through requirement analysis, we can observe that the entity of this project includes: Administrator (not including super administrator), comment, and comment. This project has one-to-multiple relationships between messages and comments.

Further, the database tables are designed as follows:

Administrator table (Tadmin)
ID
Int AdministratorID
NotnullPrimary Key, auto-Increment
Name varchar (20)Login NameNotnull
Password varchar (50)Logon PasswordNotnullUseMD5Encryption

Message table (Tmessage) ; color: teal; MSO-font-kerning: 0pt ">
ID int 0pt "> message ID notnull primary key, auto-increment
guestname varchar (20) message holder username notnull
guestemail varchar (100) message recipient email null
content text message content
notnull
time datetime message posting time notnull
reply text reply
null

Ispass varchar (10)Verified?
Notnull

Comment table (T Comment )
Id int CommentID
NotnullPrimary Key, auto-Increment
Content textComment
Notnull
Time datetimeComment posting timeNotnull
Messageid intMessageID
Foreign key

 

 

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.