{"id":309,"date":"2002-09-17T15:58:52","date_gmt":"2002-09-18T05:58:52","guid":{"rendered":"http:\/\/www.andrewjohnson.me.uk\/blog\/?p=309"},"modified":"2002-09-17T15:58:52","modified_gmt":"2002-09-18T05:58:52","slug":"whizzy-new-site-features","status":"publish","type":"post","link":"https:\/\/andyjohnson.uk\/blog\/2002\/09\/17\/whizzy-new-site-features\/","title":{"rendered":"Whizzy new site features"},"content":{"rendered":"<p>Today I finally added a couple of new and,&nbsp;ahem,&nbsp;rather snazzy features: a <a href=\"http:\/\/www.andrewjohnson.me.uk\/PhotoCatalogue\/ViewCollection.aspx\">photo album<\/a> and an <a href=\"http:\/\/www.andrewjohnson.me.uk\/index.xml\">RSS feed<\/a>. Just like the proper grown-up blogs have&#8230;<\/p>\n<p align=\"center\">&#8211; # &#8211;<\/p>\n<p>The technical details, for anyone who wants to know.<\/p>\n<p>The photo album is a ASP.NET web application written in C# with a Jet database at the back-end. (I don&#8217;t yet feel like dropping $100\/year for SQL Server.) As with classic ASP, the pages are all generated on-the-fly at the server&nbsp;using the database. The output formatting needs some adjustment and the code is still fairly raw and unforgiving of errors, but hey &#8211; it works.<\/p>\n<p>This was my first webforms app, and it went quite well. Knowing a bit about winforms and its object model&nbsp;certainly helped. Having built an Intranet at Cogsys using classic ASP 2.0, VBScript and InterDev, this experience was certainly several orders of magnitude less painful. Now is probably a good time to get <a href=\"http:\/\/www.amazon.co.uk\/exec\/obidos\/ASIN\/0735615780\/ref=cm_mp_wli_\/202-9972236-1633408?coliid=I39U62GQJ3UVI\">Dino Esposito&#8217;s book<\/a> to find out how I should have done it.<\/p>\n<p>By contrast, the RSS feed&#8217;s XML&nbsp;is built by <a href=\"http:\/\/www.andrewjohnson.me.uk\/Colophon.aspx\">CityDesk<\/a> when it generates the site. No dynamic server-side stuff at all, just a statically generated file.&nbsp;Viewed from within CityDesk, its really just some boilerplate XML with an embedded CityScript loop that iterates over all the articles in the&nbsp;CityDesk database. For each article, it then emits a chunk XML with appropriate tag values pulled out of the article&#8217;s properties. Although this approach is nice and simple, it does have one problem. Because CityScript lacks string manipulation functions, I can&#8217;t escape any HTML tags in the &lt;description&gt; block, and therefore I can&#8217;t have hyperlinks inside the description text.<\/p>\n<p>(If you&#8217;ve got this far and you still don&#8217;t know what RSS is, take a look <a href=\"http:\/\/gils.utah.gov\/rss\/\">here<\/a>. Its cool stuff indeed.)<\/p>\n<p>Ultimately, and time permitting, I intend to cut the dependence on CityDesk by re-implementing the whole site using ASP.NET, with the dynamic content in a database. Even if nobody ever reads the site, it&#8217;ll be a nice learning exercise.<\/p>\n<p align=\"center\">&#8211; # &#8211;<\/p>\n<p><strong>Update<\/strong>: 22nd October 2002. Found a fix for&nbsp;the tage escaping problem described above. The<a href=\"http:\/\/www.fogcreek.com\/CityDesk\/kb\/fog0000000056.html\">solution<\/a> is to bracket the field in a [CDATA[ &#8230; ]] .block<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I finally added a couple of new and,&nbsp;ahem,&nbsp;rather snazzy features: a photo album and an RSS feed. Just like the proper grown-up blogs have&#8230; &#8211; # &#8211; The technical details, for anyone who wants to know. The photo album is a ASP.NET web application written in C# with a Jet database at the back-end. &hellip; <a href=\"https:\/\/andyjohnson.uk\/blog\/2002\/09\/17\/whizzy-new-site-features\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Whizzy new site features&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-309","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/posts\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/comments?post=309"}],"version-history":[{"count":0,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/posts\/309\/revisions"}],"wp:attachment":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/categories?post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/tags?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}