- Code-behind model: ASP.NET 2.0 introduces the concept of partial classes, whereas a class can span multiple class files. It is a key feature used in Visual Studio 2005 to separate system-generated code from user code. This negates the scenario where you find yourself scrolling through source code and encountering the code generated by the system. The partial class approach reduces the risk of inadvertently editing system code and results in smaller code-behind files.
- Directories: ASP.NET 2.0 has added a number of special directories where 1.1 had only the one required bin directory. Most of these new directories have the App_ prefix with names like App_Code, App_Data, App_GlobalResources, and App_LocalResources, while the bin directory still exists along with a themes directory. The new directories are a key aspect of 2.0's elimination of project files.
- No more project files: Gone are the days of project files with ASP.NET and Visual Studio 2005. The project is now the complete Web project directory, which is a drastic shift from 1.1 and can cause migration issues as described later.
- Compilation model: With 1.1, all code was compiled into one assembly placed in the bin directory. With 2.0, the assembly is separated into multiple assemblies. These multiple assemblies may be created on-the-fly or precompiled. Examples of multiple assemblies are one assembly for each ASP.NET directory like App_Code and App_Data as well as individual assemblies for Web Forms, User Controls, and so forth. This is a major shift in the application structure; it offers more deployment options in how the application is delivered to the users.
- Application deployment: The deployment of 1.1 applications was fairly straightforward as you moved the content files along with the necessary assembly files—it could easily be accomplished with a simple copy and paste with limited options. The 2.0 model provides various options for deploying an application. For instance, you may choose to precompile all code and deploy it or go the other way with no precompilation. Also, you can lock down deployed content files so no changes may be made after deployment (this is a major difference from 1.1).
The list provides a high-level view of the main differences between ASP.NET 1.1 and 2.0 and what can affect the conversion of an existing application to 2.0. Now let's take a closer look at possible problem areas.
No comments:
Post a Comment