such as Peng Network. NET three-tier architecture Chapter Three Foundation

Source: Internet
Author: User
Tags md5 encryption

Three-tier architecture:

1. The usual three-tier architecture is the division of the entire business application into: The presentation layer, the business logic layer, the data access layer. The purpose of distinguishing hierarchy is to think of "high cohesion and low coupling".

2. The course explains the relationship between the three layers by explaining the catering management system.

3. The course will take you through the analysis of how the database design, software development of several stages, the use of MD5,

Npoi component How to read and write Excel files, singleton mode create form, three layer how to build, three layer relationship between, handwriting three layer and so on.

I hope you can understand the essence of the three floor after you learn the project.

--------------------------------------------------------------------------------------------------------------- --------

Introduction to the 1th section of the 13-storey project

Main content: Introduction three layer project, three layer how to build, Database design, review ADO Package SqlHelper

Technical points:

1. Analyze requirements and design a reasonable database (based on the paradigm of the database)

The 2.MD5 algorithm encrypts the password

3. Use Npoi to manipulate Excel, import and Export

4. Single-Case mode

Project:

1. Handwritten three layers,

2. Commercial-grade code generator,

3. Transfer values between forms (attributes or fields)

Goal:

1. Do a project, a summary of previous studies, and lay the groundwork for ASP, skilled practice

2. Collaboration between groups to complete team projects

3. Mastering the essence of three layers and the principle of three-layer architecture

4. Through three layers of safe and skilled operation of data in the database

--------------------------------------------------------------------------------------------------------------- --------

Section 2nd: 23-storey Project Introduction

Customer Open Order

Increase consumption

God Checkout

Member Management

Room settings

Commodity Management

Food Order Management

--------------------------------------------------------------------------------------------------------------- --------

Section 3rd: 03 Software development phase and introduction three layer

Phase of software development:

1. Demand Analysis:

Chat with customers, solve problems, design logical models, identify development documents, and identify projects with customers.

Implementation of customer requirements through code language

2. Function Design:

function for modular design, including database

3. Software code:

Code implementation of the function

4. Software Testing:

After the function is complete, let the tester complete the test: including code, performance, exception, etc.

5. Software Maintenance:

Post-processing, yearly maintenance (plus functions, upgrades, etc.)

Introduction to Layer Three: (is a good software architecture, not required)

Interface Layer UI (User Interface)

Business Logic Layer The BLL: logic processing, judging legitimacy, legal data to DAL

Data Access Layer DAL: Working with databases, code that operates on data is written in the DAL layer, typically SQL statements,

The DAL only operates on data, SQL statements, ADO. NET classes should generally only appear in the DAL.

Entity (Model): handles the relationship between three layers,

Ui--bll--dal,model

Business logic Data Entity

                          

Recruiter: Waiter (beautiful, good figure, will say) attract customers: UI

Chef (technically strong, BLL

Buyer (bargaining, would say DAL

Dish (Model)

Customer--Waiter (Request: Tomato scrambled egg), chef (no source material), buyer (sourcing raw materials)

UI BLL DAL Database

        

Relationship: Contact model, all references Model,ui reference BLL,BLL reference Dal

--------------------------------------------------------------------------------------------------------------- --------

4th section: 04 Build three Floor

Other project types, blank solutions

MODEL,DAL,BLL class Library: Rpcater.model,rpcater.dal,rpcater.bll

UI: rpcater

Reference:rpcater reference Model and BLL

     RPCATER.BLL referencing mode and DAL

     Rpcater.dal Reference Model 

App. Config added to the final running project (rpcater)

DAL Operations Database:

Using MySQL, add mysql.data references and system.configuration references

Add Mysqlhelper: public class Mysqlhelper

--------------------------------------------------------------------------------------------------------------- --------

Section 5th: 05 Analysis requirements

The three main paradigms of the database:

Cannot have redundant information in each column (atomicity, no further separation)

There are primary keys in each table

Referencing primary key information for other tables

Requirements Analysis:

Select location à la carte checkout table package member etc

Dining Table---Room---member---product---product category---Order

    Table: ID, number, status, room ID, location Description, submission time, submitter ID, delete identity, remark

T_desks:id,num,state,roomid,region,subtime,subby, Delflag,remark

Room: ID, number, name, type, minimum amount, maximum capacity, submission time, submitter ID, delete identity

t_rooms:id,num,name,roomtypeid,minmoney,maxnum , Subtim E,subby, Delflag

Room Type: id,name

T_roomtypes:

Member: ID, number, name, phone, address, birthday, validity, submission time, author ID, delete identity

Product: ID, number, name, pinyin, price, unit, cost price, inventory, category ID, submission time, submitter ID, delete identity, remark

t_products: Id,num,name, Spell , Price,unit, cost, Stock, CategoryId, Subtime,subby,   Delflag,   Remark

Product Category: ID, name, number, submission time, submitter ID, delete identity, remark

T_categorys:id,name,num,subtime,subby,delflag,remark

    Order Meal:

user table: ID , user name, login name, password, last logon time, Last Login IP , Submit time, remove identity

strong> t_users:id,name, Loginname,password,lastlogintime,lastloginip, subtime,isdel

strong> order form: ID, number, start time, end time, status, Member ID, amount, Submit time, Submitter ID, deleting identity

Intermediate Table: Table and order relationship, ID, strong> table ID, strong> Order ID

     Intermediate Table:Orders andCommodity relations,Id strong> Products strong> ID, strong> order ID

--------------------------------------------------------------------------------------------------------------- --------

6th section: 06 Package SqlHelper Class

Ideas:

Development steps: Login, main interface, member management

Module:

Core business: Login, customer billing, increase consumption, God checkout

CRUD: Member management, room setup, commodity management

Mysql

Material

Package SqlHelper Class

Login Form

Main form

Member Module

......

MD5 encryption

Excel

  

such as Peng Network: http://www.rupeng.com

such as Peng Network. NET three-tier architecture Chapter Three Foundation

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.