OK, so I got flamed a bit for sending around this article - .NET Architecture Center: : Secrets of Great Architects. Yes, you have to (try and) ignore the gung-ho Microsoft-speak about "being a *great* architect" but the fundamentals are all there.
Possibly this is a better article Realizing a Service-Oriented Architecture with .NET - it's shorter, easier to read and the pictures make more sense. The scope is a litter narrower, but still a useful read for anyone who thinks 'architecture' is only for buildings.
This info on Developing Identity-Aware ASP.NET Applications is useful and "also provides detailed prescriptive guidance for implementing intranet and extranet ASP.NET applications that are integrated with Active Directory."
Monday, 6 September 2004
Wednesday, 1 September 2004
Localization Resources with ASP.NET 2.0
Two CodeProject articles on Creating multilingual websites are great sources of information, and actually mirror the way I've also approached the problem with my own projects.
But something I hadn't read much about (yet) is Using Resources for Localization with ASP.NET 2.0 (Fredrik Normén's) which was linked from CodeProject. The approach in ASP.NET 2.0 still seems a bit clumsy to me - still no "built in" way to have site-wide localization management, nor a simple cross-over between localization of static elements (such as labels, text, html elements) and database-resident information (product names, news items, etc). You could argue that there are a multitude of possibilities and that Microsoft can't address all possible permutations -- but why not at least offer a basic solution, like they do for Authentication, Personalization, MasterPages, etc???
But something I hadn't read much about (yet) is Using Resources for Localization with ASP.NET 2.0 (Fredrik Normén's) which was linked from CodeProject. The approach in ASP.NET 2.0 still seems a bit clumsy to me - still no "built in" way to have site-wide localization management, nor a simple cross-over between localization of static elements (such as labels, text, html elements) and database-resident information (product names, news items, etc). You could argue that there are a multitude of possibilities and that Microsoft can't address all possible permutations -- but why not at least offer a basic solution, like they do for Authentication, Personalization, MasterPages, etc???
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.
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
This MSDN article on CustomControlCache in the metabase explains how to set
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
There's also this information Microsoft IIS 5.0: IIS Optimization and the Metabase but it's not that useful either...
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 translate.com 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.
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:
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...
Thursday, 29 July 2004
String.Format("{0}", "formatting string"};
I can never remember all the options for string formatting, particularly the ability to 'pad' strings - in the past I've written padding methods in C# because I didn't know about the format specifier!
idunno.org: String.Format("{0}", "formatting string"}; has a good reference for the most common format specifiers...
idunno.org also has a good reference for accessing IndexServer from .NET.
idunno.org: String.Format("{0}", "formatting string"}; has a good reference for the most common format specifiers...
idunno.org also has a good reference for accessing IndexServer from .NET.
Sunday, 18 July 2004
ASP.NET HtmlControls vs WebControls
One of my 'standard' questions when interviewing for ASP.NET Developer roles is What is the difference between HtmlControls and WebControls?
I have not yet received a really good answer from any candidate, and I've been using this question for over 18 months in a number of interviews... I've just finished another round of interviews and haven't found much understanding of this stuff!
These two articles go some way towards explaining the issues:
What I want to hear is:
Things I don't want to hear are: HtmlControls don't run on the server, HtmlControls don't have ViewState support, HtmlControls are somehow less useful, confusing HtmlControls with non-runat=server Html tags in the source.
If you've done any Mobile development then it might help if you know how the BroswerCaps works to render cHTML/WML/etc on different devices...
Bonus points for: Mentioning the INPUT TYPE=FILE HtmlControl and how it works when run as an HtmlControl, mentioning the asp:Literal control and how all 'static' text between Server Controls on a page becomes an instance of the Literal control during page parsing, mentioning the more complex WebControls such as Date Picker and the Validation controls.
You're hired if: you can explain what happens when WebControls are rendered on up- and down-level browsers; you can explain the barriers to the WebControls being rendered as up-level on non-IE browsers, the issues with the Validation controls in thisi scenario and how to fix them; and you know why these two namespaces are significant for control rendering System.Web.HttpBrowserCapabilities and System.Web.Mobile.MobileCapabilities...
I wonder how many candidates 'Google' their prospective employers/interviewers...
UPDATE: words to avoid in your resume
I have not yet received a really good answer from any candidate, and I've been using this question for over 18 months in a number of interviews... I've just finished another round of interviews and haven't found much understanding of this stuff!
These two articles go some way towards explaining the issues:
What I want to hear is:
- With HtmlControls, you *know* what the output will look like at design time (basically what you've typed, with the runat="server" gone)
- The HtmlControl.HtmlGenericControl is the *only* way to accomplish some things neatly like manipulating the TITLE, META and other tags
- WebControls have a 'consistent' object model (ie. they all have a .Text property, whereas HtmlControls might require using .Value or .InnerHtml)
- WebControls *may* be rendered differently depending on their attributes OR the BrowserCaps of the browser. Eg. an asp:TextBox might be rendered as an INPUT or TEXTAREA if TextMode="mulitline"; the Date Picker will be drastically different on up- and down-level browsers
Things I don't want to hear are: HtmlControls don't run on the server, HtmlControls don't have ViewState support, HtmlControls are somehow less useful, confusing HtmlControls with non-runat=server Html tags in the source.
If you've done any Mobile development then it might help if you know how the BroswerCaps works to render cHTML/WML/etc on different devices...
Bonus points for: Mentioning the INPUT TYPE=FILE HtmlControl and how it works when run as an HtmlControl, mentioning the asp:Literal control and how all 'static' text between Server Controls on a page becomes an instance of the Literal control during page parsing, mentioning the more complex WebControls such as Date Picker and the Validation controls.
You're hired if: you can explain what happens when WebControls are rendered on up- and down-level browsers; you can explain the barriers to the WebControls being rendered as up-level on non-IE browsers, the issues with the Validation controls in thisi scenario and how to fix them; and you know why these two namespaces are significant for control rendering System.Web.HttpBrowserCapabilities and System.Web.Mobile.MobileCapabilities...
I wonder how many candidates 'Google' their prospective employers/interviewers...
UPDATE: words to avoid in your resume
Saturday, 17 July 2004
"Universal" or "Neutral" Spanish Translations
There's always something new to learn about software localization - for instance
Microsoft's approach to creating "Universal" or "Neutral" Spanish Translations.
I suppose if you asked the 'person on the street' they might think there _is_ only one Spanish (or French, for example) language - at the other extreme if you asked a Mexican, Bolivian (or New Caledonian/French Canadian) they would probably insist their native tongue is quite distinct from that used in Spain (or France).
When faced with localization in these languages, the two obvious solutions might be:
* use the 'original' language and expect it to work in all other countries; or
* localize into each and every 'dialect' of the language to ensure you do not alienate customers in each country.
The (think outside the square) solution is, of course, to merge these two ideas -- purposefully structure the language you use so that it appears natural to ALL speakers. That's actually a lot harder than it sounds, but reducing the number of software versions you have to ship from ten to one (eg. in Spanish) certainly appears to make it worthwhile. This i18nguy article about Microsoft discusses the concept of “Universal” or “Neutral” Spanish and particularly Latin American Spanish (es-americas).
Microsoft's approach to creating "Universal" or "Neutral" Spanish Translations.
I suppose if you asked the 'person on the street' they might think there _is_ only one Spanish (or French, for example) language - at the other extreme if you asked a Mexican, Bolivian (or New Caledonian/French Canadian) they would probably insist their native tongue is quite distinct from that used in Spain (or France).
When faced with localization in these languages, the two obvious solutions might be:
* use the 'original' language and expect it to work in all other countries; or
* localize into each and every 'dialect' of the language to ensure you do not alienate customers in each country.
The (think outside the square) solution is, of course, to merge these two ideas -- purposefully structure the language you use so that it appears natural to ALL speakers. That's actually a lot harder than it sounds, but reducing the number of software versions you have to ship from ten to one (eg. in Spanish) certainly appears to make it worthwhile. This i18nguy article about Microsoft discusses the concept of “Universal” or “Neutral” Spanish and particularly Latin American Spanish (es-americas).
Thursday, 15 July 2004
MS: Hazards of Hiring
The Hazards of Hiring is the last topic I expect to read about on MSDN -- but relevant since I'm hiring at the moment.
The other article I found useful was the Guerrilla Guide to Interviewing, which I may have blogged previously (but it's worth another look).
UPDATE [7-Sep] WHY is it that candidates no longer feel any compulsion to do any research on a company before attending an interview. My first question is always "What have you learned about our company?" or "Did you review our website?" -- the answers to which are inevitably "No..." Why waste your time (and mine) by turning up to an interview where you don't even understand what our company does? This laziness is so common that it's ceased to be a useful measure of a candidate's interest in a position, because NONE of them bother to do it!
The other article I found useful was the Guerrilla Guide to Interviewing, which I may have blogged previously (but it's worth another look).
UPDATE [7-Sep] WHY is it that candidates no longer feel any compulsion to do any research on a company before attending an interview. My first question is always "What have you learned about our company?" or "Did you review our website?" -- the answers to which are inevitably "No..." Why waste your time (and mine) by turning up to an interview where you don't even understand what our company does? This laziness is so common that it's ceased to be a useful measure of a candidate's interest in a position, because NONE of them bother to do it!
Wednesday, 7 July 2004
Character-set/encoding detection using C# - NCharDet
NCharDet is a C# port of the Java JCharDet, which is based on C++ code used in the Mozilla open-source browser project.
I don't yet fully understand the implications of the Netscape Public Licence so the code is just posted on my website for now.
I was disappointed that I couldn't find info on this already available on the web - particularly that no-one seems to have got MLang.dll running under COM Interop with C#/.NET...
I don't yet fully understand the implications of the Netscape Public Licence so the code is just posted on my website for now.
I was disappointed that I couldn't find info on this already available on the web - particularly that no-one seems to have got MLang.dll running under COM Interop with C#/.NET...
Saturday, 3 July 2004
Populating a Search Engine with a C# Spider on [The Code Project]
My two Searcharoo search engine articles are now also available on The Code Project
as well as on my personal website... a friend suggested they might get better coverage there - and so far a couple of very useful comments, so it was a good idea!
ALSO I just came across an excellent article about Integrating Unit Testing into the Software Development Lifecycle - check it out.
AND FINALLY, this is also a great post/book review of Debugging the Development Process by Steve Maguire. Even if you don't read the book - READ THE POST.
- Static-Site Search Engine with ASP.NET/C#
- The Code Project - Populating a Search Engine with a C# Spider - ASP.NET
as well as on my personal website... a friend suggested they might get better coverage there - and so far a couple of very useful comments, so it was a good idea!
ALSO I just came across an excellent article about Integrating Unit Testing into the Software Development Lifecycle - check it out.
AND FINALLY, this is also a great post/book review of Debugging the Development Process by Steve Maguire. Even if you don't read the book - READ THE POST.
Wednesday, 30 June 2004
VS.NET 2005 : Why is MS Hard Coding?
I've Seen the Future and It's Hard Coded talks about the new /Data, /Code and /Themes folders in ASP.NET 2.0
I hadn't really thought that much about it, but it is unfortunate that MS hasn't made the foldernames 'more unique' or configurable. If an ASP.NET 1.1 website uses folders with those names, you may have to update your data/links/etc... although I wonder if it wouldn't be too hard to write an HttpHandler to intercept requests for "your" /Code path and process it using HttpContext.Current.RewritePath and an alternate directory-name like /MyCode
Hmmm - planning to download Express soon, so I might give that a try...
I hadn't really thought that much about it, but it is unfortunate that MS hasn't made the foldernames 'more unique' or configurable. If an ASP.NET 1.1 website uses folders with those names, you may have to update your data/links/etc... although I wonder if it wouldn't be too hard to write an HttpHandler to intercept requests for "your" /Code path and process it using HttpContext.Current.RewritePath and an alternate directory-name like /MyCode
Hmmm - planning to download Express soon, so I might give that a try...
Word stemming for Search
Version 2 of Searcharoo is now online (although still in final draft form) and I'm starting to think about the version 3.
The first priority is building a database and/or file-based persistance layer, but other more advanced search-type technology is also on my mind, including STEMMING :
What is Stemming?
Paice/Husk stemmer modifications by Antonio Zamora
Limitations of Stemming
and for Japanese text (which I'm also interested in)...
A WWW JAPANESE DICTIONARY and article 2
and
The Challenges of Intelligent Japanese Searching
The first priority is building a database and/or file-based persistance layer, but other more advanced search-type technology is also on my mind, including STEMMING :
What is Stemming?
Paice/Husk stemmer modifications by Antonio Zamora
Limitations of Stemming
and for Japanese text (which I'm also interested in)...
A WWW JAPANESE DICTIONARY and article 2
and
The Challenges of Intelligent Japanese Searching
Saturday, 26 June 2004
JoelOnSoftware gets flamed
SecretGeek writes How Microsoft Lost the Joel War and it's pretty good too.
TODO Driven Development beats eXtreme Programming and TestDriven Development hands-down :-)
TODO Driven Development beats eXtreme Programming and TestDriven Development hands-down :-)
Friday, 25 June 2004
Open-source .NET search engine : Nata1
The Homepage of Nata1 is now 'live' and contains an article about implementing a .NET search engine using either custom data structures, Index Server or Google.
The search input and results are highly customizable using templated controls that have some VS designer support, and you can use Google on your site without having to deal with their API.
Interesting 'search' project to watch...
The search input and results are highly customizable using templated controls that have some VS designer support, and you can use Google on your site without having to deal with their API.
Interesting 'search' project to watch...
Thursday, 24 June 2004
Writing Language-Portable Transact-SQL...
Writing Language-Portable Transact-SQL... and no it doesn't mean C#, VB or JScript - this article actually discusses some of the more esoteric issues relating to SQL Server and multilingual data (you know, languages other than English) including interpreting dates, Unicode fields and 'collation'.
Useful if you are unsure about how to approach these issues in SQL - although it does make it sound more complex than it really is (for simple applications)... Some date handling should just be common sense by now!
Useful if you are unsure about how to approach these issues in SQL - although it does make it sound more complex than it really is (for simple applications)... Some date handling should just be common sense by now!
Wednesday, 23 June 2004
CassiniEx Web Server
I think Whidbey (VS.NET05) has a version of Cassini built-in as the 'development server' -- but this looks pretty cool and is available "now"...
CassiniEx Web Server is an enhanced open-source version of Microsoft's cut-down C# web server. I currently start 2 or 3 Cassini sessions (port 8081, 8082, 8083...) on my XP Home machine when I'm developing/debugging with #develop and WebMatrix. Hoping that CassiniEx will make my XP Home development environment a whole lot easier to manage... it's downloading now...
OT: Parsing CSV files using the ODBC Text driver could come in really handy - although I'm not quite sure for what, yet.
CassiniEx Web Server is an enhanced open-source version of Microsoft's cut-down C# web server. I currently start 2 or 3 Cassini sessions (port 8081, 8082, 8083...) on my XP Home machine when I'm developing/debugging with #develop and WebMatrix. Hoping that CassiniEx will make my XP Home development environment a whole lot easier to manage... it's downloading now...
OT: Parsing CSV files using the ODBC Text driver could come in really handy - although I'm not quite sure for what, yet.
Sunday, 20 June 2004
Unicode and multilingual support in HTML...
Don't know how I've not come across Unicode and multilingual support in HTML, fonts, Web browsers and other applications before.
Definitely a great addition to my Localization and Globalization info.
OT: Found my first commercial use for ExtendedHtmlUtility.HtmlEncode() today: a client's website is hosted on an ISP's Apache Server - configured to ALWAYS set the HTTP Header Content-Type: Shift_JIS. This was making it impossible to serve Korean and Chinese pages from this server, since W3C says
Which means the browse (IE, Firefox, Netscape, etc.) will ALWAYS think the page is Shift_JIS (Japanese) and not display Korean or Chinese text correctly!
By converting ALL the non-ASCII (well, all non-Shift-JIS actually) characters into Html Entities (eg. Ӓ) the page will be successfully displayed in Korean or Chinese with the encoding set to Shift_JIS (because [ & # 1-9 ; ] are all valid Shift_JIS characters, and once they're resolved into their Unicode characters, the browser is happy to display them using whatever font-settings (or mappings) it knows about, regardless of the actual page encoding!.
It's not ideal, but at least it works - even in Netscape 4.7 (as long as you have specified the correct fonts, because we all know how dumb NS4 is at font substitution). I suspect if the pages had any 'text' within Javascript strings/variables/etc that would have caused a problem... Luckily not (this time).
Definitely a great addition to my Localization and Globalization info.
OT: Found my first commercial use for ExtendedHtmlUtility.HtmlEncode() today: a client's website is hosted on an ISP's Apache Server - configured to ALWAYS set the HTTP Header Content-Type: Shift_JIS. This was making it impossible to serve Korean and Chinese pages from this server, since W3C says
To sum up, conforming user agents must observe the following priorities when determining a document's character encoding (from highest priority to lowest):
- An HTTP "charset" parameter in a "Content-Type" field.
- A META declaration with "http-equiv" set to "Content-Type" and a value set for "charset".
- The charset attribute set on an element that designates an external resource.
Which means the browse (IE, Firefox, Netscape, etc.) will ALWAYS think the page is Shift_JIS (Japanese) and not display Korean or Chinese text correctly!
By converting ALL the non-ASCII (well, all non-Shift-JIS actually) characters into Html Entities (eg. Ӓ) the page will be successfully displayed in Korean or Chinese with the encoding set to Shift_JIS (because [ & # 1-9 ; ] are all valid Shift_JIS characters, and once they're resolved into their Unicode characters, the browser is happy to display them using whatever font-settings (or mappings) it knows about, regardless of the actual page encoding!.
It's not ideal, but at least it works - even in Netscape 4.7 (as long as you have specified the correct fonts, because we all know how dumb NS4 is at font substitution). I suspect if the pages had any 'text' within Javascript strings/variables/etc that would have caused a problem... Luckily not (this time).
Wednesday, 9 June 2004
UrlEncode vs. HtmlEncode
In an earlier blog about Html Entities and Unicode I touched on the HtmlEncode() method.
This page UrlEncode vs. HtmlEncode contains the complete framework HtmlEncode() method using Reflector. It clarifies exactly what to expect from the method, and confirms that HtmlEncode() only converts a subset of Unicode characters into Html Entities (eg. Ӓ).
OT: I really like the look of this site, too.
This page UrlEncode vs. HtmlEncode contains the complete framework HtmlEncode() method using Reflector. It clarifies exactly what to expect from the method, and confirms that HtmlEncode() only converts a subset of Unicode characters into Html Entities (eg. Ӓ).
OT: I really like the look of this site, too.
Subscribe to:
Posts (Atom)