Upgrading from Web Client Software Factory June 2007 Release to New Application Blocks

As mentioned in the previous topic New in This Guidance Bundle, there are changes in the application blocks that will require changes to existing Web Client Software Factory June 2007 solutions.
The following table lists the suggested changes to upgrade an existing Web Client Software Factory June 2007 solution to make it work with the new application blocks.

Compatibility issue Suggested change
Solution needs to reference the new application blocks. Microsoft.Practices.ObjectBuilder.WCSFExtensions is merged into Microsoft.Practices.CompositeWeb.ObjectBuilder. Delete all references to the application blocks which includes references to Microsoft.Practices.CompositeWeb, Microsoft.Practices.ObjectBuilder.WCSFExtensions, Microsoft.Practices.CompositeWeb.EnterpriseLibrary. Then add the references to the new version of the application blocks which includes Microsoft.Practices.CompositeWeb and Microsoft.Practices.CompositeWeb.EnterpriseLibrary. If you are upgrading a Web site project, use the Property Pages dialog box to do this.
Dependency injection needs to be called explicitly for MasterPages, pages, and user controls to work correctly. This change will show up at run time. A MasterPage should derive from Microsoft.Practices.CompositeWeb.Web.UI.MasterPage instead of System.Web.UI.MasterPage. A page should derive from Microsoft.Practices.CompositeWeb.Web.UI.Page instead of System.Web.UI.Page. A user control should derive from Microsoft.Practices.CompositeWeb.Web.UI.UserControl instead of System.Web.UI.UserControl.
ModuleInitializer’s load method signature requires the use of the concrete class instead of the ICompositionContainer. This change will be detected at compile time. In the ModuleInitializer’s load method, use the concrete class CompositionContainer instead of ICompositionContainer.
Microsoft.Practices.ObjectBuilder.WCSFExtensions is merged into Microsoft.Practices.CompositeWeb.ObjectBuilder. This change appears at compile time. Change using statements from using Microsoft.Practices.ObjectBuilder.WCSFExtensions; to using Microsoft.Practices.CompositeWeb.ObjectBuilder;.
ServiceException and ModuleDependencySolverException no longer extend ApplicationException. They now extend Exception. Check your code for places you are catching ApplicationException and see if you need to change it to catch specific exception types instead.
RootContainer is no longer accessible through Application[ApplicationConstants.RootContainer] state value. This is now only accessible through the WebClientApplication.RootContainer property. Replace Application[ApplicationConstants.RootContainer] with WebClientApplication.RootContainer everywhere Application[ApplicationConstants.RootContainer] is used.

Last edited Nov 19, 2007 at 8:31 PM by siacomuzzi, version 1

Comments

No comments yet.