What is the difference between asp+ and ASP

Source: Internet
Author: User
Tags object end new features require requires version xml parser visual studio
asp+ compiling: http://www.aspcn.com flying knife Original from http://www.asptoday.com
See translation headaches, and this article is still very long ah, originally this article will be written very early, but in order to not make the Chinese team delayed a few days, ran to work, or lost ...

In previous articles we realized that asp+ is part of a complete operating system. But why is asp+ different from previous versions of ASP? What's the difference between them? If you're just running a few pages or apps, you may not notice the difference at all.

Once you open the ASP+SDK or Help file, you will find that the new product is almost nothing like the previous version.

Of course you don't have to panic, we'll look at some of the major differences next. Let's take a look at why Microsoft thinks we need a new version of ASP that can help us do it. As a developer, we also need to know what new features it has to help us build sites and apps.

Do we really need a new kind of asp!?
Microsoft has developed asp+ motives we have discussed in the previous article. ASP has made great success, why do we need a new version!? We can consider the following four points:

Today's ASP's can only be written in unstructured languages, such as VBScript and JScript (if you need a separate interpreter in other languages). And when the ASP is first executed, it resolves and stores the code in the cache, which limits their superiority by not allowing other structured languages such as VB and C + + to be used. And asp+ really provides a middle-level language execution structure, allowing the use of various languages.
Using HTML, text, and object-blending ASP is easy to build a large page. But it's hard to reuse the code unless you put some code in an include file. This is not the best solution. In many cases, developing a Web application requires a wide range of expertise, such as writing programs, others doing art, and others designing Web pages, and it's hard to connect these people to the same thing if it's just using ASP. But asp+ really allows separate code to coexist with content.


In the previous version of the ASP, you have to write code for almost every thing. To keep the data in the form, write the code. To verify the data written by the user, write the code. In order to send some simple data, write the code. In asp+, a real component pattern is introduced, with this server-side control and event triggering, we seem to feel like we're manipulating "FORM" in VB. The new component control in this asp+ is declarative (that is, if you want to use these component controls to do something, You just need to declare the line, the other do not care, haha, do not feel some fool ah? So you actually need to write very little code. In fact, in many cases, you don't have to write any code at all.
The outside world is changing all the time, there are already a considerable proportion of users through the "Internet device" to visit your site, such as WAP mobile phones, PDAs, sticky boxes, and others, perhaps in the near future to use these Internet users more than the PC. This means that we may have to do more on the server to match the different devices. We also have to use different formats for output, such as WML. At the same time, new interconnected devices and commercial applications also require the ability to send or read WML from network applications. Now using ASP to do this requires you to use an XML parser to transform the data using XML. The Asp+ Network Service will use the pages you make to adapt to different devices in a simpler way.
In addition to these, the rapid development of the distribution is that applications also need to be developed faster, more modular, more re-use, easier to operate, so that more platform support. New standards like soap (Simple Object Access Protocol) and business-to-business business needs require a new technology to adapt to different systems. Web applications and Web sites need to provide a more powerful, scalable service that asp+ to meet the requirements above and can restart applications in the event of an error or buffer overflow.

Therefore, in order to adapt to these needs, the ASP has been the foundation and even the development environment to repair. Visual Studio 7.0 will support the completion of asp+ applications, including ASP and asp+, although there are few tools available to support it. This rich, component-mode program development module is designed to be quite user-friendly, and it also supports all visual Studio languages, including vb,c++ and C #, with special attention to the third language, which is not too far from our popular days.

asp+ How to make your life simpler?
The biggest challenge for today's web programmers is changing browser compatibility and their escalating complexity. It's a nightmare to make sure that pages work in all popular browsers and try to build more interactive pages with every browser's latest properties.

Even more frightening is the creation of different Web pages for different user devices. Of course, it is not possible to create the same level of pages on WAP phones and traditional browsers because, for bandwidth reasons, only 12 words and 3 lines of text information can be displayed at a time in many WAP handsets.

One of the easiest solutions is to dynamically generate different output for different users, or to write multiple pages for different users. The second approach is inefficient, and I think most developers will choose the first method. However, this means that each click of the user will let the server determine what should be shown to the user.

If all this is possible, why not automate these processes!? To end this, asp+ introduced a new concept of service control that encapsulates common tasks and provides a clear programming module. They also help manage different types of users.

Server-side HTML control allows us to reduce a lot of code
ASP has provided a capability to execute components on the server that generate some code to return to the user. Asp+ inherits this concept through service control. The need to convert HTML elements to service control is only an additional attribute: runat= "Server" (which we have seen in ASP)

Any HTML element on a page can use this method annotation, and asp+ will execute these elements on the server and produce different code for different users.


This concept of making HTML elements run on the server seems strange for the first time, but when you find that it becomes fully functional on this page, you have a good idea.

The problem of maintaining state
One of the most annoying problems when we build interactive pages and apps is to handle the data from the client and then keep the data under control. A central goal of asp+ is to streamline this process. This does not cause any confusion to the programmer, and it works fine in most browsers.

Let's take a look at the following code first. This code makes a simple page for the user to enter the name of the computer and select the operating system. OK, it's not a very annoying or exciting example in itself, but it's a reflection of the things we often do. When this page is submitted, use the Request.Form set to get the appropriate data, and then display them with Request.write.

<HTML>
<BODY>
<%
If Len (Request.Form ("Selopsys")) > 0 Then
Stropsys = Request.Form ("Selopsys")
StrName = Request.Form ("Txtname")
Response.Write "You selected '" & Stropsys _
& "' For Machine '" & StrName & "'."
End If
%>
<form action= "pageone.asp" method= "POST" >
Machine Name:
<input type= "text" name= "Txtname" >
<p/>
Operating System:
<select name= "Selopsys" size= "1" >
<option>windows 95</option>
<option>windows 98</option>
<option>windows nt4</option>
<option>windows 2000</option>
</SELECT>
<p/>
<input type= "Submit" value= "Submit" >

[1] [2] [3] [4] Next page



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.