<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Rockford Lhotka</title>
    <link>http://www.lhotka.net/weblog/</link>
    <description>Creator of the CSLA .NET framework</description>
    <language>en-us</language>
    <copyright>Marimer LLC</copyright>
    <lastBuildDate>Fri, 11 May 2012 17:33:13 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>rocky@lhotka.net</managingEditor>
    <webMaster>rocky@lhotka.net</webMaster>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/RockfordLhotka" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="rockfordlhotka" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=9c11d9aa-b61f-4491-b3c8-1a30564c945b</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,9c11d9aa-b61f-4491-b3c8-1a30564c945b.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,9c11d9aa-b61f-4491-b3c8-1a30564c945b.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=9c11d9aa-b61f-4491-b3c8-1a30564c945b</wfw:commentRss>
      
      <title>Set rich text into RichTextBlock control</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,9c11d9aa-b61f-4491-b3c8-1a30564c945b.aspx</guid>
      <link>http://www.lhotka.net/weblog/SetRichTextIntoRichTextBlockControl.aspx</link>
      <pubDate>Fri, 11 May 2012 17:33:13 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Unless I’m missing something, there’s no direct way to bind XAML-ish text to a WinRT&#xD;
RichTextBlock control.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
For example, if I have some text like:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
&amp;lt;Paragraph&amp;gt; &#xD;
&lt;br&gt;&#xD;
    This is some text. And some &amp;lt;Bold&amp;gt;bolded text&amp;lt;/Bold&amp;gt;. &#xD;
