Migrating from ASP to ASP + -- initial considerations (1)
Source: Internet
Author: User
It includes the configuration of the running platform, the establishment of pagelet, the use of new ADO +, how to use the new DataSet for data access, and the transformation from HTML tables to DataList, and other new server-side controls ...... What are you waiting? Now let's take a look at the New charm of ASP + !)
Since Microsoft announced ASP + at its July 2000 Professional Development Conference, a same problem has plagued many news groups and discussion forums: "How do I convert an existing web application from ASP to asp +?" A spokesman for the professional development conference said: The entire conversion process is not too difficult because there is no need to make major changes to the code. Is that true? In this article, we will explore.
To run the alpha version of ASP +, you need:
Windows 2000 Professional server or Advanced Server
IIS5.0
Internet assumer5.5
. Net Framework Runtime (. Net Framwork Runtime)
(ASP + will be available on windows NT and 9x in the future)
If you are an ASP developer, your current skills such as VBScript will be easily converted to Visual Basic. Net for your ASP + page
Write code. You may also use other languages such as C #, Managed C ++, or even Cobol.
In this article, I will introduce the detailed steps required to upgrade a small web application from ASP to ASP +. The sample code uses Visual Basic. Net.
Although ASP and ASP + can interact with each other, we still choose to migrate the entire site to ASP +. A sample site is migrated to demonstrate entry-level web development. We think this site represents a considerable number of typical medium and small websites on the Internet. The site is: http://www.codejunkies.net/eVille/, which is a virtual admissions site, enroll students will learn IT-related courses. The website is deployed on the Windows Server and is driven by the Access2000 Database. It uses VBScript, client JavaScript, and ASP3.0, but does not use COM.
On the same WEB server running IIS5.0, ASP and ASP + are designed to support parallel running (the final release version will support other versions of IIS ). This means that we can migrate the entire site one page at a time. The initial page can still run under ASP3.0, and the new page will be converted into ASP + Server controls and functions.
The first step is to enable IIS to use default. aspx as a valid default file. This step is quite simple in Internet Service Manager:
* Open the 'properties' dialog box in the IIS virtual directory.
* Click the Add button in the 'File' tab.
* Enter Default. aspx.
* Click "OK" twice.
The eVille site used in the example does not use COM, so all data access is done through ADO in ASP or include files. One of our initial goals is to convert ADO into ADO + to achieve better execution results brought by ADO + Managed Provider. ASP + supports the use of traditional ADO, but migration to ADO + will benefit more. For example, you can obtain multiple tables from a single DataSet to bind data to a server control for faster execution. You can use ADO, ADO +, or SQL Managed Provider to access data on the ASP + page. Since the sample site does not use SQL Server, and we want to optimize the execution, ADO + has become our best choice.
Every page on this site involves data access, so it will account for the largest proportion in the conversion project. Basically, some code must be modified on each page to obtain and display the data required for this page. There is a connect. inc file in the eVille structure, which contains the ADO Connection code and each page contains the file. The connection has been established and can be used. In ASP +, the process of connecting to the database and binding to the ASP + data control is completed by the new Page_Load event. Now we have to adopt a slightly different method.
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