Advantages of the webapplication programming model: ● The website Compilation speed is fast and the incremental compilation mode is used. This part will be incrementally compiled only after the file is modified. ● Generated assembly Website: generate a random Assembly name. You must use the plug-in webdeployment to generate a single assembly. Webapplication: You can specify a website project to generate a single assembly. Because it is an independent assembly, you can specify the name, version, output location, and other information of the application assembly like other projects. ● The website can be split into multiple projects for convenient management ● It can be in and out of the projectSource codeExclude a file from management ● Support for vsts team build to facilitate daily building ● More powerfulCodeCheck function, and check policy is controlled by source code ● You can perform prescribed processing before and after compilation ● Strong resource class support for app_globalresources (I have not learned about it on the Internet) ● Directly upgrade a large system built using vs2003 Advantages of the website programming model: ● Dynamically compile the page to see the effect immediately without compiling the entire site (main advantages) ● Same as above, this can make the error part irrelevant to the part used (it can be required that the part can be checked in only after compilation is passed) ● One assembly can be generated on each page (this method is not used) ● A directory can be processed as a web application, and files can be directly copied and published without project files (it doesn't matter, it is only suitable for small sites) ● You can also compile the page into the assembly (it should not be used, and webapplication can also be implemented through the webdeployment plug-in) Mutual conversion between the two programming models: Vs2005 SP1 has built-in Conversion Program, which can be easily converted from website to webapplication You only need to copy the file and right-click to execute "convert to Web application. No dedicated reverse Conversion Tool is found, but after comparison, it is also very easy to convert. Delete all *. Designer. CS Replace codebehind = "filelist. aspx. cs" in the *. aspx, *. ascx, and *. Master page files with codefile = "filelist. aspx. cs" in batches" The above is copied. I have compared it. Directly create a website without a namespace. There are several special folders, such as the app_code folder, which cannot be created directly in the website project, but can be manually added and included in the project. To use the webapplication program, we need to install the Visual Studio 2005 team suite CHS patch to convert the website project into a web application. The same general program of web programs is somewhat different. vs does not need to create project files for them, so it can also be called projectless development. The purpose is to ensure that the directory of the site is clear, it is helpful for the final configuration of the web program. You can simply copy the entire directory because there are no unnecessary files. At the same time, no project development is available to facilitate team development, because the development files do not need to be synchronized. In vs, there is also engineering-based web development, which can be called Web projects. Actually, this is the previous development mode and the purpose of its existence, first, you may need to migrate the previously developed web project to vs2005. Second, you sometimes need to include multiple projects in one site. Third, the web project can flexibly process site resource files, for example, a large number of images can be excluded from the project during development. Fourth, if you use the msbuild tool, you must use the project file. |