Did anyone post it? Don't scold me, oh! --Porting ASP code to VB COM component (ext. 1)

Source: Internet
Author: User
DNA Introduction

Author: green Apple Computer Studio
Article Hits: 351



This article is compiled manuscripts, the original source: http://www.asptoday.com/articles/20000121.htm

You have just released the latest huge ASP application to the Web. Files are uploaded correctly to the server, and the link to the application is also
Work well. Before celebrating victory, you want to run some stats on the performance of your application to find out how good it really is. Results
It turns out that applications that worked well in the development environment actually run very slowly.

For people who use Microsoft packages for a short time, DNA represents the distributed internet architecture and is another very popular
An acronym for an n-tier application structure. Microsoft is committed to the development of distributed applications that are spread over the Internet.
Based on this idea, it is not surprising that the future will be the popular small, stateless, modular application.



The above is a typical illustration of an ASP for n-tier environments. Web classes (IIS applications) are not required because the ASP can directly relate to the presentation layer
Or the Business Rules Layer Component dialog. Because most applications are written separately by ASP, a legitimate problem is:

Why do you want to transfer code to a COM component?

In my opinion, ASP is only used to express layer code, so I choose to use business rule logic or any form of data access
are loaded into the COM component. In general, I've split the code of the application into components from the start, but usually you can't choose
Choose the structure you want to deal with, so code porting is a real problem. In an n-tier application, you must try to put the non-statement code
Remove as soon as possible from the ASP.

You may not be doing N-tier programming at the moment, and the appropriate time to migrate your code is when performance starts to weaken. Usually, this means
Your boss said, "The program is running a little slow today" to "you are fired" between this time. Once the user starts complaining, it's too late.

The second guideline for using porting code is when you have enough similar code (such as all data access) to be placed in a containing file
(. Inc) to guarantee a COM component. How many programs are enough? That's a good question! When writing a small MTS component, I
Finding a program is enough to create a COM component. But the COM component of only one program is very rare, so for this
Questions need to be judged. If you write a code that is long enough, you start the pattern development. When you encounter the "dark Side" of the ASP
After that (aka COM component) you will feel the power.



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.