Tuesday 26 October 2004

Page Inheritance In ASP.NET

Page Inheritance In ASP.NET is a favourite topic of mine, and although I've implemented a similar model to this in the past, I like how Jon's written it up.

Sunday 24 October 2004

C# "using" Tricks

Interesting idea from whatever: Stupid "using" Tricks -- scroll down to WriteEndElement and the discussion on writing xmlWriter...

Xml Sucks...

Well, not really - but some people obviously think XML has some serious deficiencies.

Came across that link - a long read but interesting points-of-view - while searching for info on the iTunes (rocks!) Music Library XML file. I want to move info between two installs of iTunes (song ratings, # plays, etc) and thought hacking the XML file would be fairly easy. However, the XML file itself it weird and not what you'd expect from a semantically-rich XML syntax.
<plist version="1.0">
<dict>
<key>Major Version</key><integer>1</integer>
<key>Minor Version</key><integer>1</integer>
<key>Application Version</key><string>4.6</string>
<key>Music Folder</key><string>file://localhost/F:/My%20iTunes/</string>
<key>Library Persistent ID</key><string>037D341EA9748F0D</string>
<key>Tracks</key>
<dict>
<key>136</key>
<dict>
<key>Track ID</key><integer>136</integer>
<key>Name</key><string>Evolution (Intro)</string>
<key>Artist</key><string>Bliss n Esso</string>
<key>Album</key><string>Flowers In The Pavement</string>
<key>Genre</key><string>Hip-Hop</string>
etc...

My first impression was that it was a pretty crappy XML implementation... so I jumped onto Google to see what others thought.

This article Playlist to XML had an interesting comment by Bob Ippolito:

>>"The plist format is nasty, whoever designed it really didn't know anything about XML."
>That's just totally wrong. XML Property Lists are a very unambiguous and simple serialization format. They're designed to be extremely simple and fast to parse (no attributes, etc.) because they're ubiquitous in OS X.
So maybe I was being too harsh on the format -- never jump to conclusions or make assumptions about technology! Try to anticipate the creator's goals rather than dumping on something because it doesn't fulfil yours. Here's Apple's doco fyi.

Anyway, the same blog has some useful code for transforming the iTunes format : Cleaning up iTunes plist XML. It's not quite what I want... but will get to that another time.

Tuesday 19 October 2004

On NHibernate...

Object-relational modelling is an interesting topic - but it just seems so different/foreign that it's hard to know where to start.

It's helpful to read positive comments like these article: NHibernate and NHibernate Part Two, but there are soe many other options, like NPersist and many others...

Paul Wilson has a lot to say on Examples of O/R Mapping vs Stored Procedures

Anyway, eventually we'll get around to implementing something... somewhere...

SOT: The REAL Reason Behind the ObjectSpaces Furor

Open Lucene.NET

Wow - I didn't know that Lucene.net "disappeared" from SourceForge (wonder if selling it will work?)... to be recently replaced by Open Lucene.NET - The Open Source Search Engine.

Thanks Scott.

Tuesday 12 October 2004

VB.NET and C# syntatic diffs

Although I will always use C# by choice, I'm currently using the (better than nothing) tool ANTS.Load which uses VisualBasic for Applications 'automation'...

So, what's a C# programmer to do? Use this handy
VB.NET and C# Comparison

BUT what is VB for the C# @"literal string" ????

Sunday 10 October 2004

"Unable to Start Debugging" with VisualStudio web project

I much prefer Asp.net without web projects but setting it up on a new PC resulted in the dreaded "Unable to Start Debugging" message when I hit F5.

This MSDN article PRB: "Unable to Start Debugging" is NOT the problem in many cases.

It could also be that the site/virtual directory you are attempting to debug is using a different version of the framework than your app (eg. 1.0, 1.1 or 2.0) and requires you to run ASPNET_REGIIS.exe

Or it might be IIS authentication settings...

BUT for me, today, the problem was that my site (using 'Local', not 'Web Project' settings) did not have a web.config file. Simply adding a web.config file fixed the problem (all the above settings already being correct). A 'Web Project' would automatically have a web.config file included, but creating and converting a 'Class Library' to a website did not... Oops!