As you can see from the code bellow it is very easy to create a Server Control that takes in a SiteMapDataSource. Simply get a SiteMapNodeCollection  from the provider and iterate through it and build your html.

This way you can create controls to fit your design and still have all the ability to manage your site from the xml file. Also you are able to get all the roles and user accessibility for each node.

Source Code:

using System;

using System.Data;

using System.Configuration;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

namespace Yournamespace.UI.WebControls
{

///

/// Summary description for MenuTop

///

[ Serializable()]

public class MenuSiteMap : Panel

{

private SiteMapDataSource xds;

public SiteMapDataSource DataSource

{

get

{

return xds;

}

set

{

xds = value;

}

}

protected override void OnDataBinding(EventArgs e)

{

base.Controls.Clear();

base.OnDataBinding(e);

SiteMapNodeCollection smnc;

xds = this.DataSource;

smnc = xds.Provider.GetChildNodes( xds.Provider.RootNode);

Literal lit = new Literal();

lit.Text = ”

    “;

    base.Controls.Add(lit);

    foreach (SiteMapNode item in smnc)

    {

    lit = new Literal();

    lit.Text = ”

  • “;

    bse.Controls.Add(lit);

    HyperLink lnk = new HyperLink();

    lnk.Text = item.Title;

    lnk.NavigateUrl = item.Url;

    base.Controls.Add(lnk);

    lit = new Literal();

    lit.Text = ”

    “;

    base.Controls.Add(lit);

    }

    lit = new Literal();

    lit.Text = “

“;

base.Controls.Add(lit);

base.Controls.Add(lit);
}
}
}

In my previous post i was talking about retro fitting extreme programming into agile programming… well guess what its been already defined… its called… SCRUM

So what is Scrum development?
It’s a team based, project segmentation development pattern. So whats so new about it nothing really its just a mash up of old and new practices. The project gets split into small segments( or feature for you agile guys) and each team (like in extreme programming) works on a segment.

Since this is basically building developing a project out of small components. The smaller the component the faster you can build the system.

the reason i like this idea is because its an extensible development process.

References:

  1. Control Chaos: http://www.controlchaos.com/about/]
  2. Wikipedia: http://en.wikipedia.org/wiki/Scrum_%28development%29


What do i mean by Retro Fitting Extreme Programming Into Agile development?!?!???

Agile Development also known as Feature Driven Development, this is where you build a list of features and the order that they are to be implemented. This responsibility can be placed on the Software Architect or Senior developer.

Extreme Programming also known as Test Driven Development is where you build your test before you code. This responsibility usually is place and should be placed on the Developer and programmers at a slightly Lower level.

I don’t see a reason why these two styles (or methodology) should conflict. You can simply write a set of tests for a feature in your feature list. This should give FDD a bigger success rate.