DDD South West On The Day

The first DDD event to be held in the South West of England was held on Saturday 23rd May 2009 just a couple of weeks ago. The dust has settled now and I thought I'd write a bit about how it went. DDD South West was held at Queens College in Taunton and was attended by 158 people. There are a bunch of statistics on the DDD South West Statistics page including a map of where everyone came from (predominantly the South West of England!) and a pie chart showing that for 66% of attendees DDD South West was their first experience of a DDD event. The stats page also shows comments from the attendees on the day and it tells us that it went really well and everyone had a good day and learnt lots. In particular this was a recurring theme amongst the comments ? the quality of the speakers and their depth of knowledge. And on this subject, congratulations to Steve Sanderson and Gary Short who came 1st and 2nd respectively in the speakers ranked By Knowledge Of Subject and congratulations equally to Gary Short (again!) and Richard Fennell who came 1st and 2nd respectively in the speakers ranked by Presentation Skills.

DDD South West experimented with a few new ideas with the Alternative Track being the most prominent. Loads of background work went into these 5 sessions hosted mostly by Adam Towler and the Bluewire Technologies team and with a guest appearance of Ross Scott for the Poker Planning and 4 more guys championing their cause in the Balloon Debate. The Balloon Debate was especially fun. The room was packed to the brim to watch Eric Nelson, Gary Short, Gareth Cokell and Marc Gravell slug out a fairly well reasoned debate on whether C#, IronRuby, Visual Basic.NET or F# is the one true development language of choice. There was some serious tactical voting going on at each round and to many people's amazement Gareth Cokell and Marc Gravell were voted off the balloon first (very unjust this). Eric Nelson desperately tried to sabotage his own arguments but it only seemed to draw people into his cause more. Perhaps just to see the look on his face the audience voted him the winner.

At lunch time we had a fantastic round of grok talks that all of our presenters should be really proud of especially when they had to compete with the beautiful day outside. One of my favourite moments of the day was when Ross Scott came to give his grok talk and I mentioned that he was in charge of catering for the day and I didn't get to finish the rest of my sentence thanks to the spontaneous applause - the food (Cornish pasties, cream teas et al) was really was received (we'll work on the coffee for next year).

We also used the event to allow 'new' speakers to speak at a larger event. Our 4 new speakers did a great job. There were some really excellent comments in their session evaluation forms and they faired well in the rankings against speakers who have had a lot more experience at this kind of thing.

And at the end of the day Richard Costall, John Price and Chris Hay of The Next Generation User Group gave another outing of their .NET game shows and chucked out carefully, gently and safely handed out buckets of swag to everyone who took part.

On behalf of the DDD South West Team (Martyn Fewtrell, Chris Myhill, Steve Sanderson, Ross Scott, Jose Simas, Adam Towler and myself) thanks to everyone who came, a big and huge thanks to the DDD South West sponsors, thanks to all of our speakers and lastly thanks to the many people who helped us make this happen on (and before) the day (registration, room monitoring, ferrying people around etc.). See you all again at DDD South West 2.

Photos are available on Flickr.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Wednesday, June 03, 2009 at 11:18 PM
Tags:
Categories: DDD | Events
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (2) | Post RSSRSS comment feed

Localizing ASP.NET MVC

I've noticed that there has been a bit of confusion regarding localization in ASP.NET MVC so I thought I'd write up the solution to try to clear things up. ASP.NET has quite a reasonable localization model as by default it uses the ResourceManager and .resx files all wrapped up fairly neatly using the Generate Local Resources menu option in Visual Studio. Whereas there are some gaps the model is reasonably sound. Where this solution has learnt from previous localization models is in the resource provider model where you can replace the ResourceManager/.resx solution with an alternative resource implementation of your own design such as a WCF resource service. If you are unfamiliar with ASP.NET localization you should get up to speed with it before looking at localization in ASP.NET MVC.


