Re: Visual Studio "New Project" or "New Website"
- From: daveh551 <geekdh@xxxxxxxxx>
- Date: Sat, 19 Jul 2008 10:24:07 -0700 (PDT)
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?
.
- Follow-Ups:
- Re: Visual Studio "New Project" or "New Website"
- From: John Saunders
- Re: Visual Studio "New Project" or "New Website"
- References:
- Visual Studio "New Project" or "New Website"
- From: GoJets
- Re: Visual Studio "New Project" or "New Website"
- From: John Saunders
- Visual Studio "New Project" or "New Website"
- Prev by Date: Re: Visual Studio "New Project" or "New Website"
- Next by Date: Re: Visual Studio "New Project" or "New Website"
- Previous by thread: Re: Visual Studio "New Project" or "New Website"
- Next by thread: Re: Visual Studio "New Project" or "New Website"
- Index(es):
Loading