&lt;br&gt;&#xD;
&amp;lt;/Paragraph&amp;gt;&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
I would like to just bind this text to a RichTextBlock control for display. Sadly&#xD;
there’s no way to put content into a RichTextBlock control at runtime short of adding&#xD;
Block objects to the control’s Blocks collection.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
As a workaround, I’ve been playing with the idea of a custom control like this:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
using Windows.UI.Xaml; &#xD;
&lt;br&gt;&#xD;
using Windows.UI.Xaml.Controls; &#xD;
&lt;br&gt;&#xD;
using Windows.UI.Xaml.Markup;&#xD;
&lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
namespace Application11 &#xD;
&lt;br&gt;&#xD;
{ &#xD;
&lt;br&gt;&#xD;
  public class RichTextDisplay : ContentControl &#xD;
&lt;br&gt;&#xD;
  { &#xD;
&lt;br&gt;&#xD;
    public static readonly DependencyProperty XamlProperty = &#xD;
&lt;br&gt;&#xD;
        DependencyProperty.Register("Xaml",&#xD;
typeof(string), typeof(RichTextDisplay), new PropertyMetadata(null, XamlChanged));&#xD;
&lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
    public string Xaml &#xD;
&lt;br&gt;&#xD;
    { &#xD;
&lt;br&gt;&#xD;
      get { return (string)GetValue(XamlProperty); } &#xD;
&lt;br&gt;&#xD;
      set { SetValue(XamlProperty, value); } &#xD;
&lt;br&gt;&#xD;
    }&#xD;
&lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
    private static void XamlChanged(object sender, DependencyPropertyChangedEventArgs&#xD;
e) &#xD;
&lt;br&gt;&#xD;
    { &#xD;
&lt;br&gt;&#xD;
      var ctl = (RichTextDisplay)sender; &#xD;
&lt;br&gt;&#xD;
      var xaml = new System.Text.StringBuilder(); &#xD;
&lt;br&gt;&#xD;
      xaml.Append(@" &#xD;
&lt;br&gt;&#xD;
&amp;lt;UserControl &#xD;
&lt;br&gt;&#xD;
  xmlns=""&lt;a href="http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&amp;quot;"&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation""&lt;/a&gt;&lt;br&gt;&#xD;
  xmlns:x=""&lt;a href="http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&amp;quot;"&gt;http://schemas.microsoft.com/winfx/2006/xaml""&lt;/a&gt;&lt;br&gt;&#xD;
  xmlns:mc=""&lt;a href="http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot;&amp;quot;"&gt;http://schemas.openxmlformats.org/markup-compatibility/2006""&lt;/a&gt;&amp;gt; &#xD;
&lt;br&gt;&#xD;
  &amp;lt;Grid&amp;gt; &#xD;
&lt;br&gt;&#xD;
    &amp;lt;RichTextBlock&amp;gt;"); &#xD;
&lt;br&gt;&#xD;
      xaml.Append(ctl.Xaml); &#xD;
&lt;br&gt;&#xD;
      xaml.Append(@" &#xD;
&lt;br&gt;&#xD;
    &amp;lt;/RichTextBlock&amp;gt; &#xD;
&lt;br&gt;&#xD;
  &amp;lt;/Grid&amp;gt; &#xD;
&lt;br&gt;&#xD;
&amp;lt;/UserControl&amp;gt; &#xD;
&lt;br&gt;&#xD;
"); &#xD;
&lt;br&gt;&#xD;
      var text = xaml.ToString(); &#xD;
&lt;br&gt;&#xD;
      var xr = (Control)XamlReader.Load(text);&#xD;
&lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
      ctl.Content = xr; &#xD;
&lt;br&gt;&#xD;
    } &#xD;
&lt;br&gt;&#xD;
  } &#xD;
&lt;br&gt;&#xD;
} &#xD;
&lt;br&gt;&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
This isn’t ideal, but it does work. The RichTextDisplay control dynamically creates&#xD;
a RichTextBlock control, inserting the XAML document text into the body of the newly&#xD;
created control.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I suppose the other alternative would be to write code that parses the text to find&#xD;
the XAML elements and produces a series of Block objects that can be added to the&#xD;
control’s Blocks collection…&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=9c11d9aa-b61f-4491-b3c8-1a30564c945b"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VxrI7oJnByKRUHDiHyae78CLZWg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VxrI7oJnByKRUHDiHyae78CLZWg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VxrI7oJnByKRUHDiHyae78CLZWg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VxrI7oJnByKRUHDiHyae78CLZWg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RockfordLhotka/~4/LASry7L3EN0" height="1" width="1"/&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,9c11d9aa-b61f-4491-b3c8-1a30564c945b.aspx</comments>
      <category>WinRT</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=c61fd797-16f7-4f5f-a6fc-226f235b132a</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,c61fd797-16f7-4f5f-a6fc-226f235b132a.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,c61fd797-16f7-4f5f-a6fc-226f235b132a.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=c61fd797-16f7-4f5f-a6fc-226f235b132a</wfw:commentRss>
      <slash:comments>7</slash:comments>
      
      <title>Using the MVVM pattern requires a framework</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,c61fd797-16f7-4f5f-a6fc-226f235b132a.aspx</guid>
      <link>http://www.lhotka.net/weblog/UsingTheMVVMPatternRequiresAFramework.aspx</link>
      <pubDate>Mon, 07 May 2012 20:01:55 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
There are three fairly popular presentation layer design patterns that I collectively&#xD;
call the “M” patterns: MVC, MVP, and MVVM. This is because they all have an “M” standing&#xD;
for “Model”, plus some other constructs.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The thing with all of these “M” patterns is that for typical developers the patterns&#xD;
are useless without a framework. Using the patterns without a framework almost always&#xD;
leads to confusion, complication, high costs, frustration, and ultimately despair.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
These are just patterns after all, not implementations. And they are big, complex&#xD;
patterns that include quite a few concepts that must work together correctly to enable&#xD;
success.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
You can’t sew a fancy dress just because you have a pattern. You need appropriate&#xD;
tools, knowledge, and experience. The same is true with these complex “M” patterns. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
And if you want to repeat the process of sewing a fancy dress over and over again&#xD;
(efficiently), you need specialized tooling for this purpose. In software terms this&#xD;
is a framework.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Trying to do something like MVVM without a framework is a huge amount of work. Tons&#xD;
of duplicate code, reinventing the wheel, and retraining people to think differently.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
At least with a framework you avoid the duplicate code and hopefully don’t have to&#xD;
reinvent the wheel – allowing you to focus on retraining people. The retraining part&#xD;
is generally unavoidable, but a framework provides plumbing code and structure, making&#xD;
the process easier.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
You might ask yourself why the MVC pattern only became popular in ASP.NET a few short&#xD;
years ago. The pattern has existed since (at least) the mid-1990’s, and yet few people&#xD;
used it, and even fewer used it successfully. This includes people on other platforms&#xD;
too, at least up to the point that those platforms included well-implemented MVC frameworks.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Strangely, MVC only started to become mainstream in the Microsoft world when ASP.NET&#xD;
MVC showed up. This is a comprehensive framework with tooling integrated into Visual&#xD;
Studio. As a result. typical developers can just build models, views, and controllers.&#xD;
Prior to that point they also had to build everything the MVC framework does – which&#xD;
is a lot of code. And not just a lot of code, but code that has absolutely nothing&#xD;
to do with business value, and only relates to implementation of the pattern itself.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
We’re in the same situation today with MVVM in WPF, Silverlight, Windows Phone, and&#xD;
Windows Runtime (WinRT in Windows 8). If you want to do MVVM without a framework,&#xD;
you will have to build everything a framework would do – which is a lot of code that&#xD;
provides absolutely no direct business value.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Typical developers really do want to focus on building models, views, and viewmodels.&#xD;
They don’t want to have to build weak reference based event routers, navigation models,&#xD;
view abstractions, and all the other things a framework must do. In fact, most developers&#xD;
probably &lt;em&gt;can’t &lt;/em&gt;build those things, because they aren’t platform/framework&#xD;
wonks. It takes a special kind of passion (or craziness) to learn the deep, highly&#xD;
specialized techniques and tricks necessary to build a framework like this.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
What I really &lt;i&gt;wish&lt;/i&gt; would happen, is for Microsoft to build an MVVM framework&#xD;
comparable to ASP.NET MVC. Embed it into the .NET/XAML support for WinRT/Metro, and&#xD;
include tooling in VS so we can right-click and add views and viewmodels. Ideally&#xD;
this would be an open, iterative process like ASP.NET MVC has been – so after a few&#xD;
years the framework reflects the smartest thoughts from Microsoft and from the community&#xD;
at large.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In the meantime, &lt;a href="http://caliburnmicro.codeplex.com/"&gt;Caliburn Micro&lt;/a&gt; appears&#xD;
to be the best MVVM framework out there – certainly the most widely used. Probably&#xD;
followed by various implementations using PRISM, and then MVVM Light, and some others.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=c61fd797-16f7-4f5f-a6fc-226f235b132a"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wJlBgfHCRiAdRvy879HgKj-Y_Fw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wJlBgfHCRiAdRvy879HgKj-Y_Fw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wJlBgfHCRiAdRvy879HgKj-Y_Fw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wJlBgfHCRiAdRvy879HgKj-Y_Fw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RockfordLhotka/~4/dsGCLC8I_yk" height="1" width="1"/&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,c61fd797-16f7-4f5f-a6fc-226f235b132a.aspx</comments>
      <category>Architecture</category>
      <category>Microsoft .NET</category>
      <category>Programming</category>
      <category>Windows 8</category>
      <category>WinRT</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=04a35ef0-345e-4c5a-bfaf-70a6b7883107</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,04a35ef0-345e-4c5a-bfaf-70a6b7883107.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,04a35ef0-345e-4c5a-bfaf-70a6b7883107.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=04a35ef0-345e-4c5a-bfaf-70a6b7883107</wfw:commentRss>
      <slash:comments>9</slash:comments>
      
      <title>Should I learn Silverlight? Objective C? HTML 5?</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,04a35ef0-345e-4c5a-bfaf-70a6b7883107.aspx</guid>
      <link>http://www.lhotka.net/weblog/ShouldILearnSilverlightObjectiveCHTML5.aspx</link>
      <pubDate>Thu, 26 Apr 2012 15:32:58 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I am sometimes asked for technical career advice. A common question these days is&#xD;
whether it is worth learning WPF, or Silverlight – .NET and XAML in general I suppose,&#xD;
or would it be better to learn HTML 5 and JavaScript, or perhaps even Objective C?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
This is a challenging question to be sure. How good is your crystal ball? &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://www.lhotka.net/weblog/content/binary/Windows-Live-Writer/Should-I-learn-Silverlight-HTML-5_9026/wlEmoticon-smile_2.png"&gt;&lt;/img&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
XAML appears to be alive and well – WPF, Silverlight, and now WinRT (Windows 8 – and&#xD;
probably Windows Phone 8 and “Xbox 720” and more) all use XAML.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I look at the WinRT usage of XAML as being essentially “Silverlight 6” – it is far&#xD;
closer to Silverlight than WPF, but isn’t exactly like Silverlight either. Assuming&#xD;
success with Windows 8, WinRT will become the new primary client dev target for most&#xD;
smart client development (over the next few years).&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The primary competitors are Objective C (if you believe iPads will take over the client&#xD;
space), and HTML 5/JavaScript (if you believe in &lt;s&gt;fairy tales&lt;/s&gt; the concept of&#xD;
‘one technology to rule them all’).&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
This is where the crystal ball comes into play.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Do you think Apple will displace Microsoft – iPads will replace the use of Windows&#xD;
– as the monopoly client OS?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Do you think the concept of ‘natural monopoly’ that has caused the Windows hegemony&#xD;
over the past 20 years is at an end – that some fundamental economic shift has occurred&#xD;
so companies are now willing to increase their IT budgets as a % of revenue to accommodate&#xD;
multiple client platforms (unlike the past 20 years)? In which case business app developers&#xD;
should expect to support at least iPad and Windows, if not Android, into the future?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Do you think that Windows 8 and WinRT will be strong enough to withstand the iPad&#xD;
onslaught, and that the natural monopoly economic effect remains in place, so Windows&#xD;
will remain the dominant client platform for business apps into the foreseeable future?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
These are really the three options, resulting in:&#xD;
&lt;/p&gt;&#xD;
        &lt;ol&gt;&#xD;
          &lt;li&gt;&#xD;
Objective C slowly overtakes .NET and we ultimately are Apple devs instead of Microsoft&#xD;
devs&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
H5/js rules the world as the ‘one technology to rule them all’ and vendors like Microsoft&#xD;
and Apple become entirely irrelevant because we live in a purely open-source world&#xD;
where nobody makes money off any platform technologies, so probably the only hardware/OS&#xD;
left is something like Android running Chrome, because it is a 100% commodity play&#xD;
at that level&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
.NET and XAML remain entirely valid, and life generally continues like it is today,&#xD;
with a mix of .NET smart client work and primarily server-based web work with h5/js&#xD;
primarily used to boost the user experience, but not often used to write standalone&#xD;
smart client apps&lt;/li&gt;&#xD;
        &lt;/ol&gt;&#xD;
        &lt;p&gt;&#xD;
My crystal ball leans toward option 3 – I don’t think economic realities change much&#xD;
or often, and I struggle to see where IT departments will come up with the increased&#xD;
budget (% of revenue) necessary to build apps for both iPads and Windows over the&#xD;
long term. It will be measurably cheaper (by many, many, many thousands of dollars)&#xD;
for companies to buy employees Win8 tablets rather than building and maintaining &lt;i&gt;both&lt;/i&gt; iOS&#xD;
and Windows versions of every business app.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
And I don’t believe in the ‘one technology to rule them all’ idea. That hasn’t happened&#xD;
in the entire history of computing, and it is hard to imagine everyone on the planet&#xD;
embracing one monoculture for software development. Especially when it would be counter&#xD;
to the interests of every platform vendor out there (Microsoft, Apple, Google, Oracle,&#xD;
and even IBM).&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Still with me? &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://www.lhotka.net/weblog/content/binary/Windows-Live-Writer/Should-I-learn-Silverlight-HTML-5_9026/wlEmoticon-winkingsmile_2.png"&gt;&lt;/img&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
To summarize, I think learning XAML is time well spent. Today that’s WPF or Silverlight.&#xD;
There is absolutely no doubt that Silverlight is closer to WinRT than WPF, and people&#xD;
building SL apps today will have an easier time migrating them to WinRT later, whereas&#xD;
most WPF apps will be a pretty big rewrite.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
But there’s nothing wrong with focusing yourself on h5/js. If you do so, I suggest&#xD;
doing it in a way that ignores or minimizes all server-side coding. If h5/js &lt;i&gt;does&lt;/i&gt; take&#xD;
over the world, it will be used to create pure smart client apps, and if there’s a&#xD;
“web server” involved at all, it will exist purely as a deployment server for the&#xD;
client app. The ‘pure’ h5/js/jquery/etc. world isn’t linked to any vendor – not Microsoft,&#xD;
Apple, or anyone. To me this represents a pretty major career shift, because to truly&#xD;
embrace h5/js as a complete software development platform is so demanding (imo) it&#xD;
won’t leave time to retain .NET or other vendor-specific technology expertise.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
For my part, I’m not yet ready to abandon Microsoft for h5/js, because I think Windows&#xD;
8, WinRT, .NET, and XAML have a rather bright future. A year from now I think a lot&#xD;
of people will be happily using Windows 8 desktops, laptops, and tablets – and hopefully&#xD;
a lot of Windows Phones, and with luck we’ll be looking forward to some cool new Xbox.&#xD;
I live in (I think realistic) hope that my .NET/XAML skills will apply to all these&#xD;
platforms.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
What does your crystal ball say?&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=04a35ef0-345e-4c5a-bfaf-70a6b7883107"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1liDpMyjfBykLXujBPvB2fFAmI8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1liDpMyjfBykLXujBPvB2fFAmI8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1liDpMyjfBykLXujBPvB2fFAmI8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1liDpMyjfBykLXujBPvB2fFAmI8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RockfordLhotka/~4/I0-XS5FAL4c" height="1" width="1"/&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,04a35ef0-345e-4c5a-bfaf-70a6b7883107.aspx</comments>
      <category>Programming</category>
      <category>Windows 8</category>
      <category>WinRT</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=230b396a-3df5-4873-bba3-ea5bd6712cb6</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,230b396a-3df5-4873-bba3-ea5bd6712cb6.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,230b396a-3df5-4873-bba3-ea5bd6712cb6.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=230b396a-3df5-4873-bba3-ea5bd6712cb6</wfw:commentRss>
      <slash:comments>3</slash:comments>
      
      <title>DRM-free books</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,230b396a-3df5-4873-bba3-ea5bd6712cb6.aspx</guid>
      <link>http://www.lhotka.net/weblog/DRMfreeBooks.aspx</link>
      <pubDate>Wed, 25 Apr 2012 22:27:19 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I think this is interesting:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a title="http://boingboing.net/2012/04/24/tor-books-goes-completely-drm.html" href="http://boingboing.net/2012/04/24/tor-books-goes-completely-drm.html"&gt;http://boingboing.net/2012/04/24/tor-books-goes-completely-drm.html&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
It is particularly interesting to me, because I’ve been publishing my ebooks and videos&#xD;
DRM-free for several years now, and have recently been thinking about rethinking my&#xD;
stance on DRM.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Specifically because there really is a lot of piracy. This does include being able&#xD;
to find my content on criminal warez sites, but that’s actually not my concern. My&#xD;
primary issue with piracy is that it is too easy for companies that use CSLA .NET&#xD;
to buy one copy (technically a content license for &lt;em&gt;one person&lt;/em&gt;) of my books/videos&#xD;
and to then share that content with their entire development team.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Although that is technically a criminal act, I don’t think most development team managers &lt;em&gt;intend&lt;/em&gt; to&#xD;
be criminals. I think they intend to be frugal. I can hear the discussions in my head:&#xD;
“If he &lt;em&gt;really&lt;/em&gt; meant for us to buy a copy for each developer he’d have made&#xD;
it harder to copy.” Or variations on that theme.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
(yes, I’ve worked in business too – for around 25 years – and I know &lt;em&gt;exactly&lt;/em&gt; how&#xD;
these conversations unfold)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The reality is this: I believe most people are basically decent. I also know for a&#xD;
fact that DRM punishes honest consumers, and does little or nothing to stop true criminals.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So I’ve chosen for years to be DRM-free. This way an honest consumer who buys my content&#xD;
is able to get a PDF or WMV file that they can easily read/watch on nearly any device,&#xD;
as they choose. No worries about licenses expiring or losing keys or passwords.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
And the fact is, that if I &lt;em&gt;did&lt;/em&gt; use DRM, the really bad guys would crack the&#xD;
DRM in a matter of hours or days, and the content would still be on criminal warez&#xD;
sites.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I’ve been rethinking my stance on DRM, because it would encourage otherwise basically&#xD;
decent people to actually buy the required number of copies of the content.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
And yet I really don’t want to cause pain to honest consumers by using DRM. So I’m&#xD;
torn.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I tweeted the other day that I am considering releasing some future “ebook” content&#xD;
as a Windows 8 Metro style app. Not as a PDF, but literally as an app. It is an interesting&#xD;
idea, because it would basically force each developer to purchase their own copy of&#xD;
the content (or share their Microsoft Live ID passwords with each other), and yet&#xD;
wouldn’t technically be DRM. The app would just work – no keys or passwords to lose&#xD;
or expire – because once you buy a Windows 8 app from the Microsoft Store, you own&#xD;
the app and there’s no muss or fuss.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
There are drawbacks to this. As someone pointed out, not all CSLA users are on Windows&#xD;
(especially now that we support mono for Android, Linux, and OS X). And I’d have to&#xD;
write an app in addition to creating the content – not as simple as writing the content&#xD;
as a Word document obviously.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So I’ll be very interested to see what Tor Books finds out as they release all their&#xD;
books DRM-free. Will they dodge the DOJ/Apple/Amazon legal/distribution traps as they&#xD;
are trying to do? Will their content be pirated more than it already is? In short,&#xD;
it will be interesting to see if this turns out to be a win, loss, or draw for them&#xD;
over time.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In the meantime, I’ll keep working on CSLA version 4.5 and thinking about whether&#xD;
to remain DRM-free, go with DRM, or perhaps build a “book as an app”.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=230b396a-3df5-4873-bba3-ea5bd6712cb6"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qJOUnGSbPzK5gjitTFVO5dk15xY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qJOUnGSbPzK5gjitTFVO5dk15xY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qJOUnGSbPzK5gjitTFVO5dk15xY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qJOUnGSbPzK5gjitTFVO5dk15xY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RockfordLhotka/~4/J4pdR8jb46Y" height="1" width="1"/&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,230b396a-3df5-4873-bba3-ea5bd6712cb6.aspx</comments>
      <category>Books</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=de88eb90-3010-4e69-950f-eba0dfed0b7b</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,de88eb90-3010-4e69-950f-eba0dfed0b7b.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,de88eb90-3010-4e69-950f-eba0dfed0b7b.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=de88eb90-3010-4e69-950f-eba0dfed0b7b</wfw:commentRss>
      
      <title>No BindingExpression in WinRT?</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,de88eb90-3010-4e69-950f-eba0dfed0b7b.aspx</guid>
      <link>http://www.lhotka.net/weblog/NoBindingExpressionInWinRT.aspx</link>
      <pubDate>Mon, 23 Apr 2012 22:10:32 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
The lack of the BindingExpression type and related functionality in WinRT is a serious&#xD;
issue to anyone trying to create custom controls. Hopefully this issue will be resolved&#xD;
post-beta.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Sadly, the only information I’ve been able to find on this topic from Microsoft is&#xD;
the suggestion to use LostFocus event handlers instead of binding. Obviously that’s&#xD;
a pretty useless workaround when trying to create a custom control &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-sadsmile" alt="Sad smile" src="http://www.lhotka.net/weblog/content/binary/Windows-Live-Writer/No-BindingExpression-in-WinRT_F137/wlEmoticon-sadsmile_2.png"&gt;&lt;/img&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I started writing a data binding engine for Android (because they don’t have one at&#xD;
all). It would be a serious shame if we’re forced to write a data binding engine for&#xD;
XAML in WinRT just to be able to implement basic custom control concepts…&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=de88eb90-3010-4e69-950f-eba0dfed0b7b"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6wF0wSE9lgjoyngn7M9Ja_nFJJo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6wF0wSE9lgjoyngn7M9Ja_nFJJo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6wF0wSE9lgjoyngn7M9Ja_nFJJo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6wF0wSE9lgjoyngn7M9Ja_nFJJo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RockfordLhotka/~4/bGftsJJHcxM" height="1" width="1"/&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,de88eb90-3010-4e69-950f-eba0dfed0b7b.aspx</comments>
      <category>WinRT</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=a5d884c0-37d3-4e26-8c55-70c7a0510197</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,a5d884c0-37d3-4e26-8c55-70c7a0510197.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,a5d884c0-37d3-4e26-8c55-70c7a0510197.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=a5d884c0-37d3-4e26-8c55-70c7a0510197</wfw:commentRss>
      <slash:comments>4</slash:comments>
      
      <title>Windows 8, BYOD, and AD membership</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,a5d884c0-37d3-4e26-8c55-70c7a0510197.aspx</guid>
      <link>http://www.lhotka.net/weblog/Windows8BYODAndADMembership.aspx</link>
      <pubDate>Mon, 23 Apr 2012 16:10:41 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Microsoft recently posted some details regarding the way Windows 8 (specifically ARM-based&#xD;
tablets running Windows RT) will work in a domain.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a title="http://blogs.msdn.com/b/b8/archive/2012/04/19/managing-quot-byo-quot-pcs-in-the-enterprise-including-woa.aspx" href="http://blogs.msdn.com/b/b8/archive/2012/04/19/managing-quot-byo-quot-pcs-in-the-enterprise-including-woa.aspx"&gt;http://blogs.msdn.com/b/b8/archive/2012/04/19/managing-quot-byo-quot-pcs-in-the-enterprise-including-woa.aspx&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
This related article from Steven Vaughan-Nichols suggests that Microsoft’s strategy&#xD;
is flawed:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a title="http://www.zdnet.com/blog/networking/windows-8-tablets-not-open-for-business/2261?tag=nl.e539" href="http://www.zdnet.com/blog/networking/windows-8-tablets-not-open-for-business/2261?tag=nl.e539"&gt;http://www.zdnet.com/blog/networking/windows-8-tablets-not-open-for-business/2261?tag=nl.e539&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
And he could be right, but I think there’s substantial room for hope.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I &lt;em&gt;speculate&lt;/em&gt; that Microsoft is thinking along the following lines:&#xD;
&lt;/p&gt;&#xD;
        &lt;ol&gt;&#xD;
          &lt;li&gt;&#xD;
If a company buys a Win8 tablet for an employee, they’ll probably buy an Intel-based&#xD;
tablet so it can be a tablet and also a laptop (with a keyboard/mouse), and most importantly&#xD;
so it can run existing line of business applications required for the employee to&#xD;
do their actual work. &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
I have such a tablet today, and I truly love the fact that it is a tablet &lt;em&gt;and&#xD;
a laptop&lt;/em&gt; so I get the best of both worlds. It is wonderful! &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
And it can join an AD domain, and probably &lt;em&gt;should&lt;/em&gt; join the domain, because&#xD;
it is corporate property. &#xD;
&lt;br&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
If a person buys a Win8 tablet for themselves, they may well buy a cheaper and lower-powered&#xD;
ARM-based tablet. Such a device is a tablet, I suspect most will also double as a&#xD;
laptop with Office 15 (with a keyboard/mouse) – but they won’t be able to run existing&#xD;
line of business applications because those applications are Windows Forms or WPF&#xD;
or Silverlight. &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
A person, spending their own money to buy a device, is probably going to be unwilling&#xD;
to allow their corporate IT folks to set policies and perform administration tasks &lt;em&gt;on&#xD;
their personal device&lt;/em&gt;. If my company wants to muck around with my devices, they&#xD;
can buy me the device! The last thing most people would ever want is for corporate&#xD;
IT to muck around with their own personal property. &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
So the fact that a Windows RT tablet can’t join a domain might be a true blessing.&#xD;
Microsoft is doing us a favor by eliminating the &lt;em&gt;possibility&lt;/em&gt; that your corporate&#xD;
IT might insist on managing your personal property – because it just doesn’t work&#xD;
that way.&lt;/li&gt;&#xD;
        &lt;/ol&gt;&#xD;
        &lt;p&gt;&#xD;
I’ve talked to people quite a lot over the past few months, about a possible dystopic&#xD;
future where employees are &lt;em&gt;required&lt;/em&gt; to buy and support their own devices.&#xD;
All you have to do is take BYOD to its logical conclusion, and things look (to me)&#xD;
quite bleak. Surprisingly I’m finding that quite a few people in our industry thing&#xD;
this could be a &lt;em&gt;good thing&lt;/em&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So here’s my train of thought.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
One reason companies like BYOD is that the cost of computing shifts from the company&#xD;
to the employee. The company no longer has to buy the employee a laptop, because the&#xD;
employee &lt;em&gt;chose&lt;/em&gt; to shell out $800 to get an iPad, and then &lt;em&gt;insists&lt;/em&gt; that&#xD;
they be able to use it at work. As a result, IT can just say “OK, use it, but we don’t&#xD;
really support it”, and away you go. The company saves hardware and software purchase,&#xD;
licensing, and support costs. The burden of having a machine on which to do work falls&#xD;
on the employee – including the costs of acquisition, licensing, software, and support.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Now we’re not &lt;em&gt;quite&lt;/em&gt; to that point yet. But I have heard CIO or IT director&#xD;
level people say, in so many words, that they see this BYOD thing as a way of cutting&#xD;
costs. So they are thinking exactly along this line, and it is a small step from employees &lt;em&gt;insisting&lt;/em&gt; that&#xD;
they get to use their own devices, to employers &lt;em&gt;requiring&lt;/em&gt; that employees&#xD;
supply and use their own devices.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
And this is important, because true BYOD is incredibly expensive! In the long run,&#xD;
it means that all line of business apps must either be written in the highly volatile&#xD;
HTML 5 world, and tested on every conceivable device. Or they must be written and&#xD;
tested numerous times – in .NET, Objective C, Java, etc. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Magenic does quite a lot of mobile development these days, targeting iOS and Android&#xD;
mostly. And every time we get an Android project we have to go buy a whole new set&#xD;
of tablets for testing – because that platform is changing so fast, and is so inconsistent&#xD;
across devices and OS versions. This is true for native and HTML 5 apps – in all cases&#xD;
we have to test across a wide array of devices due to differences in the hardware,&#xD;
OS, and/or browsers.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So I feel confident saying BYOD is extremely expensive. And that might be fine if&#xD;
IT can figure out how to offset that expense. One way to help do that is to entirely&#xD;
eliminate the costs associated with hardware, OS, and support by shifting that responsibility&#xD;
to employees.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
“You want to work in our shipping department for $17/hr? Great! Just make sure to&#xD;
bring your $800 iPad to work on Monday when you start. Oh, you don’t have an iPad?&#xD;
You don’t have $800 laying around? Well sorry, then you can’t work here.”&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
You think this won’t happen? Maybe not. I &lt;em&gt;hope not&lt;/em&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
But at some point IT is going to have to justify and/or offset the costs of BYOD.&#xD;
At some point in the next couple years the CEO/CFO or board of directors is going&#xD;
to ask why IT costs have spiraled out of control, and the answer will be “because&#xD;
you said we had to support the iPads used by our executives”. At that point the proverbial&#xD;
sh*t will hit the fan, and some IT directors will lose their jobs, and BYOD will come&#xD;
to a sudden and inglorious end.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In the meantime, we can all be happy that there’s no way IT can join our Windows RT&#xD;
tablets (or iPads or Kindle Fires) to the AD domain. Because those are &lt;em&gt;our personal&#xD;
property&lt;/em&gt; and shouldn’t be subject to corporate administrative policies and more&#xD;
than our cars, our televisions, or our other personal property.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=a5d884c0-37d3-4e26-8c55-70c7a0510197"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FHtpMGYS9xWEhmqWUF61xkIkH7w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FHtpMGYS9xWEhmqWUF61xkIkH7w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FHtpMGYS9xWEhmqWUF61xkIkH7w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FHtpMGYS9xWEhmqWUF61xkIkH7w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RockfordLhotka/~4/w0RwnAPMOlI" height="1" width="1"/&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,a5d884c0-37d3-4e26-8c55-70c7a0510197.aspx</comments>
      <category>Windows 8</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=3e8600bd-cba1-497f-b2d7-3f277a09f727</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,3e8600bd-cba1-497f-b2d7-3f277a09f727.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,3e8600bd-cba1-497f-b2d7-3f277a09f727.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=3e8600bd-cba1-497f-b2d7-3f277a09f727</wfw:commentRss>
      
      <title>Code Mastery Boston</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,3e8600bd-cba1-497f-b2d7-3f277a09f727.aspx</guid>
      <link>http://www.lhotka.net/weblog/CodeMasteryBoston.aspx</link>
      <pubDate>Thu, 12 Apr 2012 13:43:05 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Last year Magenic held a series of free one-day technical training events in cities&#xD;
around the US. These events were popular and successful, so we’re doing it again this&#xD;
year.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I am pleased to announce that our first event is &lt;a href="http://codemastery.com/boston/"&gt;Code&#xD;
Mastery Boston&lt;/a&gt; on May 2 – so coming up soon!&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
These are FREE events, open to anyone wanting to get in-depth technical information.&#xD;
In Boston we have two tracks: .NET software development, and SQL Server/Business Intelligence.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I am delivering the keynote speech at the event, where I’ll be talking about the state&#xD;
of the Microsoft development platform and overall ecosystem. We are at an exciting&#xD;
point in the history of Microsoft, where yet again they are an underdog forced to&#xD;
innovate to overcome tough competition in the form of the iPhone/iPad devices, while&#xD;
also dealing with the commoditization of client computing, the emergence of HTML 5&#xD;
as a real development platform, and the potential of cloud computing.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Our breakout sessions cover web, cloud, service, and Windows 8 software development,&#xD;
and SQL Server 2012, data warehousing, and business intelligence.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
This is not an event to be missed, so if you are anywhere in the northeast it will&#xD;
be worth your time to spend the day with us at Code Mastery!&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=3e8600bd-cba1-497f-b2d7-3f277a09f727"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QjDhFnvwNxeoVxXWmY7ov_o6HFw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QjDhFnvwNxeoVxXWmY7ov_o6HFw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/QjDhFnvwNxeoVxXWmY7ov_o6HFw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QjDhFnvwNxeoVxXWmY7ov_o6HFw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RockfordLhotka/~4/dVTA2dxebCk" height="1" width="1"/&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,3e8600bd-cba1-497f-b2d7-3f277a09f727.aspx</comments>
      <category>Magenic</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=af9641c9-6f00-482e-a7a6-1c3b2fb66865</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,af9641c9-6f00-482e-a7a6-1c3b2fb66865.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,af9641c9-6f00-482e-a7a6-1c3b2fb66865.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=af9641c9-6f00-482e-a7a6-1c3b2fb66865</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>Windows 8, Start Screen, Multi-Monitor Usability</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,af9641c9-6f00-482e-a7a6-1c3b2fb66865.aspx</guid>
      <link>http://www.lhotka.net/weblog/Windows8StartScreenMultiMonitorUsability.aspx</link>
      <pubDate>Fri, 06 Apr 2012 15:50:13 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I've been watching a number of discussion threads regarding the usability of Windows&#xD;
8, especially regarding the start screen, Desktop application usage, and multi-monitor&#xD;
scenarios.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
All I can say is don’t knock it until you try it.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I’ve been running Win8 on my tablet and laptop for a few weeks now. The work I do&#xD;
on my laptop is often multi-monitor, and is real work.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
There are three themes I’d like to address, based on my full-time usage experience&#xD;
thus far.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
First, some people feel that Microsoft is making a mistake by having WinRT (Metro&#xD;
style) and Desktop apps run on the same machine at the same time. I vehemently disagree.&#xD;
I &lt;i&gt;absolutely&lt;/i&gt; want one machine that I can use as a tablet on the plane, and&#xD;
as a real computer when I get to my destination. My tablet does this (Samsung from&#xD;
//build/) for almost everything, except when I’m doing distributed computing demos&#xD;
and need my full laptop to run virtual machines (because my laptop has tons of memory&#xD;
and an i7, vs the tablet with less memory and an i5).&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I love the fact that I have WinRT apps, which are far superior to most web sites,&#xD;
for consuming news, weather, etc. And I love the fact that the same machine, plugged&#xD;
into a small portable dock, has a keyboard, mouse, second monitor, and can run Visual&#xD;
Studio just fine!&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Second, there’s this idea floating around that the Win7 start menu is superior to&#xD;
the new Win8 start screen. That doesn’t hold true for me. Let me explain why.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
When I read the Microsoft blog post about the Win7 telemetry data they used to design&#xD;
the start screen, they were describing me. When I use Win7 I pin my common apps and&#xD;
web sites to the start bar, and to run any other apps I press the Windows key and&#xD;
type part of the application name, then press enter. Almost never do I actually use&#xD;
the start menu to browse for apps.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In Win8 (keyboard/mouse – desktop/laptop computer) I pin my common desktop apps to&#xD;
the start bar, and my WinRT apps to the first page or two of the start screen. And&#xD;
I still press the Windows key and type the first part of the application name to run&#xD;
other applications. In other words, THERE IS NO DIFFERENCE between Win7 and Win8 from&#xD;
my perspective – other than that the live tiles from news/weather/stocks/etc. make&#xD;
the start screen a useful dashboard – so it is BETTER than Win7.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
(as an aside, I do have some Desktop apps on my start page tiles too – but I find&#xD;
that I rarely use those tiles, preferring instead to tap the Desktop tile and then&#xD;
launch from the start bar – a personal quirk I suppose)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Third, the multi-monitor problems aren’t as bad as they are being portrayed. But the&#xD;
story isn’t good either, and I truly hope it improves over the next few months.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If you are doing “real work” today, you are probably spending 90% of your time (or&#xD;
more) in desktop mode. And if you’ve pinned your common apps to the start bar (like&#xD;
Win7, and I have done this) then you’ll probably never leave desktop mode. And in&#xD;
this case, multi-monitor works just like Win7, but slightly better because the start&#xD;
bar works better in Win8 (or at least it has new options I find useful).&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Where the multi-monitor falls down is if you are using a mix of WinRT apps and Desktop&#xD;
applications at the same time.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
WinRT only runs on the primary monitor, and that’s just lame. It completely prevents&#xD;
the use of WinRT for many business scenarios where multi-monitor is critical. I honestly&#xD;
don’t expect this to get fixed in WinRT v1, but I hope we don’t have to wait for Windows&#xD;
9 (2014?) for this to be solved, because it is a major blocker for WinRT development&#xD;
in the real world.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Between the Dev and Consumer previews, they did change the way WinRT apps use the&#xD;
primary monitor. At least now in the Consumer preview it is possible to keep a WinRT&#xD;
app running on the primary monitor while using a Desktop app on other monitors. I&#xD;
do find though, that it is too easy for some errant Desktop app to use the primary&#xD;
monitor, thus making the WinRT app disappear – and this is frustrating.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Sadly it is not possible to keep the start page visible while using a Desktop app&#xD;
on a secondary monitor – reducing its otherwise high value as a dashboard L&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
To summarize the multi-monitor scenario: if you are a Desktop app user, Win8 is as&#xD;
good or better than Win7, because you’ll only see the start screen when you press&#xD;
the Windows key to launch some non-pinned app. If you are a WinRT user multi-monitor&#xD;
is useless. If you are a hybrid user (like me) the experience is workable, but unpredictable&#xD;
and frustrating.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Clearly Microsoft needs to do more work in this area.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In final summary, don’t knock it until you try it full-time on real machines. The&#xD;
experience overall is quite good, and I VERY much like having WinRT apps that I can&#xD;
use on my main computer instead of using web pages with their inferior usability and&#xD;
aesthetics. Given that most of my main laptop usage is in Visual Studio, Word, and&#xD;
PowerPoint, I find the experience with multi-monitor to be adequate, and Win8 is just&#xD;
as productive for those scenarios as Win7.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=af9641c9-6f00-482e-a7a6-1c3b2fb66865"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kIx6fu_HREjEYz_Y7n4w04EW82Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kIx6fu_HREjEYz_Y7n4w04EW82Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kIx6fu_HREjEYz_Y7n4w04EW82Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kIx6fu_HREjEYz_Y7n4w04EW82Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RockfordLhotka/~4/XyyePMg8jwg" height="1" width="1"/&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,af9641c9-6f00-482e-a7a6-1c3b2fb66865.aspx</comments>
      <category>Windows 8</category>
      <category>WinRT</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=ab0b2564-5286-4deb-a98f-98124c3598ac</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,ab0b2564-5286-4deb-a98f-98124c3598ac.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,ab0b2564-5286-4deb-a98f-98124c3598ac.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=ab0b2564-5286-4deb-a98f-98124c3598ac</wfw:commentRss>
      
      <title>Windows Forms to Windows Runtime</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,ab0b2564-5286-4deb-a98f-98124c3598ac.aspx</guid>
      <link>http://www.lhotka.net/weblog/WindowsFormsToWindowsRuntime.aspx</link>
      <pubDate>Thu, 29 Mar 2012 16:39:13 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Here are the slides for my &lt;a href="http://www.lhotka.net/files/devcon/WinForms2WinRT.pdf"&gt;Windows&#xD;
Forms to Windows Runtime&lt;/a&gt; talk today at Dev Connections.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=ab0b2564-5286-4deb-a98f-98124c3598ac"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/EC5uiGrIVhFPaEIa8mZcRgepQrw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EC5uiGrIVhFPaEIa8mZcRgepQrw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/EC5uiGrIVhFPaEIa8mZcRgepQrw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EC5uiGrIVhFPaEIa8mZcRgepQrw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RockfordLhotka/~4/oFGuxOhiitk" height="1" width="1"/&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,ab0b2564-5286-4deb-a98f-98124c3598ac.aspx</comments>
      <category>Windows Forms</category>
      <category>WinRT</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=e9b66040-ee7a-4abb-977c-c1410e8ce18c</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,e9b66040-ee7a-4abb-977c-c1410e8ce18c.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,e9b66040-ee7a-4abb-977c-c1410e8ce18c.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=e9b66040-ee7a-4abb-977c-c1410e8ce18c</wfw:commentRss>
      <slash:comments>7</slash:comments>
      
      <title>Early findings going from Silverlight to WinRT</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,e9b66040-ee7a-4abb-977c-c1410e8ce18c.aspx</guid>
      <link>http://www.lhotka.net/weblog/EarlyFindingsGoingFromSilverlightToWinRT.aspx</link>
      <pubDate>Wed, 21 Mar 2012 14:49:28 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I’ve been spending quite a bit of time working with WinRT over the past couple weeks.&#xD;
Specifically prepping for next week’s &lt;a href="http://www.vslive.com/"&gt;Visual Studio&#xD;
Live!&lt;/a&gt; and &lt;a href="http://www.devconnections.com/"&gt;VS Connections&lt;/a&gt; conferences.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
As part of this process, I have a super early version of CSLA 4 version 4.5 that builds&#xD;
and (mostly) runs on WinRT. I’d done a lot of the work months ago when the Windows&#xD;
8 developer preview came out, so getting it to work on the consumer preview took only&#xD;
a couple hours.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The only new feature I’ve added so far is support for the new async and await keywords&#xD;
for WinRT data portal code. I still need to add async/await support for the .NET data&#xD;
portal. I might refine some of my implementation, but right now I can use async/await&#xD;
to call the data portal in WinRT, and that’s cool!&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The primary observation I want to make right now though, is that business classes&#xD;
created using CSLA 4 that target Silverlight will now recompile for WinRT with no&#xD;
code changes required. I took the entire ProjectTracker business library project and&#xD;
just recompiled it for WinRT and it works – unchanged.&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
            &lt;strong&gt;&#xD;
              &lt;font style="background-color: #ffff00"&gt;If you want direct reuse of your business&#xD;
logic from .NET/Silverlight to WinRT, you should consider using CSLA 4.&lt;/font&gt;&#xD;
            &lt;/strong&gt;&#xD;
          &lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
Because I did add the async/await data portal support, I chose to add async factory&#xD;
methods to my business classes, alongside the existing .NET and Silverlight factory&#xD;
methods. From a porting/reuse perspective this is not necessary, but in terms of writing&#xD;
new code for .NET 4.5 and/or WinRT I think we’ll all tend to write these async factory&#xD;
methods.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In short, I added code like this:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
            &lt;font face="Courier New"&gt;#if WINRT &#xD;
&lt;br&gt;&#xD;
    public async static System.Threading.Tasks.Task&amp;lt;ProjectList&amp;gt;&#xD;
GetProjectListAsync() &#xD;
&lt;br&gt;&#xD;
    { &#xD;
&lt;br&gt;&#xD;
      return await Csla.DataPortal.FetchAsync&amp;lt;ProjectTracker.Library.ProjectList&amp;gt;(); &#xD;
&lt;br&gt;&#xD;
    } &#xD;
&lt;br&gt;&#xD;
#endif &#xD;
&lt;br&gt;&lt;/font&gt;&#xD;
          &lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
This allows the viewmodel or other presentation layer code to retrieve business objects&#xD;
like this:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
            &lt;font face="Courier New"&gt;var obj = await ProjectList.GetProjectListAsync();&lt;/font&gt;&#xD;
          &lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
No need for async callback handlers or the other messy goo from a typical WPF/Silverlight&#xD;
application. Of course WPF 4.5 will be able to use the await keyword too, so only&#xD;
SL/WP7 will still require the callback handler model when all is said and done.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Although these are early days, and I am still working through all the features of&#xD;
CSLA .NET to make sure they work on WinRT, it is nice to know that data binding, business/validation&#xD;
rules, and the data portal are all functional already. I expect to still do some work&#xD;
around authorization rules, and the local data portal implementation – but the vast&#xD;
majority of CSLA 4 functionality is already working just fine on WinRT and that makes&#xD;
me very happy!&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=e9b66040-ee7a-4abb-977c-c1410e8ce18c"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/i_CZhnOO_ENEx3cuZATME09YU_g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/i_CZhnOO_ENEx3cuZATME09YU_g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/i_CZhnOO_ENEx3cuZATME09YU_g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/i_CZhnOO_ENEx3cuZATME09YU_g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RockfordLhotka/~4/9ISurU3bU8E" height="1" width="1"/&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,e9b66040-ee7a-4abb-977c-c1410e8ce18c.aspx</comments>
      <category>CSLA .NET</category>
      <category>WinRT</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=597819aa-1569-477a-af6e-cd2abd70f20d</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,597819aa-1569-477a-af6e-cd2abd70f20d.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,597819aa-1569-477a-af6e-cd2abd70f20d.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=597819aa-1569-477a-af6e-cd2abd70f20d</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>Allowing a WinRT app to do loopback network calls</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,597819aa-1569-477a-af6e-cd2abd70f20d.aspx</guid>
      <link>http://www.lhotka.net/weblog/AllowingAWinRTAppToDoLoopbackNetworkCalls.aspx</link>
      <pubDate>Thu, 15 Mar 2012 01:57:34 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
One issue I’ve encountered while building Metro-style WinRT apps on Windows 8 is the&#xD;
need to have my app interact with a WCF service running on the same machine.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
This is obviously a common scenario for any n-tier or SOA app development. The challenge&#xD;
we face is that WinRT apps are blocked from calling back to localhost (127.0.0.1).&#xD;
The challenge and solution are described here:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a title="http://msdn.microsoft.com/en-us/library/windows/apps/Hh780593.aspx" href="http://msdn.microsoft.com/en-us/library/windows/apps/Hh780593.aspx"&gt;http://msdn.microsoft.com/en-us/library/windows/apps/Hh780593.aspx&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
To find the real application name (moniker) necessary, I wrote a simple command line&#xD;
utility to read the registry:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
            &lt;font face="Courier New"&gt;using System; &#xD;
&lt;br&gt;&#xD;
using Microsoft.Win32;&lt;/font&gt;&#xD;
          &lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
            &lt;font face="Courier New"&gt;namespace WinRtAppList &#xD;
&lt;br&gt;&#xD;
{ &#xD;
&lt;br&gt;&#xD;
  class Program &#xD;
&lt;br&gt;&#xD;
  { &#xD;
&lt;br&gt;&#xD;
    static void Main(string[] args) &#xD;
&lt;br&gt;&#xD;
    { &#xD;
&lt;br&gt;&#xD;
      var reg = Registry. &#xD;
&lt;br&gt;&#xD;
        CurrentUser.OpenSubKey("Software"). &#xD;
&lt;br&gt;&#xD;
        OpenSubKey("Classes"). &#xD;
&lt;br&gt;&#xD;
        OpenSubKey("Local Settings"). &#xD;
&lt;br&gt;&#xD;
        OpenSubKey("Software"). &#xD;
&lt;br&gt;&#xD;
        OpenSubKey("Microsoft"). &#xD;
&lt;br&gt;&#xD;
        OpenSubKey("Windows"). &#xD;
&lt;br&gt;&#xD;
        OpenSubKey("CurrentVersion"). &#xD;
&lt;br&gt;&#xD;
        OpenSubKey("AppContainer"). &#xD;
&lt;br&gt;&#xD;
        OpenSubKey("Mappings");&lt;/font&gt;&#xD;
          &lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
            &lt;font face="Courier New"&gt;      var items = reg.GetSubKeyNames(); &#xD;
&lt;br&gt;&#xD;
      string query = null; &#xD;
&lt;br&gt;&#xD;
      if (args.Length &amp;gt; 0) &#xD;
&lt;br&gt;&#xD;
        query = args[0].ToLower();&lt;/font&gt;&#xD;
          &lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
            &lt;font face="Courier New"&gt;      foreach (var item in items) &#xD;
&lt;br&gt;&#xD;
      { &#xD;
&lt;br&gt;&#xD;
        var app = reg.OpenSubKey(item); &#xD;
&lt;br&gt;&#xD;
        var displayName = app.GetValue("DisplayName").ToString(); &#xD;
&lt;br&gt;&#xD;
        if (string.IsNullOrEmpty(query) || displayName.ToLower().Contains(query)) &#xD;
&lt;br&gt;&#xD;
        { &#xD;
&lt;br&gt;&#xD;
          Console.WriteLine(app.GetValue("DisplayName")); &#xD;
&lt;br&gt;&#xD;
          Console.WriteLine(" &#xD;
SID:     " + item); &#xD;
&lt;br&gt;&#xD;
          Console.WriteLine(" &#xD;
Moniker: " + app.GetValue("Moniker")); &#xD;
&lt;br&gt;&#xD;
          Console.WriteLine(); &#xD;
&lt;br&gt;&#xD;
        } &#xD;
&lt;br&gt;&#xD;
      }&lt;/font&gt;&#xD;
          &lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
            &lt;font face="Courier New"&gt;      Console.ReadLine(); &#xD;
&lt;br&gt;&#xD;
    } &#xD;
&lt;br&gt;&#xD;
  } &#xD;
&lt;br&gt;&#xD;
}&lt;/font&gt;&#xD;
            &lt;br&gt;&#xD;
          &lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
Nothing fancy, but it helps avoid the need to dig around in the registry with regedit&#xD;
just to find the application moniker.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=597819aa-1569-477a-af6e-cd2abd70f20d"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/51DonVg_IfLqYSGKWzWn7-GcRro/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/51DonVg_IfLqYSGKWzWn7-GcRro/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/51DonVg_IfLqYSGKWzWn7-GcRro/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/51DonVg_IfLqYSGKWzWn7-GcRro/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RockfordLhotka/~4/CfCb2Q9HjFc" height="1" width="1"/&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,597819aa-1569-477a-af6e-cd2abd70f20d.aspx</comments>
      <category>WinRT</category>
    </item>
  </channel>
</rss>

