ASP. NET application programming and design (2)

Source: Internet
Author: User
ASP. NET ApplicationsProgramPlanning and Design (2)
Author: MicrosoftWww.aspcool.comTime: 18:00:47 views:14684

Documented user Solution



There is nothing surprising about the user solution. Generally, they only describe how users interact with applications. The key value of a user solution is to record ideas about how everyone wants the system to run and how the application responds. By completing this process, you will be able to fully understand the data points and functions required to process interactions between users and the system. In other words, writing a complete user solution will help you determine the database, middleware, and user interface elements to be implemented to complete the solution.



Note: Visual Studio. NET Enterprise designer has a very good function, that is, allow you to use Microsoft Visio? Create a user scheme through UML (Unified Modeling Language), and then generate the basic Code . Here, I am not going to discuss these details in depth, but you can go to msdn? Click academic alliance to find an article on this topic. Article Generating. Net Code Using Visio enterprise impact ect's UML by sreedhar koganti.

With the target declaration in the previous section, the following are some sample user solutions for the dotnetkb project.



Search Knowledge Base



Anonymous Users can enter one or more keywords and perform a search. The search returns a list of questions and/or answers containing these keywords. You can lock the keyword search to search for only questions, only answers, or both. The returned List displays the problem and the number of replies and the number of visits by other users. Click the link to return the response (plain text) List in reverse chronological order.



Enter new questions in the Knowledge Base



Anonymous Users can browse the screens used to input new questions to the database for authorized experts to review and reply. You can enter the question title and content, and select to record the question under a topic in a series of topics. Users can also enter their names and related URLs (such as email and web addresses ). The input will be verified to ensure that the required data is included and that all input data will not be attacked by scripts. Once the data has been verified and saved to the database, the user will see a response screen. Thanks for your support and directly connect the user to the home page. In addition, users can also choose to make the site "remember" their names and URLs for future use when visiting the site.



You know how it works, right? Each solution attempts to refine important aspects of user interaction. For example, the two schemes listed above indicate that the user is "anonymous" (anonymous user), which means that such users do not need to log on or perform other authorization methods. The second example also identifies several input values, verification steps, and optional operations.



Of course, this is only two examples; more solutions are required for the complete system. In addition, it is important to note that "users" can be not only people, but also other applications that your program needs to communicate, it can even be another part of your application. For example, a solution describes how the home page lists the content recently added to the knowledge base for anyone to view. In this example, the "user" is the home page itself. There are also some solutions to describe how experts can find and reply to new questions and how administrators can update the topic list and manage other parts of the system. I have identified more than 20 solutions for discussing this simple application. You can find the current list (and all other information related to this project) in dotnetkb ).



So far, we have the target declaration and some user solutions. Now, it's time to take a nap and learn some technologies. We need to define the application architecture, which can help us implement the solution with "vivid and effective code.



Define the application architecture



With the basic purpose and the list of user solutions for solution development, you need to plan the overall architecture. The main goal is to identify the logical and physical aspects of the application, that is, how to split the application into various useful parts. In this section, security is also added. Security is the question you need to consider at the very beginning of the planning, rather than the "Last added" Content During the development cycle. We will discuss this issue in detail later in this section.



Logical architecture



Logically, you need to plan a solution to identify the "boundary" between data storage, data access, business rules, and user interfaces ". Generally, Web developers select a two-phase model and use web forms to store all the code used to access an existing data storage system (such as Microsoft SQL Server. A more effective method is to create an intermediate layer component library between the web form user interface and the SQL server data storage system. This three-tier method (web forms, components, databases) is usually required by most applications. However, in some cases, another layer may be required to process data transmitted between servers. This transport layer can be implemented using platform-independent protocols, such as XML-SOAP. However, if you use Microsoft. NET technology from start to end, you can use the binary version of the. NET remote protocol to complete this task, and the speed is much faster than using the XML-SOAP.



For our example, we will define three logical boundaries: User Interface (web form), middle layer (A. NET Component Assembly), and data layer (SQL Server database ). Figure 1 shows how to represent this content.




Figure 1: Three Layers



Now we have a simple logic model. How does it work? It helps us to consider the boundaries between logical groups. Each logic layer should be independent from other layers as much as possible. Ideally, the changes in the layer should have a minimal effect on the whole. For example, if you change the data storage from SQL Server to an XML data file, the only affected layer should be the intermediate layer. You do not need to consider changing the user interface. This will make you think: How to Implement the actual coding of the solution to achieve this principle.



In addition, the logic layer helps us to consider security issues. The boundaries between layers have potential security vulnerabilities. In addition, each layer may have its own specific security measures (SQL Server permission,. Net runtime permission, ASP. NET security, etc ). Similarly, we will discuss this issue in detail later in this section.

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.