Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In VS2008 what is the difference between Web Site and Web Application?

Tags:

.net

In VS2008 what is the difference between Web Site and Web Application? And are there advantages to using either one?

like image 798
Brad Avatar asked Aug 24 '09 15:08

Brad


People also ask

What is the difference between web site and web application?

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.

Is Facebook a website or web application?

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.

What is the difference between web application and website in asp net?

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.

What is meant by web application?

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.


2 Answers

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:

  1. Web Site project's source are dynamic, you don't necessary need to go thru your development machine to modify something (risky approach though), everything are compiled just in time
  2. Having said this is convenient, it also has a slight performance penalty due to the JIT compilation involved.
  3. There are some projects just WONT run on Web Site project due to the design of the dispatching request, like ASP.NET MVC and MonoRail based projects.
  4. You have little or no possibility to TDD your Web Site project in library level because its not compiled. You can however TDD your single DLL compiled with Web Application.
  5. I forgot how that is being triggered but VS2005 can take forever long to compile a bigger Web Site project due to the dynamic nature involves additional syntax checking for the aspx files. Web Application does not suffer from this issue.

I am sure there are a lot more stuffs involved, but I think these are some of the bigger ones.

like image 159
William Yeung Avatar answered Nov 09 '22 00:11

William Yeung


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

  • Quick edit, test, deploy cycle Syntax errors at runtime
  • No need to compile or restart app Can't create an installer
  • Source always available Source on server useful to hackers

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

  • Controlled build & deploy process Deployment causes application restart
  • No class files on web server, dll only Can't deploy individual classes
  • Syntax errors at compile time

http://damieng.com/blog/2008/02/07/web-site-vs-web-application

like image 38
madcolor Avatar answered Nov 09 '22 00:11

madcolor