Layered development of a---software system

Source: Internet
Author: User

Three-tier architecture diagram:

three layers introduced :

UI layer: The presentation layer is responsible for displaying the contents of a page or form

The BLL layer: The business logic Layer handles business logic, but it acts as an isolation

The DAL layer: The data access layer deals with data and gets or modifies data from the data

Model Layer: Solid layer

How to actually use the three-tier architecture to complete programming in re-programming:

Analytical:

1, build three-storey architecture, everyone's habits are different, recommend everyone from the bottom of the model layer, the next is the DAL layer, if we need to change the namespace, then change the system automatically generated Class.cs delete, right click on the DAL layer to complete the generation

2, Next, after creating the Ui,ui, add a reference to the DAL layer, if everyone vs with 2012, then the point solution then tick the corresponding DAL layer name, and then OK

3, by using the keyword, the introduction of the Namespace!

4. Regenerate the UI layer

Sqlelper Class Introduction

Why introduce the SqlHelper class?

Analytical:

Because we want to improve work efficiency, in a short period of time to quickly put data into the database, only need to provide users with a SQL statement to

APP. Config file is introduced

APP. Config is a configuration file that must be added at the UI level, but we know that Sqlhelp was created at the DAL layer. In the Sqlhelp class, with ConfigurationManager to parse app. config, it is necessary to forget the introduction of namespaces, under the. NET assembly, there is a System.Configuration namespace

Multi-path anomaly capture

Three reasons for abnormal appearance:

1. Code error: Including logic error

2. Resource unavailable: Error caused by unauthorized access to the system

3. Common language Runtime: there is an internal error caused by the CLR

Two. NET exception handling mechanism

1, one is the exception that is thrown by the client program execution, derives from the ApplicationException class.

2. The other is an exception thrown by the public voice runtime, derived from the SystemException class.

Layered development of a---software system

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.