Design excellent system with asp.net (i.)

Source: Internet
Author: User
Tags iis microsoft sql server visual studio
Asp.net| Design Welcome to the "ASP.net world". Over the next few weeks or months, this series of articles will provide step-by-step details on how to design, implement, and deploy a typical WEB application using Microsoft ASP.net and Microsoft Visual Studio.NET. To explore some of the most common factors in the practice of practical application creation. We're not just setting up some Web forms, it's not limited to just some data binding on the back-end database. Data binding and Web forms layout are important, but there are a number of other issues that are important.

For example, regardless of the target platform or language, all well coded projects include basic planning steps, such as goal statements, user scenario documents, and even architectural documents that identify the physical and logical boundaries of the solution. In addition, it is a good practice to include security planning early in the solution lifecycle. Together with a good database model, well-designed middleware components, and a concise user interface design, this content ensures that the applications you end up deploying in production are secure, reliable, and user-friendly.

At this point, some readers may think that this article belongs to some of the most keynote articles, targeting at some very large enterprise-class solutions that do not apply to ordinary small factories, enthusiasts or individual development groups. Not really! Even if you're just creating a small, web-based solution for your own personal use, a well-developed plan from the start will help ensure that the process is ultimately easy to implement and deploy. Also, it is not advanced programmers or WEB developers who can use these technologies. Regardless of your skill level or your target audience, I'm sure you'll find this series of articles helpful, providing you with a wealth of information and a lot of fun.

We will build a sample repository Web application called DotNetKB, which will run through the entire series of articles. In the first part of this topic, we will cover the design phases of a typical project, including basic planning, application architecture, and implementation design. By the end of this article, you'll have all the documentation ready and you'll be eager to start creating the solution. The second section discusses in detail how to create a data storage tier using Microsoft SQL Server 2000 and Microsoft Visual Studio. NET 2003. This includes creating a database (adding tables, indexes, constraints, and relationships) and writing stored procedures for accessing data. We will also discuss security issues related to SQL Server, Internet Information Server (IIS), and asp.net. By the end of the second section, we will have a fully functional and secure data storage system for the DotNetKB solution.

The preparation is very simple, we skip this part and go directly to the first step of "Application planning."

The first part: application Planning and Design

Available for: Microsoft asp.net

(i) Planning basic asp.net applications

The first step in creating a web-based asp.net application using Visual Studio. NET is to develop a basic application plan (AP). Planning is essential not only for large solutions built by multiple developers, but even for the smallest applications, a sophisticated AP is important. Creating an AP helps you to think about some common problems before you start coding "before". This allows you to fully understand the challenges and solutions in the early stages of the application lifecycle, rather than finding problems after a total embarrassment.

Two Asp. NET application architecture and security planning

With the basic purpose and the list of user scenarios developed for the solution, you need to start planning the overall architecture. The primary goal is to identify the logical and physical aspects of the application, that is, how to split the application into various useful parts. The security aspect is also added to this section. Security is the problem you need to consider at the start of planning, not the "last additions" in the development cycle. We will discuss this issue in detail later in this section.

(iii) talking about the design of asp.net planning stage

It is important to take a moment to actually sketch out the logical components of your application before you go directly to the coding part of the project. In our sample solution, we want to implement the three logical components of the solution: the database, the. NET data access component, and the ASP.net user interface. Now, let's sketch out the outline of each component and discuss the most important aspect of the process, namely, the interaction between the documented components.

Part Two: Creating a data storage tier using SQL Server 2000

Apply to:

Microsoft asp.net
Microsof Visual Studio. NET
Microsoft SQL Server 2000

(i) Create a database diagram using visualstudio.net2003

One of the many advantages of Visual Studio. NET 2003 is that users can use it as a primary SQL Server editor to accomplish most tasks. Once you have the appropriate permissions for the target database server, you can easily create various databases, tables, indexes, constraints, relationships, views, stored procedures, and features by using Visual Studio. NET 2003.

(ii) Writing stored procedures using visualstudio.net2003

A datasheet defines how data is stored in a database, but does not specify how data is accessed. We also need to understand the read and write records to call the details of the selected rows and columns from the table again. Using stored procedures can improve the performance of your solution and make it more secure. In addition, using stored procedures can increase the level of abstraction of the data tier, protecting other parts of the solution from the impact of small data layouts and formatting changes. This makes your solution more reliable and easier to maintain.

Three IIS, ASP. NET and SQL Server security issues

SQL Server, Internet Information Server, and the ASP.net engine all provide a solid and reliable security model that works well together. Because of the three types of services involved (SQL Server, IIS, and ASP.) NET), three key steps are required to ensure the security of the solution. This section discusses a more common (and reliable) way to set sufficient permissions and trust levels for WEB applications.

(iv) Create ASP.NET test pages and generate source code and installation scripts

Creating a test page is always a good way to access the SQL Server data tier and verify that input and output parameters are handled correctly. We can also use Visual Studio. NET to generate source code for the entire database tier, including making tables and indexes, authorizations, stored procedures, and so on, and to generate a command-line script that can be used to install these database objects on an existing SQL Server.

Summary:

This symposium has a lot of content. Includes how to do asp.net application planning and design, how to create a database project using Visual Studio. NET 2003, how to create a new database and a database diagram that defines tables, indexes, constraints, and relationships, and also describes the use of Visual Studio. NET 2003 Add stored procedures and custom functions that can access data stored in the table. Learning from this topic, you also learned how to use a custom Windows account and Web.config file settings in IIS and WEB applications to establish a reliable trust relationship between SQL Server and your asp.net solution. The topic also concludes with an example of a test Web form for validating data-tier programming, and how to generate T-SQL scripts and command-line scripts that can be used to install the completed data tier on any target SQL Server.

You may have noticed that the storage and re-invocation procedures for expert records are not covered in the relevant discussions of the database layer. This is because I decided to replace it with an XML file. In this way, we can take this opportunity to learn how to use XML as a data source and how to combine this data format with SQL Server data to create a complete solution. In the next issue of related topics, we will define the XML storage format and read and write the component layer of this data, but also learn about XML serialization and asp.net in the built-in data caching services related knowledge, please pay attention!

Related Article

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.