Groups > Asp .Net > VS 2005 Web Application Projects > Re: Web application project or Web site project which is "better"?




Web application project or Web site project which is
"better"?

Web application project or Web site project which is "better"?
Thu, 13 Mar 2008 10:21:00 +000
Hi,
We are a bit confused as to which web project type is best to use.

Currently we have a number of large projects in the old style with .vbproj
files. These have been upgraded to VS2008 web application projects. Compilation
seems slower of upgraded projects than created from scratch web site projects. I
do get the impression MS is pushing the new style format for future releases.

What are the advantages/disadvantages of the new web site project?
Where do references get stored in the new style project?
Where do the control declarations get hidden in partial classes?

Thanks,

Alex
Post Reply
Re: Web application project or Web site project which is "better"?
Thu, 13 Mar 2008 16:18:37 +000
Do you mean environment settings? Web application allows to you to add as many
projects as you want to your solution. It means after publishing site you will
get a single dll files of evert project. If you choose a web site project, you
can not add projects to solution, but can add any .cs files to special folder -
App_Code, and after publishing you'll get only one dll - App_Code that will
include all compiled .cs files that were on this directory
Post Reply
Re: Web application project or Web site project which is "better"?
Thu, 13 Mar 2008 16:38:44 +000
Coding mixture: ASP.NET 2.0 - Web Site vs Web Application project
Post Reply
Re: Web application project or Web site project which is "better"?
Fri, 14 Mar 2008 12:42:09 +000
Visual Studio 2005 Website Projects (which is a default project type) is not
recommended for big size and long term maintenance project. Instead Web
application projects should be created. However the prerequisite is that you
would need to install Visual Studio 2005 Service Packs 1 and other patches to be
able to create web application projects.
 

Here are some links on the same references
http://msdn2.microsoft.com/en-us/library/aa730880.aspx
http://weblogs.asp.net/scottgu/archive/2006/05/08/445742.aspx
http://www.dotnetspider.com/kb/Article1938.aspx

 

Few shortcomings of creating Website project (but not limited to following
mention points)

Project file is not created in case of Website type project. As a result, code
files are not bind with project file, rather it works on directory structure.


Since project file is missing, project and assembly references are not made
directly to website projects. More over you cannot bind website projects to any
source control (such as to VSS or Seapine) since binding information is kept
only in project file which is missing from website project structure. (Also,
website projects cannot be integrated with Visual Studio Team System
http://blogs.vertigosoftware.com/teamsystem/archive/2006/11/03/4057.aspx)


Website project does not create namespaces to distinguish web pages or classes
but instead it appends folder name or underscore to the page / class name,
leading to messy stuff. For Example, when you add two files with same name but
in different folder, instead of adding these files into different namespaces it
appends the folder name to the page file name. 


On website project compilation, multiple dll’s are created instead of one (by
default for every page). This although provides maximum security (from
dissembling assemblies) but make website slow during runtime. (The solution to
this problem is to set batch=”false” in compilation tag of web.config file).



Another problem that has been faced, is that, if you are publishing you website
project to deploy it, in certain condition successful publishing status is
shown, however, there is no file copied / created in published folder. This
mostly occurs if you have not handled warnings and or have ignored HTML related
issues in ASPX. The problem is that there are no warnings or errors reported on
publication and you cannot identify reasons due to which files are not published
however the status is showing successful. 


Here are some more links in same context
http://www.thescripts.com/forum/thread613134.html
http://petesbloggerama.blogspot.com/2007/05/web-site-project-or-web-application.
html


To create Web Application Project, you would need to download and install
following sevice pack and patches (if you have not already):
http://192.168.2.2/VisualStudio2005Patches/VS80sp1-KB926601-X86-ENU.exe (Visual
Studio Service Pack 1) 
http://192.168.2.2/VisualStudio2005Patches/VS80-KB915364-X86-ENU.exe  (Visual
Studio Service Pack 1 Patche) 
http://192.168.2.2/VisualStudio2005Patches/WebApplicationProjectSetup.msi (Web
Application Project Setup)
Post Reply
Re: Web application project or Web site project which is "better"?
Fri, 14 Mar 2008 13:10:01 +000
I must admit I prefer the old style model where you can exclude files etc. 

Is a website project slower for larger projects?

Thanks,

Alex
Post Reply
about | contact