In VS2008 what is the difference between Web Site and Web Application? And are there advantages to using either one?
A website provides visual and text content that the user can see and read, but not affect in any way. In the case of a web application, the user can not only read the page content but also manipulate the data on this page.
Web applications are websites with functionality and interactive elements. Gmail, Facebook, YouTube, Twitter, etc. are all web apps that are dynamic, and built for user engagement.
Web Application is a special Visual Studio project. The main difference with Web Sites is that when you build the project all the code files are compiled into a single assembly, which is placed in the bin directory. You don't deploy code files to the web server.
A Web application (Web app) is an application program that is stored on a remote server and delivered over the Internet through a browser interface. Web services are Web apps by definition and many, although not all, websites contain Web apps. According to Web.
Before you talk about the pros and cons, you would have to know the fundamental difference on how it works.
Web Site Projects use a just in time compilation approach which would dynamically compiles your aspx and related file when your page is actually visited. The compiled assembly is then being placed inside the bin folder with a random generated dll name.
Web Application, on the other hand, compiles the page into a named dll at the time you develop the project. Without this compilation the website won't even deploy into your server (as there is no auto compile mechanism)
So the pros and cons:
I am sure there are a lot more stuffs involved, but I think these are some of the bigger ones.
Web site Primarily for working with ad-hoc web sites that have programmed elements. Easily identified by customer-specific content present in aspx files.
No solution or project files are required and the pages and source can reside locally (file system, IIS) or remotely (FTP, WebDev/FrontPage extensions) via the File > Open > Web Site... menu option.
Code-behind and classes are typically stored on the web server which compiles them in-memory on demand. Changes can be made to the files without restarting the application and losing sessions.
For/Against
Web application Web application projects were introduced as an add-on for Visual Studio 2005, later rolled in to VS 2005 SP1 and made a full first-class citizen with Visual Studio 2008.
Like the name implies these are primarily for web applications, those times when you have written a product or solution that happens to have a web interface.
Web application projects exist on your local drive and are treated like any other VS project type and can be added to existing solutions are subject to full compilation, validation and build steps.
Deployment is typically via MSI installers however you can also utilise the addition Web Deployment Projects add-in which allows you to deployment directly to servers which is useful for deploying to test environments.
For/Against
http://damieng.com/blog/2008/02/07/web-site-vs-web-application
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With