Scott Hanselman

dasMonthView - dasBlog now includes a complete Year View...and I'm spent.

May 22, 2004 Comment on this post [3] Posted in ASP.NET | DasBlog
Sponsored By

I'm sitting here in the WS Interop Day tinkering with this dasBlog MonthView I was doing.  I've added a view that displays your blog (item titles) in a calendar for a year. 

Do check it out.  I'll give it to Omar this week and we'll get it into the source tree ASAP if folks dig it.

Updates since yesterday ;) :

  • If an entry doesn't have a Title, then I'll strip all HTML tags and take the first 50 characters of the content and add an ellipsis.  Many of my old Radio Userland posts from 2002 that I imported into dasBlog have this problem.
  • Should work but not tested: This page adds no new Resource strings and uses Invariant dates in the QueryString so the Calendar(s) should render in multiple languages (and possibly other calendar systems, such as Thai Bhuddist, as I make no assumptions as to how many months are in a year, etc.) Perhaps some attention to VaryByHeaders="Accept-Language" may be needed.
  • This is a ridiculously expensive page, second only to Search, so it includes Poorman's caching for 15 minutes.  <%@ OutputCache Duration="900" VaryByParam="*" %>  Certainly change this value to taste.  Arguably it should STAY cached until the cache is explicitly invalidated.  I think there's some stuff in dasBlog to do that, I just didn't going looking for it. 
  • I output the time the page was rendered at the TOP of the page (rather than the standard dasBlog rendered footer) just cause it's nice to know when these things get built.
  • Clicking on the Weblog Calendar view takes you to MonthView.aspx without any QueryString parameters.  This shows you the entries for the current month.  From here you can go forward and backward with the Next/Prev buttons.  This will be MonthView.aspx?month=YYYY-MM.
  • Clicking on a Year number at the top of the page will take you to a page with all the months filled out.  This is MonthView?year=YYYY.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
May 22, 2004 22:59
Yep. Very cool!
May 23, 2004 1:33
Cool stuff!
May 23, 2004 8:21
Hi. I'm a first-time caller -- love the show ...

I find the giant calendar layout to be a bit unwieldy. From a "browsing for old posts" point of view, I would find a straight list to be more useful, like so:

Sun Apr 4 MVP Summit - Seattle Day 1
Mon Apr 5 XML sucks less than Regular Expressions, ya think?
Mon Apr 5 Celebrity Sighting
...

While the table calendar can be fun, a list calendar is easier to read/scan for information (and format with CSS).

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.