ASP.NET MVC utilizes most of the ASP.NET localization model so the basics of using a resource provider and the default provider using the ResourceManager and .resx files is no different. The difference is that ASP.NET server side controls are either not possible without the the ASP.NET page model or difficult and are mostly unwanted in the 'pure' world of MVC. This difference is important in localization terms because Visual Studio's Generate Local Resources menu option expects to find ASP.NET server side controls. By default, the Generate Local Resources menu option creates a new .resx file in the App_LocalResources folder corresponding to the .aspx/.ascx page or control (so App_LocalResources\Default.aspx.resx is created to correspond to Default.aspx). Generate Local Resources iterates through every control looking for properties that are decorated with the LocalizableAttribute (set to true). Each control with any such property is modified to have a meta:resourcekey tag and the value of the property together with a key is added to the corresponding .resx file. The property is then said to be implicitly bound to the resource.


There are two problems with localizing MVC: there are no HTML properties that are decorated with the LocalizableAttribute and the HTML controls are not server side. The first issue means that Generate Local Resources does not find any properties to localize so the .resx file is not populated with resource entries and the HTML controls are not marked with a meta:resourcekey tag. What is important to note here, though, is that this is simply the nature of the Generate Local Resource menu option. The model still works so if you manually add a meta:resourcekey and you manually add the corresponding entry in the resx file (and the HTML control is server side) then localization will occur just as it does in an ASP.NET application. The second problem is that HTML controls are not server side by default. Localization occurs on the server and there's just no getting round this if you want to make use of all of the ASP.NET localization infrastructure. The solution is to change the HTML controls to be server side.

So here's an example with this humble HTML button control:-

<input type="button" value="Press Me"/>

To localize it for ASP.NET MVC first run Tools | Generate Local Resources. This will create the necessary .resx file and make minor modifications to the page (but not to the HTML control itself). To localize the control you need to add a runat tag and a meta:resourcekey tag:-

<input type="button" value="Press Me" runat="server" meta:resourcekey="PressMeButtonResources"/>

Then open up the associated .resx file (in the App_LocalResources folder) and add an entry with the key "PressMeButtonResources.value" and the value "Press Me (From resx)". When you run the site you will see that the button shows the value from the .resx file and not the value from the .aspx file. The button is now localizable.

 

Of course, all of the rest of the UI including the static text in the HTML, text in JavaScript, text in the code behind, text in libraries and text and resources everywhere still need to be localized but the solutions to localizing all of this text are the same for ASP.NET MVC as they are for ASP.NET so I'm not going to cover them here.

 

What is needed for MVC is an equivalent to Generate Local Resources that performs the same task except that instead of identifying properties as localizable based on having the LocalizableAttribute it uses some other means such as having a dictionary of 'known localizable properties'. For example the value property of an HTML INPUT control with type="Button" is always localizable and it does not need to be marked with a
LocalizableAttribute for this to be true.

 

By the way, if you're not using ASP.NET MVC and your regular ASP.NET application has lots of HTML and you're wondering about how to localize that then you have many more (better) options open to you. The main one of these is to convert your HTML controls to equivalent ASP.NET server side controls. If this is your plan then you should take a look at the I18NRefactorings (an add-in for the free DXCore) in the download at http://www.dotneti18n.com/Downloads.aspx that will help automate this process. I will blog about this separately at a future date.

Currently rated 3.6 by 11 people

  • Currently 3.636364/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Friday, May 15, 2009 at 9:44 PM
Tags:
Categories: Internationalization | .NET Internationalization Book
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (9) | Post RSSRSS comment feed

DDD South West Agenda Is Up Now

The agenda for DDD South West has been published. There are lots of great sessions covering subjects such as Silverlight 3, Azure, jQuery, MVC, Scrum, XNA, MEF and C# 4 as well as sessions in the Alternative Track including the Park Bench Discussion and the Balloon Debate that really show the power of the community. If you haven't registered yet it's free and there's still time (but it's only a couple of weeks away now ? Saturday 23rd May 2009).

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Thursday, May 07, 2009 at 9:14 PM
Tags:
Categories: DDD
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (1) | Post RSSRSS comment feed

UK Community Leaders Take Up The Microsoft UK Challenge

