9

I'm trying to convince my co-workers to switch from a web site project to a web application project, because I want the use of the project file. However I can't diffuse this argument against:

  • The web site project allows each page to be compiled into a single dll. Their argument is this enables easy fixing of errors found after publishing. This is contrast to how the web application project compiles all code behind into a single dll.
  • Is updating a single page's dll essentially different to updating the entire site's dll?
  • Is there some way to compile each page's code behind into a separate dll in the web application project?
  • Are there some prohibitive (performance,memory?) costs to compiling each page's code behind into separate dll's that we are unaware of?
  • Why is the feature(?) to compile each page to separate dlls in web site projects and not web app projects?
BIBD
  • 15,107
  • 25
  • 85
  • 137
Dana Benson
  • 966
  • 7
  • 16
  • 1
    What I've found is this: Web Sites are used by people who don't use unit testing or have a proper development environment set up, because they **require** the ability to "hotfix" certain pages at a given time. Web Applications are the preferred solution for smart developers who have a real environment and use testing/CI. – Wayne Molina Jun 27 '11 at 15:10

2 Answers2

1

I'd say if everyone there needs the flexibility to deploy bug fixes post release without re-releasing the whole site then they are right: you need to have a web project for that sort of dynamic compilation. That or a better testing process ;)

Personally I prefer a web application though since there is only one dll created, which means less mess and less scope for "weird bugs" with dll's having different names etc. If you have a large site you should really be using a web application. I remember making this decision a year ago and I never looked back (I chose web application) :)

BritishDeveloper
  • 13,219
  • 9
  • 52
  • 62
1

I used to favor web applications much more than a web site project. However, I came to realize that if you have a site that requires lots of minor updates, then going with a web project is just easier.

When you can just change one code-behind file, instead of having to rebuild the entire app and deploy - it makes deployment a million times less stressful.

However, if you are using proper version control systems, branching, automated builds, proper QA, then either way works out.

But yes, website projects are a lot easier to "update".

Jack Marchetti
  • 15,536
  • 14
  • 81
  • 117