Re: Visual Studio "New Project" or "New Website"

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Jul 19, 9:52 am, "John Saunders" <n...@xxxxxxxxxxxxxxxx> wrote:
"GoJets" <c.san...@xxxxxxxxx> wrote in message

news:fd59ae0f-b363-4714-a85c-f6911a57e15c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

All,
I'm finally getting around to learning ASP.net in VS... I've developed
a few Win forms in the past and am fairly fluent in classic ASP but
I'm a little confused about which is preferable and the reasoning
behind choosing either "New Project" or "New Website" when creating a
new site. Are there limitations that are present if you choose what
seems to be the more limited "New Website"?

The following may sound a little harsh, but I hope the underlying point gets
across.

You should pretend that "Web Sites" do not exist. They represent a mistake
on the part of Microsoft. Here's how you can tell:

When Visual Studio 2005 was released, there was no support for Web
Application Projects of the kind we had been using since .NET 1.0. Microsoft
actually thought that what we _really_ wanted were these "Web Site" things.
The possibility that we might actually have web _applications_ that need to
be built and installed like any other kind of _application_ didn't seem to
be taken into consideration. This prevented us from upgrading to Visual
Studio 2005 for several months, then cost us another six weeks trying to get
our web services to even build.

They corrected this fairly soon, as they were told about themselves by many
of their important customers, and by loudmouths like me. Visual Studio 2005
SP1 returned them to sanity with Web Application Projects, which are pretty
much what we had in Visual Studio .NET 2003. I only wish they would correct
all of their, um, more egregious failures to comprehend their customers,
just that quickly.

I suppose that a web site is good for a content-driven site, or a site with
some data-driven content, but with no server-side code. But these sites can
be created using Expression Web or Microsoft Office SharePoint Designer (a
misnomer - it's now a good product for creating data-driven web sites,
including, of course, SharePoint sites). If that's all you're doing, then
you don't need Visual Studio to do it with, and I would argue that the above
two tools are better tools for this job.

But, as soon as you start doing any non-trivial server-side coding, then you
aren't creating a "Web Site" any more. You're creating a "Web Application".
In this case, do not send a "Web Site" to do a "Web Application's" job. Use
the real thing, which you'll find was created for this purpose.

Oh, and by this definition, there is never a good reason to create a Web
Site in order to develop a Web Service, so just don't _do_ that.
--
John Saunders | MVP - Connected System Developer

John,

I appreciate that input, since I'm pretty much a newbie at this. But
I have a couple questions:

1) Why do you say that a "WebSite" is not suitable if you have
significant server-side code? What can you do with a Web-Application
that you can't do with a WebSite (providing you use "Publish WebSite,
which actually generates the DLL - I agree, I don't want my C# code
out there on the site being built at execution time.)? Please
understand, that is a serious information-seeking question, not an
argumentative one.

2) What about all the features/tools that just don't seem to work for
Web Applications? I had a dickens of a time trying to get things to
build when I was doing it as a Web Application, to the point that I
scrapped the whole project and started it over as a WebSite. Is there
a way around it to make those features work right?
.



Relevant Pages

  • RE: Subject: VS2005 website deployment problems with EFS
    ... encrypting the files) ... Your test with files located outside my documents (Encrypted website ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Access Application to Visual Studio
    ... I have written several FTP clients using .Net. ... > I do agree that this Access developer should probably stick with Access. ... > There are plenty of third-party companies out there that use Visual Studio ... > Think of it this way: You can buy a house. ...
    (microsoft.public.vstudio.general)
  • Problems running website
    ... I am just learning how to host A website. ... Web Application in Visual Studio 2008. ... I have now set up a Windows 2003 Web Edition Server, ... I created a sample ASP page just to verify that ASP extensions were working ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Best choice for developing?
    ... VSTO gives you the Access run-time, so you simply package your existing ... especially the specific point about the ADE. ... > Visual Studio Professional might not be the better option? ... >>>> a developer friend that I want MS Visual Studio, ...
    (microsoft.public.access.developers.toolkitode)
  • Re: "hello world server/client"
    ... I cant even compile "hello world" in Visual Studio. ... to use the compiler from the command line, then with a makefile to do ... having one developer going off doing his own things is an unnecessary ... This guy seems to think that fiddling with archaic autoconf syntax makes ...
    (comp.lang.c)