How to write a good ASP application

Source: Internet
Author: User
Tags include require what is asp
How to create robust, accurate, maintainable, and performance-Good ASP applications? What do you want to do? Not doing what? In this paper, the main check-points (check point) is given in the form of outline.

What is ASP

Active Server Page, abbreviated as ASP, is:

L Connect user Interface (HTML) and business logic (Business Logic);

• Provide consistent, easy-to-use, stateful, web-based clients;

• Provide an application environment for Web applications that require transactional processing.

ASP is not:

• Where business logic is implemented (Business Logic); Business logic should be implemented through COM +, MTS, or the database.

Users of ASPs should have the following lessons:

• Develop applications, rather than developing an orphaned ASP page;

• Caching of inputs and outputs;

• test before release;

L Selective and good components;

• Reduce access to the database: The result of a cached transformation;

• Use of MSMQ to handle work with time delays;

Site design
What do you want to provide for your site?

U Information Architecture: 80/20 guidelines;

U site navigation;

U page layout;

U usability;

N use alt and title attributes;

n Do not use the image or image map navigation;

You are suitable for most of the lower-version browsers, considering their support for ActiveX, RDS, XML, DHTML, Java applets;

U screen resolution and number of screen colors

Does n support WebTV, PDA ...?

n Sets the width and Height properties of the IMG.

U non-browser access, such as Automatic Robot (Spider);

U using frames (frame)?

u use cookies for personalization;

U avoid bad connections;

u use META tags;

U content audit;

U content search;

U results Feedback: User feedback and tracking;

u reduce download time;

Three-layer, four-storey application design



Readability, maintainability
u use annotations;

u use <%option explicit%>; in VBScript scripts

U Store SQL strings using string variables: Easy to debug;

u use Server.MapPath and relative paths;

u use Adodb.inc or <!-metadata typelib=somelib file=somedll--> to refer to constants instead of using constant values directly.

U Specify the default parameters of ADO calls to avoid errors;

U use libraries or parts to encapsulate code.



The right approach:

u use Server.URLEncode

U error capture and handling

Internationalization:

u use <%CodePage%>

u use Session.CodePage

U in IIS5.0, Response.Write support UTF8

Other:

U reuse code with #include

U Use paging technology

Site Security:

U Customer Authentication

U Input Validation

U #include file do not use. Inc suffix, use. ASP or settings. Inc Application Mappings

U store MDB files in a non-web path;

U do security management with ADSI



Session and Application Status
Use of Session:

U is very convenient to use but very problematic;

U HTTP is a stateless protocol;

U design Shopping carts are particularly useful;

U is not conducive to scalability design (scalability);

u use <%EnableSessionState=false%> in pages that do not require session

U avoid using session as completely as possible;

U is not suitable for multiple Web server situations;

U some parts enable session to run in a single threading mode, reducing throughput;

u consumes memory;

U &n



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.