[RESOLVED] What is the difference/When should I use
Hi,
Coming from a web development background I am a little confused about what a web application is? The way I see it it is a website... If that is the case why have both the ability in Visual Studio to create a website or web application. Unless, of course I am mistaken and a web application is in-fact a program that runs on the server?
Thanks,
Nightwalker
Re: What is the difference/When should I use
WebApp is a project where you get a solution & a project file like a typical .Net project (I say typical from the sense of WinForms and WPF programming). You get a *.dll file in the bin folder for all of the page's code-behind code & you can include references that's project wide. Also when you create things like user controls, it shows up in intellisense, etc.
VS 2002 and 2003 only supports this type of web project.
Then in VS 2005 the "website" type project was included, of which I'm sure there's a reason for it which is beyond me as it's something someone shouldn't use. The solution file (if you create one) just points to the folder, there's no project file for it. Each page (as far as compiling goes) is separate from the other pages, each page get's it's own compiled *.dll file & because of this if you create a user control and whatnot, intellesense doesn't know about it so there's little use of it. Things really loose, there isn't even a designer.vb or designer.cs file for each page to tell you what controls are on the page(s) when you're coding the back end stuff.
Also I do believe with "websites" you can tell it not to compile, which means your backend code is interpreted rather than compiled binaries, which also means you need to deploy all the Default.aspx.vb or Default.aspx.cs files to the webserver.
In short, I can't think of a reason one should ever create a 'Website'.
Sorry about throwing my opinion of it in there.
Re: What is the difference/When should I use
I think the most basic definition is that when you have more than static pages you have a Web application.
Most people wouldn't think adding a few "contact me" or "sign the guestbook" pages that simply post to a file or database using a canned server script makes it into a Web application though.
But what about a case where the server only serves static pages and provides a few generic Web Services (say database operations, like SQL statements)? Then those Web pages might be served statically but use a lot of client-side logic and "Ajax" style round-tripping. I would still call this a Web application even though there is no server-side custom code running.
In general though a "Web site" is static on the server, while an application has custom logic running there.
But then again you're asking about Visual Studio's terminology I guess.
Re: What is the difference/When should I use
Ahh:
Web Application Projects versus Web Site Projects
It looks like "Web Site" was introduced to support large production applications to gain performance (lower memory use on the server, supporting more users) and maintenance flexibility (no need to recompile the whole thing and grunt out a new giant blob of code each change).
Modular vs. monolith.
Re: What is the difference/When should I use
Thanks dilettante! That site explained a lot.