Monday, 16 August 2004

About the Provider Model...

I'm planning to use the Provider pattern to abstract implementation details in my search-engine project (Searcharoo), so I'm always interested to read about it. Another search project - Nata1 has implemented the pattern, although I haven't looked at what they've done.

Provider Model Misconceptions is a useful resource that discusses some of the concepts.

Oh, don't forget Part 2 of the MS pattern article.

Wednesday, 11 August 2004

IIS Cache-control: private

Interesting question today: IIS sets a default
cache-control: private header for ASP and ASPX requests which Microsoft justifies by saying that "dynamically generated pages aren't normally expected to be cached"... but where is this value _set_ in IIS and can it be easily turned off without asp/x code or ADSI script???

This MSDN article on CustomControlCache in the metabase explains how to set CacheControlCustom = "no-cache" but I cannot find it 'pre-set' anywhere in the metabase as a default value.

This sounds like it will work for .swf and other custom MIME types that you might want to set specific cache policies for, but it's very dodgy; appending a CRLF and 'fake' cache-control header to the content-type sent by IIS... surely this would 'break' if a cache-control: header was also sent another way (such as 'cachecontrolcustom' above) - would result in two possibly conflicting headers...

There's also this information Microsoft IIS 5.0: IIS Optimization and the Metabase but it's not that useful either...

Wednesday, 4 August 2004

Using XML in Localization

I will never understand why a company that owns calls itself "Enlaso"... but they have some interesting content on their website, including
Using XML in Localization.

The Rainbow tools might also be useful, offering simple encoding conversions, line-break conversion, RTF processing and other utilities... although I haven't tried them out myself (yet)

While we're talking about XML and L10n, Xliff is my favourite standard right now.

Tuesday, 3 August 2004

c# Enums

Enums are a very useful way to improve code readability, speed-up coding (think intellisense autocomplete) and enforce business rules... but there are also niggly little issues like having to figure out the Enum.Parse method and how to AND/OR Enums together using the [Flags] attribute.

Thankfully, here's a very useful post of links to all sorts of Enum-related info
Enums + Attributes = Swiss Army Knife

And a very useful sample lives here Associating string values to items in code with code.

Decorating Enums with string attributes sounds like it could be used to solve two ongoing problems:
  • localizing(translating) the meaning of an Enum for display to a user, maybe using some sort of 'translation key' attribute; and
  • linking the Enum type to some underlying database lookup table to which it is related...