Web Site or Web Application (VS 2008)

D

Dan

Hi ASP Gurus,
I am about to write some asp pages, but got confused to pick between Web
Site or Web Application.
Can someone please explain some major differences between these two.

I'll appreciate any help/suggestion/advice I get on this topic.

Thanks, Dan
 
G

Gregory A. Beamer

Hi ASP Gurus,
I am about to write some asp pages, but got confused to pick between
Web Site or Web Application.
Can someone please explain some major differences between these two.

I'll appreciate any help/suggestion/advice I get on this topic.


I will take a different direction from what sloan has taken, although I
do love this site. ;-)

http://snurl.com/nb453


In general, use the web application template.

In early 2.0 (and perhaps beyond), the only exception I know of is when
you want to use custom Profiles, as you can end up having to rebuild the
Profile when you use a web application template. It was not a huge
thing, once you learned how to manually clear out your ASP.NET temporary
directory (often including rebooting IIS), but it was a major pain. Not
sure if it is fixed or not, but since I use custom Profile providers, I
don't really care (when I use profile at all).

On the converse side, if you are adding custom classes, the web site
template can give you some heartache.

In general, the difference is that one compiles and the other does not.
If you like to change a single page on the fly, it is "easier" with a
web app template. As an xcopy deploy does not take but a few seconds, it
is not a major benefit for me.

One benefit to web site is mixing code, but this is not as much of a
benefit any more, as you can do it in both (on the page level). If you
like to have one page in VB, one in C#, another in J# and another in
C++, then you will love this feature. If you are "normal", this is
probably not something you will cherish.

The pain with the web site is when you put code in app_code and try to
use it, but I am personally against putting anything in app code, as
application code should not be placed in the UI ... NEVER. Okay, maybe
not NEVER, as some might not want to build a separate WEB.UI library.
;-)

With a web application, you can deploy everything as assemblies. Not
completely true, as .NET will build pointer files with an @ Page
directive pointing to the entry point in the compiled code. This means
you can obfuscate your web app and not give away it's secrets. This is
really only a measure when you build a web app for someone who is
licensing the code, which is rare, but it is kewl none-the-less, even if
it is hardly practical for most of us.

In summary
1. Web site - page compiled on fly
2. Web app - application compiled

Oversimplification, but it works here.
 
S

Stan

Hi ASP Gurus,
I am about to write some asp pages, but got confused to pick between Web
Site or Web Application.
Can someone please explain some major differences between these two.

I'll appreciate any help/suggestion/advice I get on this topic.

Thanks, Dan

Essentially a web application is executed on the server whereas a web
site is handled by the client only. The most common reason for active
server processing is to access a database, which cannot be done from
the client.

HTH
 
J

Jeremy S.

RE:
<< Essentially a web application is executed on the server whereas a web
site is handled by the client only >>

You are completely wrong about this.

Both Web applications and Web sites are compiled and served from the server.
Neither are "handled by the client only" - in fact that is a non sensical
statement as both Web sites and Web applications render plain old HTML + css
+ JavaScript or VBScript etc to the client/browser. Browsers know absolutely
nothing about ASP.NET Web sites or Web applications or any other server-side
technology.
 
G

Gregory A. Beamer

Essentially a web application is executed on the server whereas a web
site is handled by the client only. The most common reason for active
server processing is to access a database, which cannot be done from
the client.

This might work if you are talking a general HTML = web site and PHP,
ASP.NET, JSP, etc = web application.

In this case, the OP was asking about the web site template and the web
application template in ASP.NET, both of which have server side code. The
simple difference is one can be compiled into assemblies and the other is
compiled on the fly when a page is hit and does not have an assembly bin
for its own code (both can reference other assemblies).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top