Asked by:
Web Application and Web Site project in Visual Studio 2017

Question
-
User-568656090 posted
After updating to 15.6.1, I discovered that there is a change in the way of creating a new web project - new Web Site project is not available from File->New menu. Instead, this function is moved to "Web->Previous Versions" in the New Project dialog. It seems the new trend is Web Application. Can anyone explain the reason behind this change?
Sunday, March 11, 2018 10:13 AM
All replies
-
User1120430333 posted
You found it, right? What difference does it make concerning the location?
Sunday, March 11, 2018 10:55 AM -
User-568656090 posted
The difference? I'm not quite sure, but it reminds me of seats in cinema - location does make difference.
BTW I don't have any emotional feelings towards project types. The only thing I want to know is why it seems Web Application project is becoming the favorable.
Sunday, March 11, 2018 12:08 PM -
User1120430333 posted
Well, one is using new .NET technology, and the other one is using previous technology allowing VS2017 to be backwards compatible to work with previous versions of ASP.NET templates. I guess you can consider previous as legacy now with legacy ASP.NET solutions still being viable and used in the industry.
Sunday, March 11, 2018 8:36 PM -
User-568656090 posted
Sorry, but I have to say that this is a very shallow explanation. Web Application compiles into a single assembly which could be very large (several hundreds of Mb) and that leads to startup performance problem. Web Site however solves the problem by modulizing each page/folder into a single assembly; and it also brings very easy and simple update process. That's what I understood for the past years.
I know that the new trend is cross platform .NET Core. But why does this new thing favor no-so-good single assembly model?
Monday, March 12, 2018 9:58 AM -
User1120430333 posted
Sorry, but I have to say that this is a very shallow explanation. Web Application compiles into a single assembly which could be very large (several hundreds of Mb) and that leads to startup performance problem. Web Site however solves the problem by modulizing each page/folder into a single assembly; and it also brings very easy and simple update process. That's what I understood for the past years.
I know that the new trend is cross platform .NET Core. But why does this new thing favor no-so-good single assembly model?
Sorry, but I have to say that this is a very shallow explanation. Web Application compiles into a single assembly which could be very large (several hundreds of Mb) and that leads to startup performance problem
Sorry, you don't know what you are talking about. ASP.NET Web form pages can be precompiled that reduces startup time, and ASP.MVC UI(s) use solely HTML that reduces startup time as there is no code behind file attached to it.
And Web applications DO NOT compile into a single assembly not if the developer knows how to implement Separation of Concerns by using UI design patterns such a Model View Presenter, Model View Controller or Model View View Model along with using N-tier and Layered architectural design patterns and NOT doing tight coupling with everything jammed in the aspx.cs code behind file, which all the UI design patterns can be used in ASP.NET Web UI solutions.
https://en.wikipedia.org/wiki/Separation_of_concerns
https://www.codeproject.com/Articles/228214/Understanding-Basics-of-UI-Design-Pattern-MVC-MVP
https://msdn.microsoft.com/en-us/library/ee658117.aspx
I know that the new trend is cross platform .NET Core. But why does this new thing favor no-so-good single assembly model?
I suggest that you really understand Object Oriented Programming and how to architect, because if you knew half of it, you wouldn't be asking the questions that you are asking and not knowing what you are talking about.
BTW, most Web development is dedicated to the MS orLinux platforms no matter how much MS tries to come up with some cross platform solution. :)
http://www.dofactory.com/net/design-patterns
http://www.dofactory.com/products/net-design-pattern-framework
Monday, March 12, 2018 10:45 AM -
User379720387 posted
Microsoft's thinking changes as the wind. Sometimes the wind blows in the wrong direction for you.
Microsoft is also a very big company, they have big company mentality, and hope that their developers follow them along the path Microsoft chooses.
What is good for Microsoft may not be good for you.
Monday, March 12, 2018 2:39 PM -
User-568656090 posted
Sorry, you don't know what you are talking about. ASP.NET Web form pages can be precompiled that reduces startup time, and ASP.MVC UI(s) use solely HTML that reduces startup time as there is no code behind file attached to it.
And Web applications DO NOT compile into a single assembly not if the developer knows how to implement Separation of Concerns by using UI design patterns such a Model View Presenter, Model View Controller or Model View View Model along with using N-tier and Layered architectural design patterns and NOT doing tight coupling with everything jammed in the aspx.cs code behind file, which all the UI design patterns can be used in ASP.NET Web UI solutions.
https://en.wikipedia.org/wiki/Separation_of_concerns
https://www.codeproject.com/Articles/228214/Understanding-Basics-of-UI-Design-Pattern-MVC-MVP
https://msdn.microsoft.com/en-us/library/ee658117.aspx
I know that the new trend is cross platform .NET Core. But why does this new thing favor no-so-good single assembly model?
I suggest that you really understand Object Oriented Programming and how to architect, because if you knew half of it, you wouldn't be asking the questions that you are asking and not knowing what you are talking about.
BTW, most Web development is dedicated to the MS orLinux platforms no matter how much MS tries to come up with some cross platform solution. :)
http://www.dofactory.com/net/design-patterns
http://www.dofactory.com/products/net-design-pattern-framework
Though I should not tag myself as expert on OOP and other stuffs, but many years ago I worked on real world Web Applications that built into gigantic assemblies, even after data access/business logic layering and separation. That's why I consider Web Application could cause problem on bootstrap/startup. Of course, many years later we are here, situation changes in terms software and hardware and expertise and experience, my old days 'conclusion' may not be true.
But I think I may not know the answer forever because Microsoft will never have time to tell me directly.
Monday, March 12, 2018 3:25 PM -
User-707554951 posted
Hi Neo
Website:
The Web Site project is compiled on the fly. You end up with a lot more DLL files, which can be a pain. It also gives problems when you have pages or controls in one directory that need to reference pages and controls in another directory since the other directory may not be compiled into code yet. Another problem can be in publishing.
If Visual Studio isn't told to re-use the same names constantly, it will come up with new names for the DLL files generated by pages all the time. That can lead to having several close copies of DLL files containing the same class name, which will generate plenty of errors. The Web Site project was introduced with Visual Studio 2005, but it has turned out not to be extremely popular.
Web Application:
The Web Application Project was created as an add-in and now exists as part of SP 1 for Visual Studio 2005. The main differences are the Web Application Project was designed to work similar to the Web projects that shipped with Visual Studio 2003. It will compile the application into a single DLL file at build time. In order to update the project it must be recompiled and the DLL file published for changes to occur.
Another nice feature of the Web Application project is it's much easer to exclude files from the project view. In the Web Site project, each file that you exclude is renamed with an exclude keyword in the filename. In the Web Application Project, the project just keeps track of which files to include/exclude from the project view without renaming them, making things much tidier.
Related link:
https://www.c-sharpcorner.com/uploadfile/kalisk/Asp-Net-website-vs-web-application-project/
http://vishaljoshi.blogspot.sg/2009/08/web-application-project-vs-web-site.html
Best regards
Cathy
Friday, March 16, 2018 6:47 AM