The advantages of asp.net2.0+vs2005 sharp Weapon analysis

Source: Internet
Author: User
Tags configuration settings new features

asp.net 2.0 and Visual Studio 2005 have been officially listed for several months now. As time goes on, more and more people are now able to use this product. Based on the trial of this product, the author tries to analyze the advantages and disadvantages of this product from a personal point of view, for reference only.

First, the introduction

To be honest, my relationship with ASP.net 2.0 and Visual Studio 2005 is somewhat like and annoying, but I finally decided to migrate most of my internal applications to 2.0 and never regret it. Basically, there are so many new features in ASP.net 2.0 that make my life easier and never return to programming in the previous 1.1 version.

So far, the platform has been working well. I've found that many of the improvements that exist can significantly reduce the complexity and number of encodings, increase 10~20% in performance, and reduce memory requirements (which is important for large applications), but have little effect on my work.

Adding 2.0 features to an existing application is definitely not an overnight event. However, as I gradually became accustomed to quickly adding a large number of 2.0 features to my new application, my final feeling was that it would be a big step back if you returned to ASP.net 1.1 and vs 2003.

Second, the evaluation of the advantages

Now, let's take a look at the main changes in this new product and see its advantages first.

(i) Visual Studio 2005 File-based Engineering Development

Now, in Visual Studio 2005, you can open a directory as a Web project, which is a pretty good improvement. On my development machine, I might have 50 different Web projects. Using the previous VS2003, it is quite a headache to configure and maintain all of these as virtual directories in IIS and to properly reference the engineering implementation. Don't you think so? Do you want to move some projects to a new machine? In VS2005, you simply point to a directory to open the project. You can use a local Web server build method to run your application so that you don't have to configure your Web server.

This feature is especially useful for developers sharing the sample-any developer who wants to examine a sample Web application does not have to undergo the pain of configuring based on IIS. Now, with file-based engineering, you can--at least at the development site--achieve a true "xCopy" project. This is a great feature, but it is not without drawbacks (we will be able to detail it later).

"Note" Everyone I touch likes to build a Cassini Web server inside Visual Studio. Of course, I also like it, because it greatly simplifies the handling of many problems. However, there are some drawbacks to its use. It is important to avoid mutual interference between Cassini and IIS during the course of use. For example, Cassini can pass all requests to the asp.net and ignore the extended content. If you have a custom processor that handles a particular file type (for example, building Excel reports dynamically, and so on, you have to remember that when you publish your application, you have to create a custom mapping for the extended content in IIS, otherwise IIS will not pass the request to ASP.net. I have contacted many friends to spend a lot of time at publishing to solve problems in their applications because they never worry about configuration settings in Cassini during the development process.

(ii) Master pages

Now you can define a master page template that can be reused in your application. Use this feature to save you a lot of development time. In fact, before the 2.0 release, there was already a concept based on the ASP.net 1.x version, but for me, the most critical feature that attracted me was that Visual Studio provided visual support for it. This allows you to see the layout of the master, where contentplaceholders can be applied to each page to provide page-level content.

In addition to the important visual aspects that the designer provides, the master page template provides a good way to connect reusable code that is related to each other. The purpose of a master page is to incorporate functionality that previously required the use of several user controls, such as Header,footer and sidebar, to enable them to achieve logical separation more effectively than before.

You can also change the master page dynamically at run time to achieve greater flexibility. This support enables users to change the overall look and feel of an application, and this effect is not possible only by switching cascading style tables.

(iii) Visual description of user controls

To be honest, I really want to be able to see the whole page when I design it. Like a master page, Visual Studio 2005 now has the ability to display a generated user control within the Web Forms editor. Instead of a previous old-fashioned, descriptive gray box with a control name, you can now get a fully-generated, properly-built control within the designer. Double-click it, then vs will navigate you to the user control designer. In my development, I don't typically use a lot of user controls, I use master pages to replace many of my existing controls, but I find that this kind of user control visualization describes the design pattern more useful. This is especially true for my existing 1.1 version of the application-these controls are often used in my programs to express page headers, sidebars, and footers.

The "Extra note" completely automates the generation of user controls greatly saves development time. Of course, I also need to spend a lot of time switching back and forth from the IDE to a browser to see how the user control will eventually be generated. That's all.

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.