Declarative SiteMap

Topics: Web Client Software Factory, UIP Application Block discussion, User Forum
Mar 28, 2007 at 5:22 AM
I'm new to Web Client Software Factory.

In ASP .NET 2.0, I have been using the web.sitemap feature to declaratively define the nodes in xml. Is this still possible using WCSF? I noticed that the RegisterSiteMapInformation(ISiteMapBuilderService siteMapBuilderService) method in ShellModuleInitializer is where we add each node manually in the code.

It was convenient to define the role-based nodes using the sitemap xml file. Do I have to programmatically add each node unless i create my own SiteMapProvider that parses an xml manually if I wanted to do it that way?

Mar 28, 2007 at 11:52 AM
You can use the ASP.NET 2.0 site map provider instead of using the one provided in WCSF. just do the modifications in the MasterPage to use the ASP.NET site map provider.
Mar 28, 2007 at 8:48 PM
Thanks, fdagher. Ok. So it sounds quite flexible on this matter. What's the advantage of defining the siteMap nodes in the code then?
Mar 29, 2007 at 12:59 PM
Hi jwkjng,
defining the siteMap nodes in the code is not the best way of doing it for every project. You should do what it better suits your needs instead.
The advantage of doing it in this way, is that you can create the siteMap nodes in the corresponding modules that implement the views, avoiding a centralized sitemap that needs to know about every module in the application. Remember that one of the primary objectives of CWAB and WCSF is decoupling modules, views, etc from each other.

I hope this helps,
Julián Domínguez