search
Japanese Chinese Nederlands Espanol Italiano Deutsch Francais Twitter Rss Feeds
MicrosoftArticlesForumsFAQs
C# .NET
VB.NET
Visual Studio .NET
ADO.NET
Xml / Xslt
VB 6.0
.NET CF
GDI+
LINQ
Deployment
Security
FoxPro
Silverlight / WPF
Entity Framework
RIA Services

Web ProgrammingArticlesForumsFAQs
JavaScript
ASP
ASP.NET
Web Services

Non-MicrosoftArticlesForumsFAQs
NHibernate
Perl
PHP
Ruby
Java
Linux / Unix
Apple
Open Source

DatabasesArticlesForumsFAQs
SQL Server
Access
Oracle
MySQL
Other Databases

OfficeArticlesForumsFAQs
Excel
Word
Powerpoint
Outlook
Publisher
Money

Operating SystemsArticlesForumsFAQs
Windows 7
Windows Server
Windows Vista
Windows XP
Windows Update
MAC
Linux / UNIX

Server PlatformsArticlesForumsFAQs
BizTalk
Site Server
Exhange Server
IIS

Graphic DesignArticlesForumsFAQs
Macromedia Flash
Adobe PhotoShop
Expression Blend
Expression Design
Expression Web

OtherArticlesForumsFAQs
Subversion / CVS
Ask Dr. Dotnetsky
Active Directory
Networking
Uninstall Virus
Job Openings
Product Reviews
Search Engines
Resumes

 

Visual Studio .NET Architecture Templates


By Robbe Morris
Printer Friendly Version
View My Articles
12 Views
    

The downloadable code sample below shows you how to create base architecture solution / project file templates for ASP.NET, WCF, WPF, and Silverlight applications. The tool enables architects to give developers standardized base architecture for new applications.


The new project generator utility essentially iterates through a base architecture folder and creates a brand new set of solution, project, class, xaml, aspx, etc. files with all relevant aspects renamed based on the new project name and all project references left in tact.

The developer just launches the tool, provides a project name, and clicks to generate the new application.

Why should I use something like this?

The actual architecture is entirely up to you.  So, feel free to change it.  I like to use this technique to guide the development teams I have oversight of.  It ensures that naming conventions for assemblies are followed, various patterns are followed, and automatically implements all sorts of default classes and techniques applicable to the software we build.

How to use?

Download the tool and base architecture.  For ease of initial implementation, unzip the file to your C: drive as c:\EggHeadCafe. 

1.  Open the solution \Rename EggHeadCafe To My Company Utility\RenameEggHeadCafeToMyCompany.
     You should only need to use this project once.  Its sole purpose is to let you rename the EggHeadCafe files and folders to the name
     of your company.  Change line 34's _companyPrefix variable to the name of your company.  Run the project and confirm that
     the EggHeadCafe named files and folders were renamed to your company name.  Close Visual Studio .NET.

2.  Open the Executables\NewApplicationGenerator.exe.config file with your favorite text editor.
     Change the applicable EggHeadCafe references to your company name.  Save the config file.

3.  Launch Executables\NewApplicationGenerator.exe and select which application types you would
     like generated based on the base architecture.  Set the Project Name.  Click "Generate New Application".
     It should only take a few seconds to complete.  Confirm that the new application was generated as desired.

Base Architecture Tool  Download

Biography - Robbe Morris
Robbe has been a Microsoft MVP in C# since 2004. He is also the co-founder of EggHeadCafe.com which provides .NET articles, book reviews, software reviews, and software download and purchase advice.

button
Article Discussion: Visual Studio .NET Architecture Templates
Robbe Morris posted at Sunday, May 17, 2009 6:18 PM
Original Article
 

Great Tool for generating application architecture
Arif Khan replied to Robbe Morris at Saturday, May 23, 2009 8:23 PM

Hey Robbe,

Great Tool,  I generated an app from the tool and had some of the following issues.

  1. The .Shared project is in the solutions but not included in the base architecture folder
  2. Also the WCF project does not compile
  3. Also in WCF project it also looks for and ErrorManagement project whic is not included
  4. And in the ASP.net solution there was a config project that was missing

This tool saved me a ton of time

Thanks

 

Hmmm, let me double check that
Robbe Morris replied to Arif Khan at Saturday, May 23, 2009 9:15 PM

I may need to update the projects to exclude some stuff I use.  Didn't want to add in a bunch

of stuff not relevant to others.  Thanks for the catch.

 

Fix uploaded
Robbe Morris replied to Arif Khan at Saturday, May 23, 2009 9:20 PM
The .Shared project is in the EggHeadCafe.Assemblies folder.  It was intended as a place to put company generic assemblies that could be integrated into the base architecture.