Scott Hanselman

Internationalization/Globalization and ASP.NET Brainstorming at 1:05am

September 22, 2003 Comment on this post [0] Posted in ASP.NET | DasBlog | Internationalization | TechEd | Speaking | Tools
Sponsored By

I presented at ASPLive! and TechEd 2003 on Internationalizing ($g(i18n)) ASP.NET.  I know that the story changes with Whidbey and changes dramatically post-Whidbey, but until then...what are the best practices for ASP.NET 1.1?   DasBlog is a good example, as is (IMHO) the code I showed at the conferences.  Each takes certain approaches for performance vs. ease of i18n vs. avoiding $g(code smell).

Some random thoughts, some questions, some rethorical, some I could use comments/thoughts on:

  • Store a single ResourceMananger in the Application Object and either yank and cast as needed or stick it in some base blass.  [Seems reasonable.  Preferable over instantiating on each page?]
  • Create a base class (LocalizedPage, etc) that introduces an "OnLocalize" method and event, and performance most of your i18n there. [Good, but usually only an 80% solution.  Does let you bypass localization for the default language, though, and that's a BIG performance gain.]
  • For DataGrids, piggyback on DataBinding and do your i18n here [Not bad, easy, tends to spread i18n code out]
  • Localize in the .aspx page with <%#resMan.getString("someresourcename")> [Good, avoid cluttering code behind, also allows for quick changes without recompiles, although forces localization in the default language]

This and other questions burn...time to refactor...Now this looks like an interesting tool that makes ASP.NET localization more like WinForms localization.  I'll check out the trial, but I suspect it will break down when faced with complex ASP.NET DataGrids (definitely non-trivial to localize).

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Technology and the first insulin pump...

September 20, 2003 Comment on this post [2] Posted in Diabetes | Web Services
Sponsored By

Sorry this isn't a technical post. :) I will continue to make this blog about the "Zen" of Computers, particularly .NET and Web Services...watch for a new look for the site very soon...

That being said, just when I start to feel lousy about being hooked up to an $g(insulin pump) 24 hours a day, I see this picture of the first insulin pump from 1978.  Guess I have little to complain about!

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Note to self: Buy diverse dolls

September 19, 2003 Comment on this post [0] Posted in Musings
Sponsored By

This is quite a clever idea.  I grew up with action figures and such of all colors, but this is a good reminder to me that when we do have kids (who will be diverse in their own right) to make sure their dolls and toys represent the real world, and the complete spectrum of diversity.  I was very fortunate growing up in a largely non-white neighborhood to get to attend many churches, synagogues, and mosques.

 

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Bring all my Radio UserLand comments over to dasBlog

September 19, 2003 Comment on this post [0] Posted in Web Services | DasBlog | Javascript
Sponsored By

Well, last night's ephipany was right-on.  I finished DasBlogRadioCommentImport and ran it last night, importing hundreds of reader comments and successfully integrating them into each related dasBlog entry.  Let me know if you want the code via email.  When I get access, I'll post it on the GotDotNet workspace.

All in all, the Radio "conversion" was a big stick of butter. Here's the goodness:

  • Taking Clemen's lead, I modified my Radio template to include JavaScript and META refresh tags.  Some Details here.
  • dasBlog handles these redirects with a regular expression based $g(Url Rewriting) Module that is pure genius.  I added a series of expressions that didn't exist in order to handle Radio Categories and Radio Stories.
  • I imported all the Radio content with the included DasBlogRadioImporter.  Good.
  • Then I wrote DasBlogRadioCommentImport.  Better.

All in all, for existing Radio Userland users, dasBlog offers a fantastic migration story.  All my existing Google Radio links work.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Importing existing Radio Comments into dasBlog

September 18, 2003 Comment on this post [0] Posted in DasBlog
Sponsored By

I was sitting here doing some writing for work and out of nowhere came a flash, and I knew exactly how I could write a small command line util to import over a year of reader comments from Radio Userland into my new dasBlog setup. Coming soon, and Peter Provost shall be my first tester! ;)

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

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