You might many times hear the words “project templates” and “project system” from time to time, I though it would be worth while to talk about the differences between the two from a web developer stand point…
Web developers using Visual Studio use either File –> New –> Project or File –> New –> Web site as shown below to create new Web projects as shown below:
The new project dialog for Web Developers looks as below:
and the new web site dialog looks as below:
What is probably interesting to note is that all the options that you see inside any of these dialog boxes above are just “Project Templates” and what that really means is that they are underlying the same project system but just wrapped with different set of start up files for easy project development…
In reality there are only two major Project Systems for Web Developers
- Web Application Projects (WAPs) which are accessible via File –> New –> Project –> Web
- Web Site Projects (WSPs) which are accessible via File –> New –> Web Site
What is also interesting to note is that WAPs and WSPs have different code bases (with reasonable set of shared components)… I will eventually write a post on real differences between WAPs and WSPs but today let us focus on Project Systems vs Templates…
A Project system like WAP or WSP actually takes care of building, compiling, debugging, managing source control, deploying, hooking up references, intellisense etc etc for a project… In essence the major code for functionality of the web project like commands, hot keys, content menus, toolbars etc are all specific to a project system and they remain the same across all the project templates of a single project system…
A Project template on the other hand is simply a bunch of files bundled together to allow a person to easily start developing a certain type of project… The project templates can have specific files like .svc or .aspx with boiler plate code in it… Each project template can choose to include its own set of references or code files… Behind the scene the project system invoked to do all the magic remains the same… For example ASP.NET Web Application and WCF Service Application are just two different templates for “Web Application Project System”… Similarly there are a bunch of project templates for “Web Site Project System”…
The key Project templates for Web Application Projects (WAP) are:
- ASP.NET Web Application
- Empty ASP.NET Web Application
- ASP.NET Web Service Application
- WCF Service Application
- Dynamic Data Linq to SQL Web Application
- ASP.NET MVC Web Application (MVC is a customized Web Application Project system, we call it Flavor of WAP, so it is not necessarily a project template only…)
- Dynamic Data Entities Web Application
Similarly, the key Project templates for Web Site Project (WSP) are:
- ASP.NET Web Site
- Empty Web Site
- WCF Service
- ASP.NET Reports Web Site
- Dynamic Data Linq to SQL Web Site
- Dynamic Data Entities Web Site
Hence many a times there are features which work for one project system but do not work for other… A classic example is App_Code directory which works great with Web Site projects but not as seamlessly with Web Application Projects… Recently I wrote a blog post on Why App_Code does not work as well with WAPs…
Anyways, I hope this gives an idea on how the project systems and project templates for Web Developers work within Visual Studio…
-Vishal
2 comments:
Thanks much Martha, appreciate it...
Vishal,
Nice reading your blogs. Good Job :)
Thanks,
pankaj
Post a Comment