Creating an Application Development Framework Using Enterprise Templates, Part 2
Associating the policy file with the template projects
As we said earlier, the policy file is the one that provides the core foundation for successfully creating enterprise templates. For the policy file to do its job, we need to identify each of the previously created templates and building blocks as ELEMENT nodes, so that the policy file can link them up together to provide a consistent view for our enterprise template. To accomplish this, we will make the following changes.
- Add a GLOBALENTRY element in the .etp projects.
- Add a UserProperties element in the .csproj files.
The following table describes the changes that we need to make.
FileName | Changes |
CustomDistributedAppTemplate.etp | <GLOBALS> <GLOBALENTRY> <NAME>TDLFILE</NAME> <VALUE>CustomDistributedApp Template.TDL</VALUE> </GLOBALENTRY> <GLOBALENTRY> <NAME>TDLELEMENTTYPE</NAME> <VALUE> etpCustomDistributedApp Template</VALUE> </GLOBALENTRY> </GLOBALS> |
BusinessFacadeProjects.etp | <GLOBALS> <GLOBALENTRY> <NAME>TDLFILE</NAME> <VALUE>CustomDistributedApp Template.TDL</VALUE> </GLOBALENTRY> <GLOBALENTRY> <NAME>TDLELEMENTTYPE</NAME> <VALUE> etpBusinessFacade Projects</VALUE> </GLOBALENTRY> </GLOBALS> |
BusinessRulesProjects.etp |
<GLOBALS> <GLOBALENTRY> <NAME>TDLFILE</NAME> <VALUE>CustomDistributedApp Template.TDL </VALUE> </GLOBALENTRY> <GLOBALENTRY> <NAME>TDLELEMENTTYPE</NAME> <VALUE> etpBusinessRules Projects</VALUE> </GLOBALENTRY> </GLOBALS> |
DataAccessProjects.etp | <GLOBALS> <GLOBALENTRY> <NAME>TDLFILE</NAME> <VALUE>CustomDistributedApp Template.TDL </VALUE> </GLOBALENTRY> <GLOBALENTRY> <NAME>TDLELEMENTTYPE</NAME> <VALUE> etpDataAccess Projects</VALUE> </GLOBALENTRY> </GLOBALS> |
SystemFrameworkProjects.etp | <GLOBALS> <GLOBALENTRY> <NAME>TDLFILE</NAME> <VALUE>CustomDistributedApp Template.TDL</VALUE> </GLOBALENTRY> <GLOBALENTRY> <NAME>TDLELEMENTTYPE</NAME> <VALUE> etpSystemFramework Projects</VALUE> </GLOBALENTRY> </GLOBALS> |
UIProjects.etp | <GLOBALS> <GLOBALENTRY> <NAME>TDLFILE</NAME> <VALUE>CustomDistributedApp Template.TDL</VALUE> </GLOBALENTRY> <GLOBALENTRY> <NAME>TDLELEMENTTYPE</NAME> <VALUE> etpUIProjects</VALUE> </GLOBALENTRY> </GLOBALS> |
WebServiceProjects.etp | <GLOBALS> <GLOBALENTRY> <NAME>TDLFILE</NAME> <VALUE>CustomDistributedApp Template.TDL</VALUE> </GLOBALENTRY> <GLOBALENTRY> <NAME>TDLELEMENTTYPE</NAME> <VALUE> etpWebServiceProjects </VALUE> </GLOBALENTRY> </GLOBALS> |
SqlDataAccess.csproj | <UserProperties TDLFILE = "CustomDistributedApp Template.TDL" TDLELEMENTTYPE = "SqlDataAccess"/> |
ConfigurationHandler.csproj | <UserProperties TDLFILE = "CustomDistributedAppTemplate.TDL" TDLELEMENTTYPE = "ConfigurationHandler"/> |
Encryption.csproj | <UserProperties TDLFILE = "CustomDistributedAppTemplate.TDL" TDLELEMENTTYPE = "Encryption"/> |
ExceptionManagement.csproj | <UserProperties TDLFILE = "CustomDistributedAppTemplate.TDL" TDLELEMENTTYPE = "ExceptionManagement"/> |
Utilities.csproj | <UserProperties TDLFILE = "CustomDistributedAppTemplate.TDL" TDLELEMENTTYPE = "Utilities"/> |
WebUI.csproj | <UserProperties TDLFILE = "CustomDistributedAppTemplate.TDL" TDLELEMENTTYPE = "WebUI"/> |
WebService.csproj | <UserProperties TDLFILE = "CustomDistributedAppTemplate.TDL" TDLELEMENTTYPE = "WebService"/> |
Any template that is not visible to the user will not be of any value. So, the next step is to make the template available in the New Project dialog box so that it can be found and used by others.
Page 3 of 4
This article was originally published on June 20, 2003