laurencetimms.blog.blog.blog

<September 2008>
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011


Navigation

BizTalk-related Blogs

my website

Subscriptions

News


Will code for money.

Post Categories

Article Categories



Generating RSS feeds from code: Trackword Game update

I've taken my little Trackword game a step further. I've implemented a Daily Trackword page which selects a random trackword for the first visitor of the day, and then retains the trackword and the grid ordering for all future visitors that day.

The next step for that page is to build in stats, so players can see how well each other has done - ie who the found the Trackword quickest, who has found the most other words in the grid.

The main reason for the Daily Trackword page was to build an RSS feed containing the Daily Trackword game. That's also live now, at http://www.laurencetimms.com/rss.aspx. The feed shows the five most recent daily games. You can choose to play the Trackword just from the feed (using only the power of your mind, or maybe pen and paper), or click the link to open the relevant Daily Trackword page.

I realise that the dateline on the Daily Trackword feed & page is coming out in German! My host space is in Germany, and I haven't specified the culture for the date formatting. One of those things you never expect to have to do...

Main discovery: the RSS schema is really simple and obvious. Populating it with some interesting content is harder!

For this RSS feed I pull the Daily Trackword records from the database and assemble them into a DataTable object which is formatted according to the RSS 2.0 spec. I then bind the DataTable to an ASP.NET Repeater control and use DataBinder.Eval to pull the table values out into the Repeater contents. It's an elaboration on the approach described by Scott Mitchell here.

It's all a bit rough and ready, plenty of scope for refinement!

I wonder if this is the first RSS 'game'? I'm sure it's not. Maybe I'm early to the party though; that's good enough for me

posted on Wednesday, November 10, 2004 10:38 AM by laurencetimms





Powered by Dot Net Junkies, by Telligent Systems