Brave UK Community Leaders, Tim Leung, Dave McMahon, Gavin Osborn and Steve Smith have been foolish enough to take up the Microsoft UK Challenge this June for 3.5 days in Wales doing running, cycling, kayaking, problem solving and using strategy skills (I think Dave's going to sit that last part out). To learn more read what Gavin has to say here.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Thursday, May 07, 2009 at 8:56 PM
Tags:
Categories: Miscellaneous - Other
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Machine Translation Using The Microsoft Translator

When Live was first released it's true to say that I was disappointed because all other competitive search engines had online translation tools and these were missing from Live. I think it is fair to say that Microsoft has delivered now. The basic online translator, Microsoft Translator, has been available for some time now but at MIX 09 Microsoft announced a widget and various APIs and tools that build on the translation engine and open up machine translation to a much broader range of applications. This post describes what's available and how you can get started.

Microsoft Translator provides the basic online interactive translation facility like Google, Alta Vista and everyone else. Translation is from English to 13 languages and vice versa (there are no language pairs that are not either to or from English). The Microsoft Translator site also accepts URL parameters that allow you to tell it to automatically translate a site:-

http://www.microsofttranslator.com/bv.aspx?lp=en_fr&lo=TP&a=www.guysmithferrier.com

The "lp" parameter is the language pair ("en_fr" specifies that the translation is from English to French), the "lo" parameter is the page layout of the translation result ("TP" specifies that the page should be shown as translated with the original language appearing as tooltips) and the "a" parameter is the URL to translate. This facility is very useful for being able to send links of translated pages.

The first major announcement at MIX was the Translator Widget. The translator widget is a snippet of HTML and JavaScript that you add to your page that provides translation facilities for your page. You can try it out on this site (see the blue "Microsoft Translator" box on the top left hand side of this page). You can also see it working on http://www.dotneti18n.com. To add one of these to your site you need to request a widget code from http://www.microsofttranslator.com/widget (you can't copy the HTML/JavaScript from a site that already has the widget because the code only works for the site it was generated for).

The Translator Widget is certainly a great starting point but you can provide finer control over the translation process using the Translator AJAX API. This allows you to call into the translation API to specify what parts of the page should be translated and how. To use the AJAX API you need to request a (different) code from http://www.microsofttranslator.com/dev/ajax.

The area that is of greatest interest to me, however, is the HTTP REST API. This provides programmatic access to the Microsoft Translator API from any code that can make HTTP calls. As such it is perfect for utilities like the Resource Administrator on http://www.dotneti18n.com that translates resx files. Again you need to request an "app id" to use this API (this is a different code from the widget code and the AJAX API code) and you can request one from http://search.live.com/developers/appids.aspx. Armed with your AppId you can use an HttpWebRequest to execute POST requests like this:-

http://api.microsofttranslator.com/V1/Http.svc/Translate?appId=yourAppId&from=en&to=es

where the content is the text that you want to translate.

The following resources will help you get up to speed on all of these:-

As always you should read the terms of use (the terms of use for the REST API are here) but in general they say that these are available for non-commercial use. Commercial licences are available by contacting Microsoft.

In addition Microsoft has a growing collection of implementations of this technology:-

Others have said that 2009 will see the coming of age of machine translation. These advances certainly move that goal further forwards.

Currently rated 5.0 by 3 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Saturday, April 18, 2009 at 1:56 PM
Tags:
Categories: Internationalization | .NET Internationalization Book
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (9) | Post RSSRSS comment feed

Sod This Podcast

There's a new .NET podcast on the scene. It's called Sod This and it is the quintessential "two blokes and a microphone" podcast straight from Gary's Garage (actually it might have been Oliver's Garage but there's no alliteration in that). Gary Short and Oliver Sturm, the nomadic DevExpress Scottish and German tech evangelists, provide a series of podcasts involving swearing, interviews, abuse, straight talking, Silverlight bashing and a bit more swearing.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Thursday, April 16, 2009 at 9:21 PM
Tags:
Categories: Miscellaneous - Other
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

DDD South West Session Voting Is Open

Voting for your favourite DDD South West sessions is now open (go here). Voting for your favourites helps us to allocate the largest rooms to the sessions with the highest demand and therefore we can avoid over subscribed sessions. Here's a reminder of the sessions:-

  • Everything you Wanted to Know About Refactoring but Were Afraid to Ask (Gary Short)
  • Creating extendable applications using MEF (Ben Hall)
  • Oslo and the future Microsoft Modelling platform (Robert Hogg)
  • Embracing a new world - dynamic languages and .Net (Ben Hall)
  • Introduction to Windows Azure (Chris Hay)
  • Real-world MVC architecture (Steve Sanderson)
  • What is Scrum ? (Richard Fennell)
  • A Quantum of Computing (Dave McMahon)
  • Silverlight 3 (Richard Costall)
  • Express Yourself (Marc Gravell)
  • Get Going With jQuery (George Adamson)
  • Less Means More With WCF (Jimmy Skowronski)
  • Introduction to Video Game Development with XNA (Kris Athi)
  • What's New In C# 4 ? (Guy Smith-Ferrier)

Don't forget there's a full Alternative Track of great sessions but as these are all in the same room there is no opportunity to vote for these sessions.

(Note that the voting is just to give us an idea of how popular the sessions are - you aren't committed to anything by choosing one session over another). Voting closes on Thursday 25th April 2009.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Wednesday, April 15, 2009 at 9:34 PM
Tags:
Categories: Events | DDD
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Kathleen Dollard To Visit The UK And Ireland

MVP, author and international speaker Kathleen Dollard is making a rare visit to the UK and Ireland in June and will be visiting six user groups:-

The subject for the meeting at The .NET Developer Network in Bristol is open to the public vote (http://www.dotnetdevnet.com/Surveys/tabid/59/Default.aspx) and can be chosen from:-

  • Your Application in Pieces - MEF and MAF
  • .NET 4.0 Language and IDE Features
  • Literals in Visual Basic 9.0 - XML and Text Processing
  • The Challenge of Silverlight Architectures
  • Cross Coding
  • Code Generation
  • Windows Presentation Foundation: Beyond the Bling
  • Refactoring with Generics
  • Rethinking Object Orientation

Full session abstracts are available on the same page. So get voting and we?ll see you in June.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Wednesday, April 15, 2009 at 9:10 PM
Tags:
Categories: Events | The .NET Developer Network
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

NxtGen Claims Manchester Scalp

Rupert Murdoch doesn't often get ruffled but recent events in Manchester have the tycoon calling for his closest aides. A few months ago I revealed that a secret leaked NxtGen document showed plans for their Risk-like domination of the UK and all has come true. NxtGen are opening another outpost and this time its in Manchester on Wednesday 20th May 2009 (no doubt they were anxious to get the first event in before DDD South West on Saturday 23rd May 2009) where Andy Wilkinson and Steve Robbins are the latest recruits for the Midlands' fuhrers. Rupert Murdoch probably brushes aside such expansion plans as "just some guys running a few .NET user groups" but he's heard the rumours of The Daily NxtGen and worse still the plans for the Russian TV network NxtSkyGen. If Murdoch is afraid just think how Obama feels.

On a less speculative note I'm sad to say that I won't be doing the grand opening this time as DDD South West is just a few days later and there will be lots to sort out in our land of freedom.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Wednesday, April 01, 2009 at 9:16 PM
Tags:
Categories: Events
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

NxtGen: How To Achieve World(-Ready) Domination In Silverlight

In a long overdue first return to the Southampton chapter of The Next Generation User Group I will be giving the following presentation on internationalizing Silverlight on Thursday 18th June 2009:-

  • How To Achieve World(-Ready) Domination In Silverlight
    So you've written your Silverlight application and you want it to work in another language ? Then this session is for you. World-Readiness is all of the work that a developer needs to do to globalize an application and make it localizable (i.e. capable of being localized). Whereas these concepts are well established in Windows Forms and ASP.NET, Silverlight is not only a cut-down version of the .NET Framework but also cross platform and client-side. In this session you will learn how to localize Silverlight applications using .resx files, download culture-specific resources on demand so that users only download resources for the culture they need, understand what System.Globalization types and properties Silverlight does not support and why, what CultureInfo and RegionInfo support you can expect on different operating systems, what the Silverlight installation user experience is for non-English users and what language support you can expect from the Silverlight framework.
Full details are available here. See you there.

Currently rated 1.0 by 1 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Wednesday, April 01, 2009 at 7:52 PM
Tags:
Categories: Silverlight | Events | Internationalization
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed