<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0">
  <channel>
    <title>Rockford Lhotka - Microsoft .NET</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>Thu, 14 Feb 2013 16:39:23 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>rocky@lhotka.net</managingEditor>
    <webMaster>rocky@lhotka.net</webMaster>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=4a9a1e7e-3459-4ff0-8b00-a9759008ef0e</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,4a9a1e7e-3459-4ff0-8b00-a9759008ef0e.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,4a9a1e7e-3459-4ff0-8b00-a9759008ef0e.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=4a9a1e7e-3459-4ff0-8b00-a9759008ef0e</wfw:commentRss>
      <slash:comments>8</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In a recent email thread I ended up writing a lengthy bit of content summarizing some
of my thoughts around the idea of automatically projecting js code into an HTML 5
(h5js) browser app.
</p>
        <p>
Another participant in the thread mentioned that he’s a strong proponent of separation
of concerns, and in particular keeping the “model” separate from data access. In his
context the “model” is basically a set of data container or DTO objects. My response:
</p>
        <p>
-----------------------------
</p>
        <p>
I agree about separation of concerns at the lower levels.
</p>
        <p>
I am a firm believer in domain focused business objects though. In the use of “real”
OOD, which largely eliminates the need for add-on hacks like a viewmodel.
</p>
        <p>
In other words, apps should have clearly defined logical layers. I use this model:
</p>
        <blockquote>
          <p>
Interface 
<br />
Interface control 
<br />
Business 
<br />
Data access 
<br />
Data storage
</p>
        </blockquote>
        <p>
This model works for pretty much everything: web apps, smart client apps, service
apps, workflow tasks (apps), etc.
</p>
        <p>
The key is that the business layer consists of honest-to-god real life business domain
objects. These are designed using OOD so they reflect the requirements of the user
scenario, not the database design.
</p>
        <p>
If you have data-centric objects, they’ll live in the Data access layer. And that’s
pretty common when using any ORM or something like EF, where the tools help you create
data-centric types. That’s very useful – then all you need to do is use object:object
mapping (OOM) to get the data from the data-centric objects into the more meaningful
business domain objects.
</p>
        <p>
At no point should any layer talk to the database other than the Data access layer.
And at no point should the Interface/Interface control layers interact with anything
except the Business layer.
</p>
        <p>
Given all that, the question with smart client web apps (as I’ve taken to calling
these weird h5js/.NET hybrids) is whether you are using a service-oriented architecture
or an n-tier architecture. This choice must be made _<i>first</i>_ because it impacts
every other decision.
</p>
        <p>
The service-oriented approach says you are creating a system composed of multiple
apps. In our discussion this would be the smart client h5js app and the server-side
service app. SOA mandates that these apps don’t trust each other, and that they communicate
through loosely coupled and clearly defined interface contracts. That allows the apps
to version independently. And the lack of trust means that data flowing from the consuming
app (h5js) to the service app isn’t trusted – which makes sense given how easy it
is to hack anything running in the browser. In this world each app should (imo) consist
of a series of layers such as those I mentioned earlier.
</p>
        <p>
The n-tier approach says you are creating one app with multiple layers, and those
layers might be deployed on different physical tiers. Because this is one app, the
layers can and should have reasonable levels of trust between them. As a result you
shouldn’t feel the need to re-run business logic just because the data flowed from
one layer/tier to another (completely different from SOA).
</p>
        <p>
N-tier can be challenging because you typically have to decide where to physically
put the business layer: on the client to give the user a rich and interactive experience,
or on the server for more control and easier maintenance. In the case of my CSLA .NET
framework I embraced the concept of _<i>mobile objects</i>_ where the business layer
literally runs on the client AND on the server, allowing you to easily run business
logic where most appropriate. Sadly this requires that the same code can actually
run on the client and server, which isn’t the case when the client and server are
disparate platforms (e.g. h5js and .NET).
</p>
        <p>
This idea of projecting server-side business domain objects into the client fits naturally
into the n-tier world. This has been an area of deep discussion for months within
the CSLA dev team – how to make it practical to translate the rich domain business
behaviors into js without imposing a major burden of writing js alongside C#.
</p>
        <p>
CSLA objects have a very rich set of rules and behaviors that ideally would be automatically
projected into a js business layer for use by the smart client h5js Interface and
Interface control layers. I love this idea – but the trick is to make it possible
such that there’s not a major new burden for developers.
</p>
        <p>
This idea of projecting server-side business domain objects into the client is a less
natural fit for a service-oriented system, because there’s a clear and obvious level
of coupling between the service app and the h5js app (given that parts of the h5js
app literally generate based on the service app). I’m not sure this is a total roadblock,
but you have to go into this recognizing that such an approach compromises the primary
purpose of SOA, which is loose coupling between the apps in the system…
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=4a9a1e7e-3459-4ff0-8b00-a9759008ef0e" />
      </body>
      <title>Projecting js code from a .NET business layer</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,4a9a1e7e-3459-4ff0-8b00-a9759008ef0e.aspx</guid>
      <link>http://www.lhotka.net/weblog/ProjectingJsCodeFromANETBusinessLayer.aspx</link>
      <pubDate>Thu, 14 Feb 2013 16:39:23 GMT</pubDate>
      <description>&lt;p&gt;
In a recent email thread I ended up writing a lengthy bit of content summarizing some
of my thoughts around the idea of automatically projecting js code into an HTML 5
(h5js) browser app.
&lt;/p&gt;
&lt;p&gt;
Another participant in the thread mentioned that he’s a strong proponent of separation
of concerns, and in particular keeping the “model” separate from data access. In his
context the “model” is basically a set of data container or DTO objects. My response:
&lt;/p&gt;
&lt;p&gt;
-----------------------------
&lt;/p&gt;
&lt;p&gt;
I agree about separation of concerns at the lower levels.
&lt;/p&gt;
&lt;p&gt;
I am a firm believer in domain focused business objects though. In the use of “real”
OOD, which largely eliminates the need for add-on hacks like a viewmodel.
&lt;/p&gt;
&lt;p&gt;
In other words, apps should have clearly defined logical layers. I use this model:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Interface 
&lt;br /&gt;
Interface control 
&lt;br /&gt;
Business 
&lt;br /&gt;
Data access 
&lt;br /&gt;
Data storage
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
This model works for pretty much everything: web apps, smart client apps, service
apps, workflow tasks (apps), etc.
&lt;/p&gt;
&lt;p&gt;
The key is that the business layer consists of honest-to-god real life business domain
objects. These are designed using OOD so they reflect the requirements of the user
scenario, not the database design.
&lt;/p&gt;
&lt;p&gt;
If you have data-centric objects, they’ll live in the Data access layer. And that’s
pretty common when using any ORM or something like EF, where the tools help you create
data-centric types. That’s very useful – then all you need to do is use object:object
mapping (OOM) to get the data from the data-centric objects into the more meaningful
business domain objects.
&lt;/p&gt;
&lt;p&gt;
At no point should any layer talk to the database other than the Data access layer.
And at no point should the Interface/Interface control layers interact with anything
except the Business layer.
&lt;/p&gt;
&lt;p&gt;
Given all that, the question with smart client web apps (as I’ve taken to calling
these weird h5js/.NET hybrids) is whether you are using a service-oriented architecture
or an n-tier architecture. This choice must be made _&lt;i&gt;first&lt;/i&gt;_ because it impacts
every other decision.
&lt;/p&gt;
&lt;p&gt;
The service-oriented approach says you are creating a system composed of multiple
apps. In our discussion this would be the smart client h5js app and the server-side
service app. SOA mandates that these apps don’t trust each other, and that they communicate
through loosely coupled and clearly defined interface contracts. That allows the apps
to version independently. And the lack of trust means that data flowing from the consuming
app (h5js) to the service app isn’t trusted – which makes sense given how easy it
is to hack anything running in the browser. In this world each app should (imo) consist
of a series of layers such as those I mentioned earlier.
&lt;/p&gt;
&lt;p&gt;
The n-tier approach says you are creating one app with multiple layers, and those
layers might be deployed on different physical tiers. Because this is one app, the
layers can and should have reasonable levels of trust between them. As a result you
shouldn’t feel the need to re-run business logic just because the data flowed from
one layer/tier to another (completely different from SOA).
&lt;/p&gt;
&lt;p&gt;
N-tier can be challenging because you typically have to decide where to physically
put the business layer: on the client to give the user a rich and interactive experience,
or on the server for more control and easier maintenance. In the case of my CSLA .NET
framework I embraced the concept of _&lt;i&gt;mobile objects&lt;/i&gt;_ where the business layer
literally runs on the client AND on the server, allowing you to easily run business
logic where most appropriate. Sadly this requires that the same code can actually
run on the client and server, which isn’t the case when the client and server are
disparate platforms (e.g. h5js and .NET).
&lt;/p&gt;
&lt;p&gt;
This idea of projecting server-side business domain objects into the client fits naturally
into the n-tier world. This has been an area of deep discussion for months within
the CSLA dev team – how to make it practical to translate the rich domain business
behaviors into js without imposing a major burden of writing js alongside C#.
&lt;/p&gt;
&lt;p&gt;
CSLA objects have a very rich set of rules and behaviors that ideally would be automatically
projected into a js business layer for use by the smart client h5js Interface and
Interface control layers. I love this idea – but the trick is to make it possible
such that there’s not a major new burden for developers.
&lt;/p&gt;
&lt;p&gt;
This idea of projecting server-side business domain objects into the client is a less
natural fit for a service-oriented system, because there’s a clear and obvious level
of coupling between the service app and the h5js app (given that parts of the h5js
app literally generate based on the service app). I’m not sure this is a total roadblock,
but you have to go into this recognizing that such an approach compromises the primary
purpose of SOA, which is loose coupling between the apps in the system…
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=4a9a1e7e-3459-4ff0-8b00-a9759008ef0e" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,4a9a1e7e-3459-4ff0-8b00-a9759008ef0e.aspx</comments>
      <category>Architecture</category>
      <category>CSLA .NET</category>
      <category>h5js</category>
      <category>Microsoft .NET</category>
      <category>Web</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=970ce9b2-a608-4c68-9784-bc0bb0ddc5b1</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,970ce9b2-a608-4c68-9784-bc0bb0ddc5b1.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,970ce9b2-a608-4c68-9784-bc0bb0ddc5b1.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=970ce9b2-a608-4c68-9784-bc0bb0ddc5b1</wfw:commentRss>
      <slash:comments>6</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
With all the new terminology and conceptual surface area that comes with Windows 8,
I think it is important to have some clarity and consistency around the terms and
concepts.
</p>
        <p>
Here are some of the basic terms:
</p>
        <ul>
          <li>
            <strong>Windows 8</strong> – the new operating system that runs in a “dual mode”:
Desktop (Win32) and WinRT (Windows Runtime)</li>
          <li>
            <strong>Desktop</strong> – the Win32 OS API that supports today’s applications in
Win8 (basically Windows 7)</li>
          <li>
            <strong>WinRT</strong> – Windows Runtime: the new OS API that supports “modern” applications 
</li>
          <li>
            <strong>Windows RT</strong> – Windows 8 on ARM devices (note: Windows RT and WinRT
are not the same thing)</li>
          <li>
            <strong>Windows 8 UI style</strong> – a user experience design language often used
when building WinRT applications 
</li>
        </ul>
        <p>
Windows 8 basically includes two different operating systems. 
</p>
        <p>
One is the “old” Win32 OS we think of today as Windows 7. This is now called Windows
8 Desktop, and is available on Windows 8 Intel tablets, laptops, and desktops. This
is only partially available on ARM devices, and you should not expect to build or
deploy Win32 Desktop apps to ARM devices.
</p>
        <p>
The other is the new Windows Runtime (WinRT) “operating system”. This is a whole new
platform for apps, and is available on all Windows 8 machines (ARM, Intel, tablet,
laptop, desktop). If you want the widest reach for your apps going forward, you should
be building your apps for WinRT.
</p>
        <p>
Confusingly enough, “Windows 8” runs on Intel devices/computers. “Windows RT” is Windows
8 for ARM devices. The only real difference is that Windows RT won’t allow you to
deploy Win32 Desktop apps. Windows RT does have a Desktop mode, but only Microsoft
apps can run there. Again, if you want to build a Windows 8 app that works on all
devices/computers, build the app for WinRT, because it is consistently available.
</p>
        <p>
Windows 8 UI style describes a user experience design language for the look and feel
of WinRT apps. This isn’t a technology, it is a set of design principles, concepts,
and guidelines.
</p>
        <p>
Another source of confusion is that to build a WinRT app in Visual Studio you need
to create a “Windows 8 UI style” app. What makes this odd, is that this type of app
is targeting WinRT, and it is entirely up to you to conform to the Windows 8 UI style
guidelines as you build the app.
</p>
        <p>
“Windows 8 UI style” was called “Metro style”, but Microsoft has dropped the use of
the term “Metro”. I am skeptical that this new “Windows 8 UI style” term will last
long-term, because it obviously makes little sense for Windows Phone 8, Xbox, Windows
9, and other future platforms that may use the same UI style. But for now, this appears
to be the term Microsoft is using.
</p>
        <p>
Thinking about app development now, there are several options on the Microsoft platforms. 
<br /></p>
        <table border="0" cellspacing="0" cellpadding="2" width="637">
          <tbody>
            <tr>
              <td valign="top" width="113">
 </td>
              <td valign="top" width="207">
                <strong>Technologies</strong>
              </td>
              <td valign="top" width="315">
                <strong>Platforms</strong>
              </td>
            </tr>
            <tr>
              <td valign="top" width="113">
Full .NET 4.5</td>
              <td valign="top" width="207">
ASP.NET, WPF, Windows Forms, WCF, WF</td>
              <td valign="top" width="315">
Windows 7, Windows 8 Desktop, Windows Server 2008, Windows Server 2012</td>
            </tr>
            <tr>
              <td valign="top" width="113">
WinRT .NET 4.5</td>
              <td valign="top" width="207">
Windows 8 UI style apps</td>
              <td valign="top" width="315">
Windows 8 WinRT, Windows Phone 8, rumored for next-gen Xbox</td>
            </tr>
            <tr>
              <td valign="top" width="113">
Full .NET 4</td>
              <td valign="top" width="207">
ASP.NET, WPF, Windows Forms, WCF, WF</td>
              <td valign="top" width="315">
Windows 7, Windows Server 2008, Azure PaaS</td>
            </tr>
            <tr>
              <td valign="top" width="113">
Silverlight</td>
              <td valign="top" width="207">
Silverlight</td>
              <td valign="top" width="315">
Windows 7, Windows 8 Desktop, Windows Phone 7, Windows Phone 8</td>
            </tr>
          </tbody>
        </table>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=970ce9b2-a608-4c68-9784-bc0bb0ddc5b1" />
      </body>
      <title>Windows 8 Terminology and Concepts</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,970ce9b2-a608-4c68-9784-bc0bb0ddc5b1.aspx</guid>
      <link>http://www.lhotka.net/weblog/Windows8TerminologyAndConcepts.aspx</link>
      <pubDate>Fri, 03 Aug 2012 16:03:20 GMT</pubDate>
      <description>&lt;p&gt;
With all the new terminology and conceptual surface area that comes with Windows 8,
I think it is important to have some clarity and consistency around the terms and
concepts.
&lt;/p&gt;
&lt;p&gt;
Here are some of the basic terms:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Windows 8&lt;/strong&gt; – the new operating system that runs in a “dual mode”:
Desktop (Win32) and WinRT (Windows Runtime)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Desktop&lt;/strong&gt; – the Win32 OS API that supports today’s applications in
Win8 (basically Windows 7)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WinRT&lt;/strong&gt; – Windows Runtime: the new OS API that supports “modern” applications 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows RT&lt;/strong&gt; – Windows 8 on ARM devices (note: Windows RT and WinRT
are not the same thing)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows 8 UI style&lt;/strong&gt; – a user experience design language often used
when building WinRT applications 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Windows 8 basically includes two different operating systems. 
&lt;/p&gt;
&lt;p&gt;
One is the “old” Win32 OS we think of today as Windows 7. This is now called Windows
8 Desktop, and is available on Windows 8 Intel tablets, laptops, and desktops. This
is only partially available on ARM devices, and you should not expect to build or
deploy Win32 Desktop apps to ARM devices.
&lt;/p&gt;
&lt;p&gt;
The other is the new Windows Runtime (WinRT) “operating system”. This is a whole new
platform for apps, and is available on all Windows 8 machines (ARM, Intel, tablet,
laptop, desktop). If you want the widest reach for your apps going forward, you should
be building your apps for WinRT.
&lt;/p&gt;
&lt;p&gt;
Confusingly enough, “Windows 8” runs on Intel devices/computers. “Windows RT” is Windows
8 for ARM devices. The only real difference is that Windows RT won’t allow you to
deploy Win32 Desktop apps. Windows RT does have a Desktop mode, but only Microsoft
apps can run there. Again, if you want to build a Windows 8 app that works on all
devices/computers, build the app for WinRT, because it is consistently available.
&lt;/p&gt;
&lt;p&gt;
Windows 8 UI style describes a user experience design language for the look and feel
of WinRT apps. This isn’t a technology, it is a set of design principles, concepts,
and guidelines.
&lt;/p&gt;
&lt;p&gt;
Another source of confusion is that to build a WinRT app in Visual Studio you need
to create a “Windows 8 UI style” app. What makes this odd, is that this type of app
is targeting WinRT, and it is entirely up to you to conform to the Windows 8 UI style
guidelines as you build the app.
&lt;/p&gt;
&lt;p&gt;
“Windows 8 UI style” was called “Metro style”, but Microsoft has dropped the use of
the term “Metro”. I am skeptical that this new “Windows 8 UI style” term will last
long-term, because it obviously makes little sense for Windows Phone 8, Xbox, Windows
9, and other future platforms that may use the same UI style. But for now, this appears
to be the term Microsoft is using.
&lt;/p&gt;
&lt;p&gt;
Thinking about app development now, there are several options on the Microsoft platforms. 
&lt;br /&gt;
&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="2" width="637"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="113"&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="207"&gt;
&lt;strong&gt;Technologies&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="315"&gt;
&lt;strong&gt;Platforms&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="113"&gt;
Full .NET 4.5&lt;/td&gt;
&lt;td valign="top" width="207"&gt;
ASP.NET, WPF, Windows Forms, WCF, WF&lt;/td&gt;
&lt;td valign="top" width="315"&gt;
Windows 7, Windows 8 Desktop, Windows Server 2008, Windows Server 2012&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="113"&gt;
WinRT .NET 4.5&lt;/td&gt;
&lt;td valign="top" width="207"&gt;
Windows 8 UI style apps&lt;/td&gt;
&lt;td valign="top" width="315"&gt;
Windows 8 WinRT, Windows Phone 8, rumored for next-gen Xbox&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="113"&gt;
Full .NET 4&lt;/td&gt;
&lt;td valign="top" width="207"&gt;
ASP.NET, WPF, Windows Forms, WCF, WF&lt;/td&gt;
&lt;td valign="top" width="315"&gt;
Windows 7, Windows Server 2008, Azure PaaS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="113"&gt;
Silverlight&lt;/td&gt;
&lt;td valign="top" width="207"&gt;
Silverlight&lt;/td&gt;
&lt;td valign="top" width="315"&gt;
Windows 7, Windows 8 Desktop, Windows Phone 7, Windows Phone 8&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=970ce9b2-a608-4c68-9784-bc0bb0ddc5b1" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,970ce9b2-a608-4c68-9784-bc0bb0ddc5b1.aspx</comments>
      <category>Microsoft .NET</category>
      <category>Windows 8</category>
      <category>Windows Phone</category>
      <category>WinRT</category>
      <category>WP8</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=1cfed469-df70-4f07-918f-3270372dbf81</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,1cfed469-df70-4f07-918f-3270372dbf81.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,1cfed469-df70-4f07-918f-3270372dbf81.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=1cfed469-df70-4f07-918f-3270372dbf81</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I want to summarize some of the more major changes coming to the data portal in CSLA
4 version 4.5. Some of these are breaking changes.
</p>
        <p>
I’ve done four big things with the data portal:
</p>
        <ol>
          <li>
Added support for the new async/await keywords on the client and server</li>
          <li>
Merged the .NET and Silverlight data portal implementations into a single code base
that is now common across WinRT, .NET, and Silverlight</li>
          <li>
Removed the public virtual DataPortal_XYZ method definitions from Silverlight, because
it can now invoke non-public methods just like in .NET. Also, all local Silverlight
data portal methods no longer accept the async callback handler, because they now
support the async/await pattern</li>
          <li>
Remove the ProxyMode concept from the Silverlight data portal, because the RunLocal
attribute is now available on all platforms</li>
        </ol>
        <p>
All four have some level of breaking change.
</p>
        <p>
Adding comprehensive support for async/await changes the way .NET handles exceptions.
Although I’ve worked to keep the <em>top level</em> exceptions consistent, the actual
exception object graph (nested InnerExceptions) will almost certainly be different
now.
</p>
        <p>
Merging the .NET and Silverlight data portal implementations introduces a number of
relatively minor breaking changes for Silverlight users. Though if you’ve created
custom proxy/host pairs or other more advanced scenarios you might be more affected
than others. There may also be unintended side-effects to .NET users. Some might be
bugs, others might be necessary to achieve platform unification.
</p>
        <p>
Removing the public virtual DataPortal_XYZ methods from BusinessBase and BusinessListBase
will break anyone using the local Silverlight data portal. The fix is minor – just
change the public scopes to protected. This change shouldn’t affect anyone using .NET,
or using a remote data portal from Silverlight.
</p>
        <p>
Removing the async callback parameter from all Silverlight client-side DataPortal_XYZ
methods will break anyone using the local Silverlight data portal. The fix is to switch
to the new async/await pattern. The code changes are relatively minor, and generally
simplify your code, but if you’ve made extensive use of the client-side data portal
in Silverlight this will be a pretty big change I’m afraid.
</p>
        <p>
Similarly, removing the ProxyMode concept from the Silverlight data portal is a breaking
change for people using the local Silverlight data portal. Again, the fix is pretty
simple – just add the RunLocal attribute to the DataPortal_XYZ (or object factory)
methods as you have always done in .NET.
</p>
        <p>
On the upside, the coding patterns for writing code in .NET, WinRT, and Silverlight
are now the same.
</p>
        <p>
For example, a DataPortal_Fetch method <em>on any platform</em> looks like this:
</p>
        <blockquote>
          <p>
private void DataPortal_Fetch(int id)
</p>
        </blockquote>
        <p>
or like this
</p>
        <blockquote>
          <p>
private async Task DataPortal_Fetch(int id)
</p>
        </blockquote>
        <p>
The data portal will automatically detect if your method returns a Task and it will
await the method, allowing you to use the await keyword inside your DataPortal_XYZ
methods.
</p>
        <p>
Similarly, all platforms can now write this client-side code:
</p>
        <blockquote>
          <p>
var obj = await CustomerEdit.GetCustomerAsync(123);
</p>
        </blockquote>
        <p>
or the older event-style code:
</p>
        <blockquote>
          <p>
CustomerEdit.GetCustomer(123, (o, e) =&gt; 
<br />
  { 
<br />
      if (e.Error != null) 
<br />
          throw e.Error; 
<br />
     else 
<br />
          obj = e.Object; 
<br />
  });
</p>
        </blockquote>
        <p>
Only .NET code can use the synchronous approach:
</p>
        <blockquote>
          <p>
var obj = CustomerEdit.GetCustomer(123);
</p>
        </blockquote>
        <p>
This is one of the few platform-specific concepts left in the data portal.
</p>
        <p>
What is really cool is that the client and server sync/async concepts can be mixed
(as long as you know what to expect).
</p>
        <table border="0" cellspacing="0" cellpadding="2" width="877">
          <tbody>
            <tr>
              <td valign="top" width="79">
Client method</td>
              <td valign="top" width="77">
Client platform</td>
              <td valign="top" width="141">
Server method</td>
              <td valign="top" width="10">
Server platform</td>
              <td valign="top" width="571">
Remarks</td>
            </tr>
            <tr>
              <td valign="top" width="83">
Fetch</td>
              <td valign="top" width="81">
.NET only</td>
              <td valign="top" width="141">
void DataPortal_Fetch</td>
              <td valign="top" width="10">
any</td>
              <td valign="top" width="571">
Client call is synchronous; server call is synchronous</td>
            </tr>
            <tr>
              <td valign="top" width="83">
Fetch</td>
              <td valign="top" width="81">
.NET only</td>
              <td valign="top" width="141">
Task DataPortal_Fetch</td>
              <td valign="top" width="10">
any</td>
              <td valign="top" width="571">
Client call is synchronous; server call is asynchronous; note that client will block
until the server’s work is complete</td>
            </tr>
            <tr>
              <td valign="top" width="83">
BeginFetch</td>
              <td valign="top" width="81">
any</td>
              <td valign="top" width="141">
void DataPortal_Fetch</td>
              <td valign="top" width="10">
any</td>
              <td valign="top" width="571">
Client call is asynchronous (event-based); server call is synchronous; client will
not block, and must handle the callback event to be notified when the server call
is complete</td>
            </tr>
            <tr>
              <td valign="top" width="83">
BeginFetch</td>
              <td valign="top" width="81">
any</td>
              <td valign="top" width="141">
Task DataPortal_Fetch</td>
              <td valign="top" width="10">
any</td>
              <td valign="top" width="571">
Client call is asynchronous (event-based); server call is asynchronous; client will
not block, and must handle the callback event to be notified when the server call
is complete</td>
            </tr>
            <tr>
              <td valign="top" width="83">
FetchAsync</td>
              <td valign="top" width="81">
any</td>
              <td valign="top" width="141">
void DataPortal_Fetch</td>
              <td valign="top" width="10">
any</td>
              <td valign="top" width="571">
Client call is asynchronous; server call is synchronous; client will block or not,
depending on how you invoke the client-side Task (using await or other techniques);
the client-side Task will complete when the server call is complete</td>
            </tr>
            <tr>
              <td valign="top" width="83">
FetchAsync</td>
              <td valign="top" width="81">
any</td>
              <td valign="top" width="141">
Task DataPortal_Fetch</td>
              <td valign="top" width="10">
any</td>
              <td valign="top" width="571">
Client call is asynchronous; server call is asynchronous; client will block or not,
depending on how you invoke the client-side Task (using await or other techniques);
the client-side Task will complete when the server call is complete</td>
            </tr>
          </tbody>
        </table>
        <p>
I expect all client-side data portal code to switch to the async/await versions of
the methods, and so I’ve made them the mainline path through the data portal. The
synchronous and event-based async methods use async/await techniques behind the scenes
to do implement the desired behaviors.
</p>
        <p>
There is a lot of variety in how you can invoke an awaitable method like FetchAsync.
The specific async behaviors you should expect will vary depending on how you invoke
the method. For example, there’s a big difference between using the await keyword
or the Result or RunSynchronously methods:
</p>
        <blockquote>
          <p>
var obj = await CustomerEdit.GetCustomerAsync(123);
</p>
          <p>
var obj = CustomerEdit.GetCustomerAsync(123).Result;
</p>
        </blockquote>
        <p>
The former is async, the latter is sync. The former will return a simple exception
(if one occurs), the latter will return an AggregateException containing the simple
exception. This has little to do with CSLA, and nearly everything to do with the way
the async/await and task parallel library (TPL) are implemented by .NET.
</p>
        <p>
Finally, I do need to state that the actual network transport (typically WCF) used
by .NET, Silverlight, and WinRT aren’t the same. This is because WCF in .NET is far
more flexible than in Silverlight or WinRT. And because the WCF client-side proxies
generated for Silverlight use event-driven async methods, and in WinRT the proxy is
task-based.
</p>
        <p>
The data portal hides these differences pretty effectively, but you should understand
that they exist, and as a result there may be subtle behavioral differences between
platforms, especially when it comes to exceptions and exception details. The success
paths for creating, fetching, updating, and deleting objects are identical, but there
may be edge cases where differences exist.
</p>
        <p>
All in all I am quite pleased with how this is turning out. I’ve put a massive amount
of work into the data portal for 4.5, especially around unifying the implementations
across platforms. I suspect there’ll be some issues to work through during the beta
testing phase, but the end result is a far more consistent, maintainable, and streamlined
codebase for all platforms. That will benefit all of us over time.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=1cfed469-df70-4f07-918f-3270372dbf81" />
      </body>
      <title>CSLA data portal changes in version 4.5</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,1cfed469-df70-4f07-918f-3270372dbf81.aspx</guid>
      <link>http://www.lhotka.net/weblog/CSLADataPortalChangesInVersion45.aspx</link>
      <pubDate>Tue, 31 Jul 2012 04:53:23 GMT</pubDate>
      <description>&lt;p&gt;
I want to summarize some of the more major changes coming to the data portal in CSLA
4 version 4.5. Some of these are breaking changes.
&lt;/p&gt;
&lt;p&gt;
I’ve done four big things with the data portal:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Added support for the new async/await keywords on the client and server&lt;/li&gt;
&lt;li&gt;
Merged the .NET and Silverlight data portal implementations into a single code base
that is now common across WinRT, .NET, and Silverlight&lt;/li&gt;
&lt;li&gt;
Removed the public virtual DataPortal_XYZ method definitions from Silverlight, because
it can now invoke non-public methods just like in .NET. Also, all local Silverlight
data portal methods no longer accept the async callback handler, because they now
support the async/await pattern&lt;/li&gt;
&lt;li&gt;
Remove the ProxyMode concept from the Silverlight data portal, because the RunLocal
attribute is now available on all platforms&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
All four have some level of breaking change.
&lt;/p&gt;
&lt;p&gt;
Adding comprehensive support for async/await changes the way .NET handles exceptions.
Although I’ve worked to keep the &lt;em&gt;top level&lt;/em&gt; exceptions consistent, the actual
exception object graph (nested InnerExceptions) will almost certainly be different
now.
&lt;/p&gt;
&lt;p&gt;
Merging the .NET and Silverlight data portal implementations introduces a number of
relatively minor breaking changes for Silverlight users. Though if you’ve created
custom proxy/host pairs or other more advanced scenarios you might be more affected
than others. There may also be unintended side-effects to .NET users. Some might be
bugs, others might be necessary to achieve platform unification.
&lt;/p&gt;
&lt;p&gt;
Removing the public virtual DataPortal_XYZ methods from BusinessBase and BusinessListBase
will break anyone using the local Silverlight data portal. The fix is minor – just
change the public scopes to protected. This change shouldn’t affect anyone using .NET,
or using a remote data portal from Silverlight.
&lt;/p&gt;
&lt;p&gt;
Removing the async callback parameter from all Silverlight client-side DataPortal_XYZ
methods will break anyone using the local Silverlight data portal. The fix is to switch
to the new async/await pattern. The code changes are relatively minor, and generally
simplify your code, but if you’ve made extensive use of the client-side data portal
in Silverlight this will be a pretty big change I’m afraid.
&lt;/p&gt;
&lt;p&gt;
Similarly, removing the ProxyMode concept from the Silverlight data portal is a breaking
change for people using the local Silverlight data portal. Again, the fix is pretty
simple – just add the RunLocal attribute to the DataPortal_XYZ (or object factory)
methods as you have always done in .NET.
&lt;/p&gt;
&lt;p&gt;
On the upside, the coding patterns for writing code in .NET, WinRT, and Silverlight
are now the same.
&lt;/p&gt;
&lt;p&gt;
For example, a DataPortal_Fetch method &lt;em&gt;on any platform&lt;/em&gt; looks like this:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
private void DataPortal_Fetch(int id)
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
or like this
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
private async Task DataPortal_Fetch(int id)
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
The data portal will automatically detect if your method returns a Task and it will
await the method, allowing you to use the await keyword inside your DataPortal_XYZ
methods.
&lt;/p&gt;
&lt;p&gt;
Similarly, all platforms can now write this client-side code:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
var obj = await CustomerEdit.GetCustomerAsync(123);
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
or the older event-style code:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
CustomerEdit.GetCustomer(123, (o, e) =&amp;gt; 
&lt;br /&gt;
&amp;#160; { 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (e.Error != null) 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; throw e.Error; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160; else 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; obj = e.Object; 
&lt;br /&gt;
&amp;#160; });
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Only .NET code can use the synchronous approach:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
var obj = CustomerEdit.GetCustomer(123);
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
This is one of the few platform-specific concepts left in the data portal.
&lt;/p&gt;
&lt;p&gt;
What is really cool is that the client and server sync/async concepts can be mixed
(as long as you know what to expect).
&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="2" width="877"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="79"&gt;
Client method&lt;/td&gt;
&lt;td valign="top" width="77"&gt;
Client platform&lt;/td&gt;
&lt;td valign="top" width="141"&gt;
Server method&lt;/td&gt;
&lt;td valign="top" width="10"&gt;
Server platform&lt;/td&gt;
&lt;td valign="top" width="571"&gt;
Remarks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="83"&gt;
Fetch&lt;/td&gt;
&lt;td valign="top" width="81"&gt;
.NET only&lt;/td&gt;
&lt;td valign="top" width="141"&gt;
void DataPortal_Fetch&lt;/td&gt;
&lt;td valign="top" width="10"&gt;
any&lt;/td&gt;
&lt;td valign="top" width="571"&gt;
Client call is synchronous; server call is synchronous&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="83"&gt;
Fetch&lt;/td&gt;
&lt;td valign="top" width="81"&gt;
.NET only&lt;/td&gt;
&lt;td valign="top" width="141"&gt;
Task DataPortal_Fetch&lt;/td&gt;
&lt;td valign="top" width="10"&gt;
any&lt;/td&gt;
&lt;td valign="top" width="571"&gt;
Client call is synchronous; server call is asynchronous; note that client will block
until the server’s work is complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="83"&gt;
BeginFetch&lt;/td&gt;
&lt;td valign="top" width="81"&gt;
any&lt;/td&gt;
&lt;td valign="top" width="141"&gt;
void DataPortal_Fetch&lt;/td&gt;
&lt;td valign="top" width="10"&gt;
any&lt;/td&gt;
&lt;td valign="top" width="571"&gt;
Client call is asynchronous (event-based); server call is synchronous; client will
not block, and must handle the callback event to be notified when the server call
is complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="83"&gt;
BeginFetch&lt;/td&gt;
&lt;td valign="top" width="81"&gt;
any&lt;/td&gt;
&lt;td valign="top" width="141"&gt;
Task DataPortal_Fetch&lt;/td&gt;
&lt;td valign="top" width="10"&gt;
any&lt;/td&gt;
&lt;td valign="top" width="571"&gt;
Client call is asynchronous (event-based); server call is asynchronous; client will
not block, and must handle the callback event to be notified when the server call
is complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="83"&gt;
FetchAsync&lt;/td&gt;
&lt;td valign="top" width="81"&gt;
any&lt;/td&gt;
&lt;td valign="top" width="141"&gt;
void DataPortal_Fetch&lt;/td&gt;
&lt;td valign="top" width="10"&gt;
any&lt;/td&gt;
&lt;td valign="top" width="571"&gt;
Client call is asynchronous; server call is synchronous; client will block or not,
depending on how you invoke the client-side Task (using await or other techniques);
the client-side Task will complete when the server call is complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="83"&gt;
FetchAsync&lt;/td&gt;
&lt;td valign="top" width="81"&gt;
any&lt;/td&gt;
&lt;td valign="top" width="141"&gt;
Task DataPortal_Fetch&lt;/td&gt;
&lt;td valign="top" width="10"&gt;
any&lt;/td&gt;
&lt;td valign="top" width="571"&gt;
Client call is asynchronous; server call is asynchronous; client will block or not,
depending on how you invoke the client-side Task (using await or other techniques);
the client-side Task will complete when the server call is complete&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
I expect all client-side data portal code to switch to the async/await versions of
the methods, and so I’ve made them the mainline path through the data portal. The
synchronous and event-based async methods use async/await techniques behind the scenes
to do implement the desired behaviors.
&lt;/p&gt;
&lt;p&gt;
There is a lot of variety in how you can invoke an awaitable method like FetchAsync.
The specific async behaviors you should expect will vary depending on how you invoke
the method. For example, there’s a big difference between using the await keyword
or the Result or RunSynchronously methods:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
var obj = await CustomerEdit.GetCustomerAsync(123);
&lt;/p&gt;
&lt;p&gt;
var obj = CustomerEdit.GetCustomerAsync(123).Result;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
The former is async, the latter is sync. The former will return a simple exception
(if one occurs), the latter will return an AggregateException containing the simple
exception. This has little to do with CSLA, and nearly everything to do with the way
the async/await and task parallel library (TPL) are implemented by .NET.
&lt;/p&gt;
&lt;p&gt;
Finally, I do need to state that the actual network transport (typically WCF) used
by .NET, Silverlight, and WinRT aren’t the same. This is because WCF in .NET is far
more flexible than in Silverlight or WinRT. And because the WCF client-side proxies
generated for Silverlight use event-driven async methods, and in WinRT the proxy is
task-based.
&lt;/p&gt;
&lt;p&gt;
The data portal hides these differences pretty effectively, but you should understand
that they exist, and as a result there may be subtle behavioral differences between
platforms, especially when it comes to exceptions and exception details. The success
paths for creating, fetching, updating, and deleting objects are identical, but there
may be edge cases where differences exist.
&lt;/p&gt;
&lt;p&gt;
All in all I am quite pleased with how this is turning out. I’ve put a massive amount
of work into the data portal for 4.5, especially around unifying the implementations
across platforms. I suspect there’ll be some issues to work through during the beta
testing phase, but the end result is a far more consistent, maintainable, and streamlined
codebase for all platforms. That will benefit all of us over time.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=1cfed469-df70-4f07-918f-3270372dbf81" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,1cfed469-df70-4f07-918f-3270372dbf81.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
      <category>Silverlight</category>
      <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>9</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
There are three fairly popular presentation layer design patterns that I collectively
call the “M” patterns: MVC, MVP, and MVVM. This is because they all have an “M” standing
for “Model”, plus some other constructs.
</p>
        <p>
The thing with all of these “M” patterns is that for typical developers the patterns
are useless without a framework. Using the patterns without a framework almost always
leads to confusion, complication, high costs, frustration, and ultimately despair.
</p>
        <p>
These are just patterns after all, not implementations. And they are big, complex
patterns that include quite a few concepts that must work together correctly to enable
success.
</p>
        <p>
You can’t sew a fancy dress just because you have a pattern. You need appropriate
tools, knowledge, and experience. The same is true with these complex “M” patterns. 
</p>
        <p>
And if you want to repeat the process of sewing a fancy dress over and over again
(efficiently), you need specialized tooling for this purpose. In software terms this
is a framework.
</p>
        <p>
Trying to do something like MVVM without a framework is a huge amount of work. Tons
of duplicate code, reinventing the wheel, and retraining people to think differently.
</p>
        <p>
At least with a framework you avoid the duplicate code and hopefully don’t have to
reinvent the wheel – allowing you to focus on retraining people. The retraining part
is generally unavoidable, but a framework provides plumbing code and structure, making
the process easier.
</p>
        <p>
You might ask yourself why the MVC pattern only became popular in ASP.NET a few short
years ago. The pattern has existed since (at least) the mid-1990’s, and yet few people
used it, and even fewer used it successfully. This includes people on other platforms
too, at least up to the point that those platforms included well-implemented MVC frameworks.
</p>
        <p>
Strangely, MVC only started to become mainstream in the Microsoft world when ASP.NET
MVC showed up. This is a comprehensive framework with tooling integrated into Visual
Studio. As a result. typical developers can just build models, views, and controllers.
Prior to that point they also had to build everything the MVC framework does – which
is a lot of code. And not just a lot of code, but code that has absolutely nothing
to do with business value, and only relates to implementation of the pattern itself.
</p>
        <p>
We’re in the same situation today with MVVM in WPF, Silverlight, Windows Phone, and
Windows Runtime (WinRT in Windows 8). If you want to do MVVM without a framework,
you will have to build everything a framework would do – which is a lot of code that
provides absolutely no direct business value.
</p>
        <p>
Typical developers really do want to focus on building models, views, and viewmodels.
They don’t want to have to build weak reference based event routers, navigation models,
view abstractions, and all the other things a framework must do. In fact, most developers
probably <em>can’t </em>build those things, because they aren’t platform/framework
wonks. It takes a special kind of passion (or craziness) to learn the deep, highly
specialized techniques and tricks necessary to build a framework like this.
</p>
        <p>
What I really <i>wish</i> would happen, is for Microsoft to build an MVVM framework
comparable to ASP.NET MVC. Embed it into the .NET/XAML support for WinRT/Metro, and
include tooling in VS so we can right-click and add views and viewmodels. Ideally
this would be an open, iterative process like ASP.NET MVC has been – so after a few
years the framework reflects the smartest thoughts from Microsoft and from the community
at large.
</p>
        <p>
In the meantime, <a href="http://caliburnmicro.codeplex.com/">Caliburn Micro</a> appears
to be the best MVVM framework out there – certainly the most widely used. Probably
followed by various implementations using PRISM, and then MVVM Light, and some others.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=c61fd797-16f7-4f5f-a6fc-226f235b132a" />
      </body>
      <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;p&gt;
There are three fairly popular presentation layer design patterns that I collectively
call the “M” patterns: MVC, MVP, and MVVM. This is because they all have an “M” standing
for “Model”, plus some other constructs.
&lt;/p&gt;
&lt;p&gt;
The thing with all of these “M” patterns is that for typical developers the patterns
are useless without a framework. Using the patterns without a framework almost always
leads to confusion, complication, high costs, frustration, and ultimately despair.
&lt;/p&gt;
&lt;p&gt;
These are just patterns after all, not implementations. And they are big, complex
patterns that include quite a few concepts that must work together correctly to enable
success.
&lt;/p&gt;
&lt;p&gt;
You can’t sew a fancy dress just because you have a pattern. You need appropriate
tools, knowledge, and experience. The same is true with these complex “M” patterns. 
&lt;/p&gt;
&lt;p&gt;
And if you want to repeat the process of sewing a fancy dress over and over again
(efficiently), you need specialized tooling for this purpose. In software terms this
is a framework.
&lt;/p&gt;
&lt;p&gt;
Trying to do something like MVVM without a framework is a huge amount of work. Tons
of duplicate code, reinventing the wheel, and retraining people to think differently.
&lt;/p&gt;
&lt;p&gt;
At least with a framework you avoid the duplicate code and hopefully don’t have to
reinvent the wheel – allowing you to focus on retraining people. The retraining part
is generally unavoidable, but a framework provides plumbing code and structure, making
the process easier.
&lt;/p&gt;
&lt;p&gt;
You might ask yourself why the MVC pattern only became popular in ASP.NET a few short
years ago. The pattern has existed since (at least) the mid-1990’s, and yet few people
used it, and even fewer used it successfully. This includes people on other platforms
too, at least up to the point that those platforms included well-implemented MVC frameworks.
&lt;/p&gt;
&lt;p&gt;
Strangely, MVC only started to become mainstream in the Microsoft world when ASP.NET
MVC showed up. This is a comprehensive framework with tooling integrated into Visual
Studio. As a result. typical developers can just build models, views, and controllers.
Prior to that point they also had to build everything the MVC framework does – which
is a lot of code. And not just a lot of code, but code that has absolutely nothing
to do with business value, and only relates to implementation of the pattern itself.
&lt;/p&gt;
&lt;p&gt;
We’re in the same situation today with MVVM in WPF, Silverlight, Windows Phone, and
Windows Runtime (WinRT in Windows 8). If you want to do MVVM without a framework,
you will have to build everything a framework would do – which is a lot of code that
provides absolutely no direct business value.
&lt;/p&gt;
&lt;p&gt;
Typical developers really do want to focus on building models, views, and viewmodels.
They don’t want to have to build weak reference based event routers, navigation models,
view abstractions, and all the other things a framework must do. In fact, most developers
probably &lt;em&gt;can’t &lt;/em&gt;build those things, because they aren’t platform/framework
wonks. It takes a special kind of passion (or craziness) to learn the deep, highly
specialized techniques and tricks necessary to build a framework like this.
&lt;/p&gt;
&lt;p&gt;
What I really &lt;i&gt;wish&lt;/i&gt; would happen, is for Microsoft to build an MVVM framework
comparable to ASP.NET MVC. Embed it into the .NET/XAML support for WinRT/Metro, and
include tooling in VS so we can right-click and add views and viewmodels. Ideally
this would be an open, iterative process like ASP.NET MVC has been – so after a few
years the framework reflects the smartest thoughts from Microsoft and from the community
at large.
&lt;/p&gt;
&lt;p&gt;
In the meantime, &lt;a href="http://caliburnmicro.codeplex.com/"&gt;Caliburn Micro&lt;/a&gt; appears
to be the best MVVM framework out there – certainly the most widely used. Probably
followed by various implementations using PRISM, and then MVVM Light, and some others.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=c61fd797-16f7-4f5f-a6fc-226f235b132a" /&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=1b5df3cb-faa4-4798-9a8e-2339a1b61aa9</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,1b5df3cb-faa4-4798-9a8e-2339a1b61aa9.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,1b5df3cb-faa4-4798-9a8e-2339a1b61aa9.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=1b5df3cb-faa4-4798-9a8e-2339a1b61aa9</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I try not to vent all that often, but this just seems deserving…
</p>
        <p>
It seems like every time I install Visual Studio 2010, SQL Express doesn’t work.
</p>
        <p>
I just repaved my laptop – new Win7 install, the whole works.
</p>
        <p>
My <em>previous</em> install didn’t have working SQL Express – as in Visual Studio
couldn’t create or open SQL Express files as part of a project. I’d spent a few hours
trying to get it working – installing and uninstalling VS/SQL in various combinations
to no avail.
</p>
        <p>
The OS reinstall was, in part, because I figured I’d screwed something up so bad it
just need a total restart.
</p>
        <p>
Sadly, after installing Win7, Office, VS10, and then VS10 SP1 I still don’t have a
working SQL Express – basically out of the box.
</p>
        <p>
My conclusion? The VS10 installer is broken. What else could be wrong here?
</p>
        <p>
At no point, on this new OS install, have I installed SQL Server by hand. The SQL
Server install on the machine is directly from the VS10 install – <em>and it doesn’t
work</em>.
</p>
        <p>
The SQLEXPRESS service is running, but VS10 can’t talk to it.
</p>
        <p>
I’m surely not looking forward to spending another ton of hours troubleshooting this
problem – again. And presumably without success – again.
</p>
        <p>
In short: WTF!?!
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=1b5df3cb-faa4-4798-9a8e-2339a1b61aa9" />
      </body>
      <title>VS10 and SQL Express frustration</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,1b5df3cb-faa4-4798-9a8e-2339a1b61aa9.aspx</guid>
      <link>http://www.lhotka.net/weblog/VS10AndSQLExpressFrustration.aspx</link>
      <pubDate>Fri, 02 Dec 2011 17:56:07 GMT</pubDate>
      <description>&lt;p&gt;
I try not to vent all that often, but this just seems deserving…
&lt;/p&gt;
&lt;p&gt;
It seems like every time I install Visual Studio 2010, SQL Express doesn’t work.
&lt;/p&gt;
&lt;p&gt;
I just repaved my laptop – new Win7 install, the whole works.
&lt;/p&gt;
&lt;p&gt;
My &lt;em&gt;previous&lt;/em&gt; install didn’t have working SQL Express – as in Visual Studio
couldn’t create or open SQL Express files as part of a project. I’d spent a few hours
trying to get it working – installing and uninstalling VS/SQL in various combinations
to no avail.
&lt;/p&gt;
&lt;p&gt;
The OS reinstall was, in part, because I figured I’d screwed something up so bad it
just need a total restart.
&lt;/p&gt;
&lt;p&gt;
Sadly, after installing Win7, Office, VS10, and then VS10 SP1 I still don’t have a
working SQL Express – basically out of the box.
&lt;/p&gt;
&lt;p&gt;
My conclusion? The VS10 installer is broken. What else could be wrong here?
&lt;/p&gt;
&lt;p&gt;
At no point, on this new OS install, have I installed SQL Server by hand. The SQL
Server install on the machine is directly from the VS10 install – &lt;em&gt;and it doesn’t
work&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
The SQLEXPRESS service is running, but VS10 can’t talk to it.
&lt;/p&gt;
&lt;p&gt;
I’m surely not looking forward to spending another ton of hours troubleshooting this
problem – again. And presumably without success – again.
&lt;/p&gt;
&lt;p&gt;
In short: WTF!?!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=1b5df3cb-faa4-4798-9a8e-2339a1b61aa9" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,1b5df3cb-faa4-4798-9a8e-2339a1b61aa9.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=12925691-3e22-41e2-9d8f-a66c115e8b8c</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,12925691-3e22-41e2-9d8f-a66c115e8b8c.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,12925691-3e22-41e2-9d8f-a66c115e8b8c.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=12925691-3e22-41e2-9d8f-a66c115e8b8c</wfw:commentRss>
      <slash:comments>22</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>Disclaimer: I know nothing. The following is (hopefully) well educated speculation
on my part. Time will tell whether I’m right.</em>
        </p>
        <p>
I really like Silverlight. I’ve been a strong proponent of <sub></sub>Silverlight
since 2007 when I rushed to port CSLA .NET to the new platform.
</p>
        <p>
In fact, Magenic provided me with a dev and test team to make that transition happen,
because we all saw the amazing potential of Silverlight.
</p>
        <p>
And it has been a good few years.
</p>
        <p>
But let’s face reality. Microsoft has invested who-knows-how-much money to build WinRT,
and no matter how you look at it, WinRT is the replacement for Win32. That means all
the stuff that runs on Win32 is “dead”. This includes Silverlight, Windows Forms,
WPF, console apps – everything.
</p>
        <p>
(this is partially in answer to <a href="http://www.zdnet.com/blog/microsoft/will-there-be-a-silverlight-6-and-does-it-matter/11180">Mary-Jo’s
article on Silverlight 5</a>)
</p>
        <p>
I wouldn’t be surprised if Silverlight 5 was the last version. I also wouldn’t be
surprised if .NET 4.5 was the last version for the Win32 client, and that future versions
of .NET were released for servers and Azure only.
</p>
        <p>
Before you panic though, remember that VB6 has been “dead” for well over a decade.
It died at the PDC in 1999, along with COM. But you still use VB6 and/or COM? Or at
least you know organizations who do? How can that be when it is dead??
</p>
        <p>
That’s my point. “dead” isn’t really dead.
</p>
        <p>
Just how long do you think people (like me and you) will continue to run Win32-based
operating systems and applications? At least 10 years, and many will probably run
15-20 years into the future. This is the rate of change that exists in the corporate
world. At least that’s been my observation for the past couple decades.
</p>
        <p>
Microsoft supports their technologies for 10 years after a final release. So even
if SL5 is the end (and they haven’t said it is), that gives us 10 years of supported
Silverlight usage. The same for the other various .NET and Win32 technologies.
</p>
        <p>
That’s plenty of time for Microsoft to get WinRT mature, and to allow us to migrate
to that platform over a period of years.
</p>
        <p>
I don’t expect WinRT 1.0 (the Windows 8 version) to be capable of replacing Win32
or .NET. I rather expect it to be pretty crippled in many respects. Much like VB 1.0
(and 2.0), .NET 1.0 and 1.1, Silverlight 1 and 2, etc.
</p>
        <p>
But Windows 9 or Windows 10 (WinRT 2.0 or 3.0) should be quite capable of replacing
Win32 and .NET and Silverlight.
</p>
        <p>
If we assume Win8 comes out in 2012, and that Microsoft does a forced march release
of 9 and 10 every two years, that means 2016 will give us WinRT 3.0. And if we hold
to the basic truism that Microsoft always gets it right on their third release, that’ll
be the one to target.
</p>
        <p>
I think it is also reasonable to expect that Win9 and Win10 will probably continue
to have the “blue side” (see my <a href="http://www.lhotka.net/weblog/UpdatedWin8DevPlatformDiagram.aspx">Windows
8 dev platform</a> post), meaning Win32, .NET, and Silverlight will continue to be
released and therefore supported over that time. They may not <em>change</em> over
that time, but they’ll be there, and they’ll be supported – or so goes my theory.
</p>
        <p>
This means that in 2016 the clock might really start for migration from Win32/.NET/Silverlight
to WinRT.
</p>
        <p>
Yes, I expect that a lot of us will build things for WinRT sooner than 2016. I certainly
hope so, because it looks like a lot of fun!
</p>
        <p>
But from a corporate perspective, where things move so slowly, this is probably good
news. Certain apps can be ported sooner, but big and important apps can move slowly
over time.
</p>
        <p>
What to do in the meantime? Between now and 2016?
</p>
        <p>
Focus on XAML, and on n-tier or SOA async server access as architectural models.
</p>
        <p>
Or focus on HTML 5 (soon to be HTML 6 fwiw, and possibly HTML 7 by 2016 for all we
know).
</p>
        <p>
I’m focusing on XAML, creating a CSLA 4 version 4.5 release that supports .NET 4.5
on servers, Azure, Windows (Win32), and Windows (WinRT). And Silverlight 5 of course.
</p>
        <p>
In fact, the plan is for a version 4.3 release to support Silverlight 5, then version
4.5 with support for .NET 4.5 and WinRT.
</p>
        <p>
I suspect that you can use Silverlight or WPF as a bridge to WinRT. The real key is
architecture.
</p>
        <ol>
          <li>
An n-tier architecture is fine, as long as the data access layer is running on a server,
and the client uses async calls to interact with the server. WinRT requires a lot
of async, at a minimum all server interactions. Silverlight forces you to adopt this
architecture already, so it is a natural fit. WPF doesn’t force the issue, but you
can choose to do “the right thing”.</li>
          <li>
You can also build your client applications to be “edge applications” – on the edge
of a service-oriented system. This is a less mature technology area, and it is more
costly. But it is also a fine architecture for environments composed of many disparate
applications that need to interact as a loosely coupled system. Again, all service
interactions by the edge applications (the ones running on the clients) must be async.</li>
          <li>
Or you can build “hybrid solutions”, where individual applications are built using
n-tier architectures (with async server calls). And where <em>some</em> of those applications
also expose service interfaces so they can participate as part of a broader service-oriented
system.</li>
        </ol>
        <p>
I favor option 3. I don’t like to accept the cost and performance ramifications of
SOA when building <em>an application</em>, so I’d prefer to use a faster and cheaper
n-tier architecture. At the same time, many applications do need to interact with
each other, and the requirement to create “application mashups” through edge applications
happens from time to time. So building my n-tier applications to have dual interfaces
(XAML and JSON for example) is a perfect compromise.
</p>
        <p>
The direct users of my application get n-tier performance and maintainability. And
the broader organization can access my slower-moving, standards-based, contractual
service interface. It is the best of both worlds.
</p>
        <p>
So do I care if Silverlight 5 is the last version of Silverlight?
</p>
        <p>
Only if WPF continues to evolve prior to us all moving to WinRT. If WPF continues
to evolve, I would expect Silverlight to, at a minimum, keep up. Otherwise Microsoft
has led a lot of people down a dead-end path, and that’s a serious betrayal of trust.
</p>
        <p>
But if my suspicions are correct, we won’t see anything but bug fixes for WPF or Silverlight
for many years. I rather expect that these two technologies just became the next Windows
Forms. You’ll notice that WinForms hasn’t had anything but bug fixes for 6 years right?
The precedent is there for a UI technology to be “supported, stable, and stagnant”
for a very long time, and this is my expectation for WPF/SL.
</p>
        <p>
And if that’s the case, then I don’t care at all about a Silverlight 6 release. We
can use WPF/SL in their current form, right up to the point that WinRT is stable and
capable enough to act as a replacement for today’s Win32/.NET applications.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=12925691-3e22-41e2-9d8f-a66c115e8b8c" />
      </body>
      <title>Silverlight 6 doesn&amp;rsquo;t matter</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,12925691-3e22-41e2-9d8f-a66c115e8b8c.aspx</guid>
      <link>http://www.lhotka.net/weblog/Silverlight6DoesnrsquotMatter.aspx</link>
      <pubDate>Wed, 09 Nov 2011 02:51:12 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;Disclaimer: I know nothing. The following is (hopefully) well educated speculation
on my part. Time will tell whether I’m right.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
I really like Silverlight. I’ve been a strong proponent of &lt;sub&gt;&lt;/sub&gt;Silverlight
since 2007 when I rushed to port CSLA .NET to the new platform.
&lt;/p&gt;
&lt;p&gt;
In fact, Magenic provided me with a dev and test team to make that transition happen,
because we all saw the amazing potential of Silverlight.
&lt;/p&gt;
&lt;p&gt;
And it has been a good few years.
&lt;/p&gt;
&lt;p&gt;
But let’s face reality. Microsoft has invested who-knows-how-much money to build WinRT,
and no matter how you look at it, WinRT is the replacement for Win32. That means all
the stuff that runs on Win32 is “dead”. This includes Silverlight, Windows Forms,
WPF, console apps – everything.
&lt;/p&gt;
&lt;p&gt;
(this is partially in answer to &lt;a href="http://www.zdnet.com/blog/microsoft/will-there-be-a-silverlight-6-and-does-it-matter/11180"&gt;Mary-Jo’s
article on Silverlight 5&lt;/a&gt;)
&lt;/p&gt;
&lt;p&gt;
I wouldn’t be surprised if Silverlight 5 was the last version. I also wouldn’t be
surprised if .NET 4.5 was the last version for the Win32 client, and that future versions
of .NET were released for servers and Azure only.
&lt;/p&gt;
&lt;p&gt;
Before you panic though, remember that VB6 has been “dead” for well over a decade.
It died at the PDC in 1999, along with COM. But you still use VB6 and/or COM? Or at
least you know organizations who do? How can that be when it is dead??
&lt;/p&gt;
&lt;p&gt;
That’s my point. “dead” isn’t really dead.
&lt;/p&gt;
&lt;p&gt;
Just how long do you think people (like me and you) will continue to run Win32-based
operating systems and applications? At least 10 years, and many will probably run
15-20 years into the future. This is the rate of change that exists in the corporate
world. At least that’s been my observation for the past couple decades.
&lt;/p&gt;
&lt;p&gt;
Microsoft supports their technologies for 10 years after a final release. So even
if SL5 is the end (and they haven’t said it is), that gives us 10 years of supported
Silverlight usage. The same for the other various .NET and Win32 technologies.
&lt;/p&gt;
&lt;p&gt;
That’s plenty of time for Microsoft to get WinRT mature, and to allow us to migrate
to that platform over a period of years.
&lt;/p&gt;
&lt;p&gt;
I don’t expect WinRT 1.0 (the Windows 8 version) to be capable of replacing Win32
or .NET. I rather expect it to be pretty crippled in many respects. Much like VB 1.0
(and 2.0), .NET 1.0 and 1.1, Silverlight 1 and 2, etc.
&lt;/p&gt;
&lt;p&gt;
But Windows 9 or Windows 10 (WinRT 2.0 or 3.0) should be quite capable of replacing
Win32 and .NET and Silverlight.
&lt;/p&gt;
&lt;p&gt;
If we assume Win8 comes out in 2012, and that Microsoft does a forced march release
of 9 and 10 every two years, that means 2016 will give us WinRT 3.0. And if we hold
to the basic truism that Microsoft always gets it right on their third release, that’ll
be the one to target.
&lt;/p&gt;
&lt;p&gt;
I think it is also reasonable to expect that Win9 and Win10 will probably continue
to have the “blue side” (see my &lt;a href="http://www.lhotka.net/weblog/UpdatedWin8DevPlatformDiagram.aspx"&gt;Windows
8 dev platform&lt;/a&gt; post), meaning Win32, .NET, and Silverlight will continue to be
released and therefore supported over that time. They may not &lt;em&gt;change&lt;/em&gt; over
that time, but they’ll be there, and they’ll be supported – or so goes my theory.
&lt;/p&gt;
&lt;p&gt;
This means that in 2016 the clock might really start for migration from Win32/.NET/Silverlight
to WinRT.
&lt;/p&gt;
&lt;p&gt;
Yes, I expect that a lot of us will build things for WinRT sooner than 2016. I certainly
hope so, because it looks like a lot of fun!
&lt;/p&gt;
&lt;p&gt;
But from a corporate perspective, where things move so slowly, this is probably good
news. Certain apps can be ported sooner, but big and important apps can move slowly
over time.
&lt;/p&gt;
&lt;p&gt;
What to do in the meantime? Between now and 2016?
&lt;/p&gt;
&lt;p&gt;
Focus on XAML, and on n-tier or SOA async server access as architectural models.
&lt;/p&gt;
&lt;p&gt;
Or focus on HTML 5 (soon to be HTML 6 fwiw, and possibly HTML 7 by 2016 for all we
know).
&lt;/p&gt;
&lt;p&gt;
I’m focusing on XAML, creating a CSLA 4 version 4.5 release that supports .NET 4.5
on servers, Azure, Windows (Win32), and Windows (WinRT). And Silverlight 5 of course.
&lt;/p&gt;
&lt;p&gt;
In fact, the plan is for a version 4.3 release to support Silverlight 5, then version
4.5 with support for .NET 4.5 and WinRT.
&lt;/p&gt;
&lt;p&gt;
I suspect that you can use Silverlight or WPF as a bridge to WinRT. The real key is
architecture.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
An n-tier architecture is fine, as long as the data access layer is running on a server,
and the client uses async calls to interact with the server. WinRT requires a lot
of async, at a minimum all server interactions. Silverlight forces you to adopt this
architecture already, so it is a natural fit. WPF doesn’t force the issue, but you
can choose to do “the right thing”.&lt;/li&gt;
&lt;li&gt;
You can also build your client applications to be “edge applications” – on the edge
of a service-oriented system. This is a less mature technology area, and it is more
costly. But it is also a fine architecture for environments composed of many disparate
applications that need to interact as a loosely coupled system. Again, all service
interactions by the edge applications (the ones running on the clients) must be async.&lt;/li&gt;
&lt;li&gt;
Or you can build “hybrid solutions”, where individual applications are built using
n-tier architectures (with async server calls). And where &lt;em&gt;some&lt;/em&gt; of those applications
also expose service interfaces so they can participate as part of a broader service-oriented
system.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I favor option 3. I don’t like to accept the cost and performance ramifications of
SOA when building &lt;em&gt;an application&lt;/em&gt;, so I’d prefer to use a faster and cheaper
n-tier architecture. At the same time, many applications do need to interact with
each other, and the requirement to create “application mashups” through edge applications
happens from time to time. So building my n-tier applications to have dual interfaces
(XAML and JSON for example) is a perfect compromise.
&lt;/p&gt;
&lt;p&gt;
The direct users of my application get n-tier performance and maintainability. And
the broader organization can access my slower-moving, standards-based, contractual
service interface. It is the best of both worlds.
&lt;/p&gt;
&lt;p&gt;
So do I care if Silverlight 5 is the last version of Silverlight?
&lt;/p&gt;
&lt;p&gt;
Only if WPF continues to evolve prior to us all moving to WinRT. If WPF continues
to evolve, I would expect Silverlight to, at a minimum, keep up. Otherwise Microsoft
has led a lot of people down a dead-end path, and that’s a serious betrayal of trust.
&lt;/p&gt;
&lt;p&gt;
But if my suspicions are correct, we won’t see anything but bug fixes for WPF or Silverlight
for many years. I rather expect that these two technologies just became the next Windows
Forms. You’ll notice that WinForms hasn’t had anything but bug fixes for 6 years right?
The precedent is there for a UI technology to be “supported, stable, and stagnant”
for a very long time, and this is my expectation for WPF/SL.
&lt;/p&gt;
&lt;p&gt;
And if that’s the case, then I don’t care at all about a Silverlight 6 release. We
can use WPF/SL in their current form, right up to the point that WinRT is stable and
capable enough to act as a replacement for today’s Win32/.NET applications.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=12925691-3e22-41e2-9d8f-a66c115e8b8c" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,12925691-3e22-41e2-9d8f-a66c115e8b8c.aspx</comments>
      <category>Architecture</category>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
      <category>Silverlight</category>
      <category>WinRT</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=1279ff31-560e-4023-ab7b-59cf37dac729</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,1279ff31-560e-4023-ab7b-59cf37dac729.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,1279ff31-560e-4023-ab7b-59cf37dac729.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=1279ff31-560e-4023-ab7b-59cf37dac729</wfw:commentRss>
      <slash:comments>9</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
At //build/ this past week I heard numerous people suggest that WinRT and Metro aren’t
going to be used for business app development. That Metro is for consumer apps only.
These comments were from Microsoft and non-Microsoft people.
</p>
        <p>
They could be right, but I think they are wrong.
</p>
        <p>
Let’s think forward about 5 years, and assume that Win8 has become quite successful
in the consumer space with Metro apps. And let’s remember that consumers are the same
people who use computers in the corporate world.
</p>
        <p>
Then let’s think back to the early 1990’s, when most corporate apps were 3270 or VT100
green-screen terminals, and what people used at home (or even at work for other apps
like Lotus 123 or maybe Excel) was Windows.
</p>
        <p>
Users back then pushed hard for Windows interfaces for everything. Compared to the
green-screen terminals, Windows was a breath of fresh air, and users really wanted
to get away from the terminal experience.
</p>
        <p>
Metro is to today’s Windows, what Windows was to terminals. A smooth, touch-based
interface that encourages more intuitive and aesthetically pleasing user experiences.
And the extremely popular iPad interface is similar.
</p>
        <p>
In 5 years I strongly suspect that users will be pushing hard for Metro interfaces
for everything. The old-fashioned, legacy Windows look (because that’s what it will
be) will be extremely undesirable.
</p>
        <p>
In fact I would suggest it is <em>already</em> uncool, especially in the face of iPad
apps that exist today.
</p>
        <p>
Windows computers are … computers.
</p>
        <p>
iPad devices are friendly companions on people’s individual journeys through life.
</p>
        <p>
(and so are Windows Phone devices – my phone is not a computing device, it is an integral
part of my life)
</p>
        <p>
Windows 8 and Metro gives us the opportunity to build apps that fit into something
that is an integral part of people’s lives.
</p>
        <p>
Because most people spend at least half their waking life at work, it seems obvious
that they’ll want their work apps to be just as smooth and seamless as all the other
apps they use.
</p>
        <p>
In short, my prediction is that 5 years from now there’ll be “legacy Windows developers”
still building stuff that runs in the clunky desktop mode. And there’ll be “modern
Windows developers” that build stuff that runs in Metro – and a lot of those Metro
apps will be business applications.
</p>
        <p>
Will we make Jensen (the Microsoft keynote speaker pushing the vision of Metro) happy
with every one of these business apps? Will they all fit exactly into the “Metro style”? 
</p>
        <p>
I doubt it.
</p>
        <p>
But games don’t either. Metro games take over the whole screen and do whatever they
want in the space. And nobody complains that they break the Metro style rules.
</p>
        <p>
Some data-heavy business apps will also break the Metro style rules – I pretty much
guarantee it. And yet they’ll still run in the Metro mode, and thus will run on ARM
as well as Intel chips, and won’t require the user to see the clunky desktop mode.
</p>
        <p>
In 5 years we can all check back on this blog post to see if I’m right. But I strongly
suspect that 5 years from now I’ll be having a great time building some cool Metro
business app <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/WinRT-and-business-apps_A368/wlEmoticon-smile_2.png" /></p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=1279ff31-560e-4023-ab7b-59cf37dac729" />
      </body>
      <title>WinRT and business apps</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,1279ff31-560e-4023-ab7b-59cf37dac729.aspx</guid>
      <link>http://www.lhotka.net/weblog/WinRTAndBusinessApps.aspx</link>
      <pubDate>Sat, 17 Sep 2011 16:52:48 GMT</pubDate>
      <description>&lt;p&gt;
At //build/ this past week I heard numerous people suggest that WinRT and Metro aren’t
going to be used for business app development. That Metro is for consumer apps only.
These comments were from Microsoft and non-Microsoft people.
&lt;/p&gt;
&lt;p&gt;
They could be right, but I think they are wrong.
&lt;/p&gt;
&lt;p&gt;
Let’s think forward about 5 years, and assume that Win8 has become quite successful
in the consumer space with Metro apps. And let’s remember that consumers are the same
people who use computers in the corporate world.
&lt;/p&gt;
&lt;p&gt;
Then let’s think back to the early 1990’s, when most corporate apps were 3270 or VT100
green-screen terminals, and what people used at home (or even at work for other apps
like Lotus 123 or maybe Excel) was Windows.
&lt;/p&gt;
&lt;p&gt;
Users back then pushed hard for Windows interfaces for everything. Compared to the
green-screen terminals, Windows was a breath of fresh air, and users really wanted
to get away from the terminal experience.
&lt;/p&gt;
&lt;p&gt;
Metro is to today’s Windows, what Windows was to terminals. A smooth, touch-based
interface that encourages more intuitive and aesthetically pleasing user experiences.
And the extremely popular iPad interface is similar.
&lt;/p&gt;
&lt;p&gt;
In 5 years I strongly suspect that users will be pushing hard for Metro interfaces
for everything. The old-fashioned, legacy Windows look (because that’s what it will
be) will be extremely undesirable.
&lt;/p&gt;
&lt;p&gt;
In fact I would suggest it is &lt;em&gt;already&lt;/em&gt; uncool, especially in the face of iPad
apps that exist today.
&lt;/p&gt;
&lt;p&gt;
Windows computers are … computers.
&lt;/p&gt;
&lt;p&gt;
iPad devices are friendly companions on people’s individual journeys through life.
&lt;/p&gt;
&lt;p&gt;
(and so are Windows Phone devices – my phone is not a computing device, it is an integral
part of my life)
&lt;/p&gt;
&lt;p&gt;
Windows 8 and Metro gives us the opportunity to build apps that fit into something
that is an integral part of people’s lives.
&lt;/p&gt;
&lt;p&gt;
Because most people spend at least half their waking life at work, it seems obvious
that they’ll want their work apps to be just as smooth and seamless as all the other
apps they use.
&lt;/p&gt;
&lt;p&gt;
In short, my prediction is that 5 years from now there’ll be “legacy Windows developers”
still building stuff that runs in the clunky desktop mode. And there’ll be “modern
Windows developers” that build stuff that runs in Metro – and a lot of those Metro
apps will be business applications.
&lt;/p&gt;
&lt;p&gt;
Will we make Jensen (the Microsoft keynote speaker pushing the vision of Metro) happy
with every one of these business apps? Will they all fit exactly into the “Metro style”? 
&lt;/p&gt;
&lt;p&gt;
I doubt it.
&lt;/p&gt;
&lt;p&gt;
But games don’t either. Metro games take over the whole screen and do whatever they
want in the space. And nobody complains that they break the Metro style rules.
&lt;/p&gt;
&lt;p&gt;
Some data-heavy business apps will also break the Metro style rules – I pretty much
guarantee it. And yet they’ll still run in the Metro mode, and thus will run on ARM
as well as Intel chips, and won’t require the user to see the clunky desktop mode.
&lt;/p&gt;
&lt;p&gt;
In 5 years we can all check back on this blog post to see if I’m right. But I strongly
suspect that 5 years from now I’ll be having a great time building some cool Metro
business app &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/WinRT-and-business-apps_A368/wlEmoticon-smile_2.png" /&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=1279ff31-560e-4023-ab7b-59cf37dac729" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,1279ff31-560e-4023-ab7b-59cf37dac729.aspx</comments>
      <category>Microsoft .NET</category>
      <category>WinRT</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=32805477-89ee-4a76-af9f-674ce8d248ed</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,32805477-89ee-4a76-af9f-674ce8d248ed.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,32805477-89ee-4a76-af9f-674ce8d248ed.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=32805477-89ee-4a76-af9f-674ce8d248ed</wfw:commentRss>
      <slash:comments>17</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Microsoft revealed quite a lot of detail about "Windows 8" and its programming model
at the //build/ conference in September 2011. The result is a lot of excitement, and
a lot of fear and worry, on the part of Microsoft developers and customers.
</p>
        <p>
From what I've seen so far, in reading tweets and other online discussions, is that
people's fear and worry are misplaced. Not necessarily unwarranted, but misplaced.
</p>
        <p>
There's a lot of worry that ".NET has no future" or "Silverlight has no future". These
worries are, in my view, misplaced.
</p>
        <p>
First, it is important to understand that the new WinRT (Windows Runtime) model that
supports Win8 Metro style apps is accessible from .NET. Yes, you can also use C++,
but I can't imagine a whole lot of people care. And you can use JavaScript, which
is pretty cool.
</p>
        <p>
But the important thing to understand is that WinRT is fully accessible from .NET.
The model is quite similar to Silverlight for Windows Phone. You write a program using
C# or VB, and that program runs within the CLR, and has access to a set of base class
libraries (BCL) just like a .NET, Silverlight, or WP7 app today. Your program also
has access to a large new namespace where you have access to all the WinRT types. 
</p>
        <p>
These WinRT types are the same ones used by C++ or JavaScript developers in WinRT.
I think this is very cool, because it means that (for perhaps the first time ever)
we'll be able to create truly first-class Windows applications in C#, without having
to resort to C++ or p/invoke calls.
</p>
        <p>
The BCL available to your Metro/WinRT app is restricted to things that are "safe"
for a Metro app to use, and the BCL features don't duplicate what's provided by the
WinRT objects. This means that some of your existing .NET code won't just compile
in WinRT, because you might be using some .NET BCL features that are now found in
WinRT, or that aren't deemed "safe" for a Metro app.
</p>
        <p>
That is exactly like Silverlight and WP7 apps. The BCL features available in Silverlight
or WP7 are also restricted to disallow things that aren't safe, or that make no sense
in those environments.
</p>
        <p>
In fact, from what I've seen so far, it looks like the WinRT BCL features are more
comparable to Silverlight than anything else. So I strongly suspect that Silverlight
apps will migrate to WinRT far more easily than any other type of app.
</p>
        <p>
None of this gives me any real worry or concern. Yes, if you are a Windows Forms developer,
and very possibly if you are a WPF developer, you'll have some real effort to migrate
to WinRT, but it isn't like you have to learn everything new from scratch like we
did moving from VB/COM to .NET. And if you are a Silverlight developer you'll probably
have a pretty easy time, but there'll still be some real effort to migrate to WinRT.
</p>
        <p>
If nothing else, we all need to go learn the WinRT API, which Microsoft said was around
1800 types.
</p>
        <p>
So what should you worry about? In my view, the big thing about Win8 and Metro style
apps is that these apps have a different lifetime and a different user experience
model. The last time we underwent such a dramatic change in the way Windows apps worked
was when we moved from Windows 3.1 (or Windows for Workgroups) to Windows 95.
</p>
        <p>
To bring this home, let me share a story. When .NET was first coming out I was quite
excited, and I was putting a lot of time into learning .NET. As a developer my world
was turned upside down and I had to learn a whole new platform and tools and langauge
- awesome!! :)
</p>
        <p>
I was having a conversation with my mother, and she could tell I was having fun. She
asked "so when will I see some of this new .NET on my computer?"
</p>
        <p>
How do you answer that? Windows Forms, as different as it was from VB6, created apps
that looked exactly the same. My mother saw exactly zero difference as a result of
our massive move from VB/COM to .NET.
</p>
        <p>
Kind of sad when you think about it. We learned a whole new programming platform so
we could build apps that users couldn't distinguish from what we'd been doing before.
</p>
        <p>
Windows 8 and Metro are the inverse. We don't really need to learn any new major platform
or tools or languages. From a developer perspective this is exciting, but evolutionary.
But from a user perspective everything is changing. When I next talk to my mother
about how excited I am, I can tell her (actually I can show her thanks to the Samsung
tablet - thank you Microsoft!) that she'll see new applications that are easier to
learn, understand, and use.
</p>
        <p>
This is wonderful!!
</p>
        <p>
But from our perspective as developers, we are going to have to rethink and relearn
how apps are designed at the user experience and user workflow level. And we are going
to have to learn how to live within the new application lifecycle model where apps
can suspend and then either resume or be silently terminated.
</p>
        <p>
Instead of spending a lot of time angsting over whether the WinRT CLR or BCL is exactly
like .NET/Silverlight/WP7, we should be angsting over the major impact of the application
lifecycle and Metro style UX and Metro style navigation within each application.
</p>
        <p>
OK, I don't honestly think we should have angst over that either. I think this is
exciting, and challenging. If I wanted to live in a stable (stagnant?) world where
I didn't need to think through such things, well, I think I'd be an accountant or
something…
</p>
        <p>
Yes, this will take some effort and some deep thinking. And it will absolutely impact
how we build software over the next many years.
</p>
        <p>
And this brings me to the question of timing. When should we care about Metro and
WinRT? Here's a potential timeline, that I suspect is quite realistic based on watching
Windows releases since 1990.
</p>
        <p>
Win8 will probably RTM in time for hardware vendors to create, package, and deliver
all sorts of machines for the 2012 holiday season. So probably somewhere between July
and October 2012.
</p>
        <p>
For consumer apps this means you might care about Win8 now, because you might want
to make sure your cool app is in the Win8 online store for the 2012 holiday season.
</p>
        <p>
For business apps the timing is quite different. Corporations roll out a new OS much
later than consumers get it through retailers. As an example, Windows 7 has now been
out for about three years, but most corporations still use Windows XP!!! I have no
hard numbers, but I suspect Win7 is deployed in maybe 25% of corporations - after
being available for three years.
</p>
        <p>
That is pretty typical.
</p>
        <p>
So for business apps, we can look at doing a reasonable amount of Win8 Metro development
around 2015. 
</p>
        <p>
Yes, some of us will be lucky enough to work for "type A" companies that jump on new
things as they come out, and we'll get to build Metro apps starting in late 2012.
</p>
        <p>
Most of us work for "type B" companies, and they'll roll out a new OS after SP1 has
been deployed by the "type A" companies - these are the companies that will deploy
Win8 after has been out for 2-4 years.
</p>
        <p>
Some unfortunate souls work for "type C" companies, and they'll roll out Win8 when
Win7 loses support (so around 2018?). I used to work for a "type C" company, and that's
a hard place to find yourself as a developer. Yet those companies do exist even today.
</p>
        <p>
What does this all mean? It means that for a typical corporate or business developer,
we have around 4 years from today before we're building WinRT apps.
</p>
        <p>
The logical question to ask then (and you really should ask this question), is what
do we do for the next 4 years??? How do we build software between now and when we
get to use Metro/WinRT?
</p>
        <p>
Obviously the concern is that if you build an app starting today, how do you protect
that investment so you don't have to completely rewrite the app in 4 years?
</p>
        <p>
I don't yet know the solid answer. We just don't have enough deep information yet.
That'll change though, because we now have access to early Win8 builds and early tooling.
</p>
        <p>
What I suspect is that the best way to mitigate risk will be to build apps today using
Silverlight and the Silverlight navigation model (because that's also the model used
in WinRT). 
</p>
        <p>
The BCL features available to a Silverlight app are closer to WinRT than full .NET
is today, so the odds of using BCL features that won't be available to a Metro app
is reduced.
</p>
        <p>
Also, thinking through the user experience and user workflow from a Silverlight navigation
perspective will get your overall application experience closer to what you'd do in
a Metro style app - at least when compared to any workflow you'd have in Windows Forms.
Certainly you can use WPF and also create a Silverlight-style navigation model, and
that'd also be good.
</p>
        <p>
Clearly any app that uses multiple windows or modal dialogs (or really any dialogs)
will not migrate to Metro without some major rework.
</p>
        <p>
The one remaining concern is the new run/suspend/resume/terminate application model.
Even Silverlight doesn't use that model today - except on WP7. I think some thought
needs to go into application design today to enable support for suspend in the future.
I don't have a great answer right at the moment, but I know that I'll be thinking
about it, because this is important to easing migrations in the future.
</p>
        <p>
It is true that whatever XAML you use today won't move to WinRT unchanged. Well, I
can't say that with certainty, but the reality is that WinRT exposes several powerful
UI controls we don't have today. And any Metro style app will need to use those WinRT
controls to fit seamlessly into the Win8 world.
</p>
        <p>
My guess is that some of the third-party component vendors are well on their way to
replicating the WinRT controls for Silverlight and WPF today. I surely hope so anyway.
And that's probably going to be the best way to minimize the XAML migration. If we
have access to controls today that are very similar to the WinRT controls of the future,
then we can more easily streamline the eventual migration.
</p>
        <p>
In summary, Windows 8, WinRT, and Metro are a big deal. But not in the way most people
seem to think. The .NET/C#/CLR/BCL story is evolutionary and just isn't that big a
deal. It is the user experience and application lifecycle story that will require
the most thought and effort as we build software over the next several years.
</p>
        <p>
Personally I'm thrilled! These are good challenges, and I very much look forward to
building .NET applications that deeply integrate with Windows 8. Applications that
I can point to and proudly say "I built that".
</p>
        <p>
          <strong>Update: </strong>here are a couple related blog posts from fellow Microsoft
RDs:
</p>
        <ul>
          <li>
            <a href="http://vinodunny.com/blog/post/Windows-8-Dev-Stacke28093My-take-on-it.aspx">http://vinodunny.com/blog/post/Windows-8-Dev-Stacke28093My-take-on-it.aspx</a>
          </li>
          <li>
            <a href="http://briannoyes.net/2011/09/15/SilverlightDevelopersHaveTheSmoothestRoadToMetro.aspx">http://briannoyes.net/2011/09/15/SilverlightDevelopersHaveTheSmoothestRoadToMetro.aspx</a>
          </li>
        </ul>
        <p>
and a good post from Doug Seven:
</p>
        <ul>
          <li>
            <a href="http://dougseven.com/2011/09/15/a-bad-picture-is-worth-a-thousand-long-discussions/">http://dougseven.com/2011/09/15/a-bad-picture-is-worth-a-thousand-long-discussions/</a>
          </li>
        </ul>
        <p>
and from fellow Magenic experts:
</p>
        <ul>
          <li>
            <a href="http://dotnetspeak.com/index.php/2011/09/what-i-learned-at-the-build-conference/">http://dotnetspeak.com/index.php/2011/09/what-i-learned-at-the-build-conference/</a>
          </li>
        </ul>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=32805477-89ee-4a76-af9f-674ce8d248ed" />
      </body>
      <title>WinRT and .NET</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,32805477-89ee-4a76-af9f-674ce8d248ed.aspx</guid>
      <link>http://www.lhotka.net/weblog/WinRTAndNET.aspx</link>
      <pubDate>Sat, 17 Sep 2011 02:27:24 GMT</pubDate>
      <description>&lt;p&gt;
Microsoft revealed quite a lot of detail about "Windows 8" and its programming model
at the //build/ conference in September 2011. The result is a lot of excitement, and
a lot of fear and worry, on the part of Microsoft developers and customers.
&lt;/p&gt;
&lt;p&gt;
From what I've seen so far, in reading tweets and other online discussions, is that
people's fear and worry are misplaced. Not necessarily unwarranted, but misplaced.
&lt;/p&gt;
&lt;p&gt;
There's a lot of worry that ".NET has no future" or "Silverlight has no future". These
worries are, in my view, misplaced.
&lt;/p&gt;
&lt;p&gt;
First, it is important to understand that the new WinRT (Windows Runtime) model that
supports Win8 Metro style apps is accessible from .NET. Yes, you can also use C++,
but I can't imagine a whole lot of people care. And you can use JavaScript, which
is pretty cool.
&lt;/p&gt;
&lt;p&gt;
But the important thing to understand is that WinRT is fully accessible from .NET.
The model is quite similar to Silverlight for Windows Phone. You write a program using
C# or VB, and that program runs within the CLR, and has access to a set of base class
libraries (BCL) just like a .NET, Silverlight, or WP7 app today. Your program also
has access to a large new namespace where you have access to all the WinRT types. 
&lt;/p&gt;
&lt;p&gt;
These WinRT types are the same ones used by C++ or JavaScript developers in WinRT.
I think this is very cool, because it means that (for perhaps the first time ever)
we'll be able to create truly first-class Windows applications in C#, without having
to resort to C++ or p/invoke calls.
&lt;/p&gt;
&lt;p&gt;
The BCL available to your Metro/WinRT app is restricted to things that are "safe"
for a Metro app to use, and the BCL features don't duplicate what's provided by the
WinRT objects. This means that some of your existing .NET code won't just compile
in WinRT, because you might be using some .NET BCL features that are now found in
WinRT, or that aren't deemed "safe" for a Metro app.
&lt;/p&gt;
&lt;p&gt;
That is exactly like Silverlight and WP7 apps. The BCL features available in Silverlight
or WP7 are also restricted to disallow things that aren't safe, or that make no sense
in those environments.
&lt;/p&gt;
&lt;p&gt;
In fact, from what I've seen so far, it looks like the WinRT BCL features are more
comparable to Silverlight than anything else. So I strongly suspect that Silverlight
apps will migrate to WinRT far more easily than any other type of app.
&lt;/p&gt;
&lt;p&gt;
None of this gives me any real worry or concern. Yes, if you are a Windows Forms developer,
and very possibly if you are a WPF developer, you'll have some real effort to migrate
to WinRT, but it isn't like you have to learn everything new from scratch like we
did moving from VB/COM to .NET. And if you are a Silverlight developer you'll probably
have a pretty easy time, but there'll still be some real effort to migrate to WinRT.
&lt;/p&gt;
&lt;p&gt;
If nothing else, we all need to go learn the WinRT API, which Microsoft said was around
1800 types.
&lt;/p&gt;
&lt;p&gt;
So what should you worry about? In my view, the big thing about Win8 and Metro style
apps is that these apps have a different lifetime and a different user experience
model. The last time we underwent such a dramatic change in the way Windows apps worked
was when we moved from Windows 3.1 (or Windows for Workgroups) to Windows 95.
&lt;/p&gt;
&lt;p&gt;
To bring this home, let me share a story. When .NET was first coming out I was quite
excited, and I was putting a lot of time into learning .NET. As a developer my world
was turned upside down and I had to learn a whole new platform and tools and langauge
- awesome!! :)
&lt;/p&gt;
&lt;p&gt;
I was having a conversation with my mother, and she could tell I was having fun. She
asked "so when will I see some of this new .NET on my computer?"
&lt;/p&gt;
&lt;p&gt;
How do you answer that? Windows Forms, as different as it was from VB6, created apps
that looked exactly the same. My mother saw exactly zero difference as a result of
our massive move from VB/COM to .NET.
&lt;/p&gt;
&lt;p&gt;
Kind of sad when you think about it. We learned a whole new programming platform so
we could build apps that users couldn't distinguish from what we'd been doing before.
&lt;/p&gt;
&lt;p&gt;
Windows 8 and Metro are the inverse. We don't really need to learn any new major platform
or tools or languages. From a developer perspective this is exciting, but evolutionary.
But from a user perspective everything is changing. When I next talk to my mother
about how excited I am, I can tell her (actually I can show her thanks to the Samsung
tablet - thank you Microsoft!) that she'll see new applications that are easier to
learn, understand, and use.
&lt;/p&gt;
&lt;p&gt;
This is wonderful!!
&lt;/p&gt;
&lt;p&gt;
But from our perspective as developers, we are going to have to rethink and relearn
how apps are designed at the user experience and user workflow level. And we are going
to have to learn how to live within the new application lifecycle model where apps
can suspend and then either resume or be silently terminated.
&lt;/p&gt;
&lt;p&gt;
Instead of spending a lot of time angsting over whether the WinRT CLR or BCL is exactly
like .NET/Silverlight/WP7, we should be angsting over the major impact of the application
lifecycle and Metro style UX and Metro style navigation within each application.
&lt;/p&gt;
&lt;p&gt;
OK, I don't honestly think we should have angst over that either. I think this is
exciting, and challenging. If I wanted to live in a stable (stagnant?) world where
I didn't need to think through such things, well, I think I'd be an accountant or
something…
&lt;/p&gt;
&lt;p&gt;
Yes, this will take some effort and some deep thinking. And it will absolutely impact
how we build software over the next many years.
&lt;/p&gt;
&lt;p&gt;
And this brings me to the question of timing. When should we care about Metro and
WinRT? Here's a potential timeline, that I suspect is quite realistic based on watching
Windows releases since 1990.
&lt;/p&gt;
&lt;p&gt;
Win8 will probably RTM in time for hardware vendors to create, package, and deliver
all sorts of machines for the 2012 holiday season. So probably somewhere between July
and October 2012.
&lt;/p&gt;
&lt;p&gt;
For consumer apps this means you might care about Win8 now, because you might want
to make sure your cool app is in the Win8 online store for the 2012 holiday season.
&lt;/p&gt;
&lt;p&gt;
For business apps the timing is quite different. Corporations roll out a new OS much
later than consumers get it through retailers. As an example, Windows 7 has now been
out for about three years, but most corporations still use Windows XP!!! I have no
hard numbers, but I suspect Win7 is deployed in maybe 25% of corporations - after
being available for three years.
&lt;/p&gt;
&lt;p&gt;
That is pretty typical.
&lt;/p&gt;
&lt;p&gt;
So for business apps, we can look at doing a reasonable amount of Win8 Metro development
around 2015. 
&lt;/p&gt;
&lt;p&gt;
Yes, some of us will be lucky enough to work for "type A" companies that jump on new
things as they come out, and we'll get to build Metro apps starting in late 2012.
&lt;/p&gt;
&lt;p&gt;
Most of us work for "type B" companies, and they'll roll out a new OS after SP1 has
been deployed by the "type A" companies - these are the companies that will deploy
Win8 after has been out for 2-4 years.
&lt;/p&gt;
&lt;p&gt;
Some unfortunate souls work for "type C" companies, and they'll roll out Win8 when
Win7 loses support (so around 2018?). I used to work for a "type C" company, and that's
a hard place to find yourself as a developer. Yet those companies do exist even today.
&lt;/p&gt;
&lt;p&gt;
What does this all mean? It means that for a typical corporate or business developer,
we have around 4 years from today before we're building WinRT apps.
&lt;/p&gt;
&lt;p&gt;
The logical question to ask then (and you really should ask this question), is what
do we do for the next 4 years??? How do we build software between now and when we
get to use Metro/WinRT?
&lt;/p&gt;
&lt;p&gt;
Obviously the concern is that if you build an app starting today, how do you protect
that investment so you don't have to completely rewrite the app in 4 years?
&lt;/p&gt;
&lt;p&gt;
I don't yet know the solid answer. We just don't have enough deep information yet.
That'll change though, because we now have access to early Win8 builds and early tooling.
&lt;/p&gt;
&lt;p&gt;
What I suspect is that the best way to mitigate risk will be to build apps today using
Silverlight and the Silverlight navigation model (because that's also the model used
in WinRT). 
&lt;/p&gt;
&lt;p&gt;
The BCL features available to a Silverlight app are closer to WinRT than full .NET
is today, so the odds of using BCL features that won't be available to a Metro app
is reduced.
&lt;/p&gt;
&lt;p&gt;
Also, thinking through the user experience and user workflow from a Silverlight navigation
perspective will get your overall application experience closer to what you'd do in
a Metro style app - at least when compared to any workflow you'd have in Windows Forms.
Certainly you can use WPF and also create a Silverlight-style navigation model, and
that'd also be good.
&lt;/p&gt;
&lt;p&gt;
Clearly any app that uses multiple windows or modal dialogs (or really any dialogs)
will not migrate to Metro without some major rework.
&lt;/p&gt;
&lt;p&gt;
The one remaining concern is the new run/suspend/resume/terminate application model.
Even Silverlight doesn't use that model today - except on WP7. I think some thought
needs to go into application design today to enable support for suspend in the future.
I don't have a great answer right at the moment, but I know that I'll be thinking
about it, because this is important to easing migrations in the future.
&lt;/p&gt;
&lt;p&gt;
It is true that whatever XAML you use today won't move to WinRT unchanged. Well, I
can't say that with certainty, but the reality is that WinRT exposes several powerful
UI controls we don't have today. And any Metro style app will need to use those WinRT
controls to fit seamlessly into the Win8 world.
&lt;/p&gt;
&lt;p&gt;
My guess is that some of the third-party component vendors are well on their way to
replicating the WinRT controls for Silverlight and WPF today. I surely hope so anyway.
And that's probably going to be the best way to minimize the XAML migration. If we
have access to controls today that are very similar to the WinRT controls of the future,
then we can more easily streamline the eventual migration.
&lt;/p&gt;
&lt;p&gt;
In summary, Windows 8, WinRT, and Metro are a big deal. But not in the way most people
seem to think. The .NET/C#/CLR/BCL story is evolutionary and just isn't that big a
deal. It is the user experience and application lifecycle story that will require
the most thought and effort as we build software over the next several years.
&lt;/p&gt;
&lt;p&gt;
Personally I'm thrilled! These are good challenges, and I very much look forward to
building .NET applications that deeply integrate with Windows 8. Applications that
I can point to and proudly say "I built that".
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update: &lt;/strong&gt;here are a couple related blog posts from fellow Microsoft
RDs:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://vinodunny.com/blog/post/Windows-8-Dev-Stacke28093My-take-on-it.aspx"&gt;http://vinodunny.com/blog/post/Windows-8-Dev-Stacke28093My-take-on-it.aspx&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://briannoyes.net/2011/09/15/SilverlightDevelopersHaveTheSmoothestRoadToMetro.aspx"&gt;http://briannoyes.net/2011/09/15/SilverlightDevelopersHaveTheSmoothestRoadToMetro.aspx&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
and a good post from Doug Seven:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://dougseven.com/2011/09/15/a-bad-picture-is-worth-a-thousand-long-discussions/"&gt;http://dougseven.com/2011/09/15/a-bad-picture-is-worth-a-thousand-long-discussions/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
and from fellow Magenic experts:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://dotnetspeak.com/index.php/2011/09/what-i-learned-at-the-build-conference/"&gt;http://dotnetspeak.com/index.php/2011/09/what-i-learned-at-the-build-conference/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=32805477-89ee-4a76-af9f-674ce8d248ed" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,32805477-89ee-4a76-af9f-674ce8d248ed.aspx</comments>
      <category>Microsoft .NET</category>
      <category>Programming</category>
      <category>WinRT</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=fd8a5ae9-4570-4422-8c17-589d633b23b2</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,fd8a5ae9-4570-4422-8c17-589d633b23b2.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,fd8a5ae9-4570-4422-8c17-589d633b23b2.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=fd8a5ae9-4570-4422-8c17-589d633b23b2</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday I set out to do “something simple” – to use Windows Server AppFabric to
do basic health monitoring of a WCF service.
</p>
        <p>
A few hours later, I was pulling my hair out and my brain was spinning.
</p>
        <p>
The basic issue is that configuring and using AppFabric involves numerous moving parts,
and that leads to a ton of complexity for something that is otherwise pretty simple.
But there are a lot of moving parts:
</p>
        <ol>
          <li>
My app</li>
          <li>
IIS</li>
          <li>
ASP.NET</li>
          <li>
WCF</li>
          <li>
AppFabric configuration tool</li>
          <li>
AppFabric Dashboard</li>
          <li>
AppFabric event collection service</li>
          <li>
SQL Server</li>
          <li>
SQL Server Agent</li>
          <li>
Machine.config</li>
          <li>
Web.config</li>
          <li>
Visual Studio</li>
          <li>
NTFS security</li>
        </ol>
        <p>
To make matters worse, on my dev workstation I had SQL Express 2005, SQL Express 2008
R2, and SQL Server 2008.
</p>
        <p>
What you are <em>supposed</em> to do is simply this:
</p>
        <ol>
          <li>
install your web site into IIS (create an IIS Application where the virtual root points
to your web site directory)</li>
          <li>
in IIS Manager go to the virtual root, and click the Configure link on the far right
under the Manage WCF and WF Services label</li>
          <li>
in the resulting dialog, click Monitoring on the left, then enable application monitoring</li>
          <li>
call your service</li>
          <li>
back in IIS Manager, double-click the AppFabric Dashboard option for your virtual
root to see the dashboard, with the cute little counters showing that your services
have been used</li>
        </ol>
        <p>
Of course that didn’t work.
</p>
        <p>
In the end, I <em>think</em> it didn’t work because the AppFabric Event Collection
Service (a Windows service that runs to collect event information) didn’t have NTFS
security rights to read my application’s web.config file.
</p>
        <p>
But that’s not the first thing I thought to check. No, the first thing I thought to
check was whether data was getting into the AppFabric tables in SQL Server. It was
not. So then (after a little googling with Bing), it sounded like the problem was
that SQL Agent wasn’t running.
</p>
        <p>
Of course it turns out that SQL Agent can’t run against SQL Express. But having three
different versions of SQL Server installed was making this all very hard to troubleshoot.
So I spent some quality time uninstalling SQL 2005 and 2008, and then installing SQL
Server Developer 2008 R2 – so now I have a real up-to-date SQL Server instance where
SQL Agent does work.
</p>
        <p>
(again, I suspect that was all wasted time – but on the upside, I have a far less
confusing SQL Server installation <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/Windows-Server-AppFabric-and-WCF-monitor_8BCD/wlEmoticon-smile_2.png" /> )
</p>
        <p>
All that work, and it didn’t help. Then it occurred to me that my configurations were
probably out of sync. So I reconfigured AppFabric, and my app, and the web sites and
virtual roots in IIS Manager – all to use the new 2008 R2 database. And things were
out of sync, so this was necessary and good.
</p>
        <p>
But that didn’t help either. Still no data was in the AppFabric database.
</p>
        <p>
Finally, I found a <a href="http://msdn.microsoft.com/en-us/library/ee677384.aspx">page
lurking deep in MSDN</a> that contained good troubleshooting information. And in here
were instructions on how to view the event log for the AppFabric event collection
service – which couldn’t read my web.config file.
</p>
        <p>
I thought I’d hit the jackpot, so I updated the NTFS permissions on my web folder
so the collection service could read the directory.
</p>
        <p>
Still nothing. So I went to bed, frustrated at the continual failure.
</p>
        <p>
This morning I thought I’d try again. Still no joy. So I rebooted my machine, and
then it worked.
</p>
        <p>
So I suspect that the core issue was the NTFS file permissions for the collection
service. But with all the other changes I made, some service didn’t re-read its configuration
until the system was rebooted.
</p>
        <p>
In the end, it only took me about 6 hours of work to get Windows Server AppFabric
to monitor the health of my WCF service. Hopefully I’ll never have to go through that
again…
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=fd8a5ae9-4570-4422-8c17-589d633b23b2" />
      </body>
      <title>Windows Server AppFabric and WCF monitoring</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,fd8a5ae9-4570-4422-8c17-589d633b23b2.aspx</guid>
      <link>http://www.lhotka.net/weblog/WindowsServerAppFabricAndWCFMonitoring.aspx</link>
      <pubDate>Tue, 22 Mar 2011 15:13:40 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday I set out to do “something simple” – to use Windows Server AppFabric to
do basic health monitoring of a WCF service.
&lt;/p&gt;
&lt;p&gt;
A few hours later, I was pulling my hair out and my brain was spinning.
&lt;/p&gt;
&lt;p&gt;
The basic issue is that configuring and using AppFabric involves numerous moving parts,
and that leads to a ton of complexity for something that is otherwise pretty simple.
But there are a lot of moving parts:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
My app&lt;/li&gt;
&lt;li&gt;
IIS&lt;/li&gt;
&lt;li&gt;
ASP.NET&lt;/li&gt;
&lt;li&gt;
WCF&lt;/li&gt;
&lt;li&gt;
AppFabric configuration tool&lt;/li&gt;
&lt;li&gt;
AppFabric Dashboard&lt;/li&gt;
&lt;li&gt;
AppFabric event collection service&lt;/li&gt;
&lt;li&gt;
SQL Server&lt;/li&gt;
&lt;li&gt;
SQL Server Agent&lt;/li&gt;
&lt;li&gt;
Machine.config&lt;/li&gt;
&lt;li&gt;
Web.config&lt;/li&gt;
&lt;li&gt;
Visual Studio&lt;/li&gt;
&lt;li&gt;
NTFS security&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
To make matters worse, on my dev workstation I had SQL Express 2005, SQL Express 2008
R2, and SQL Server 2008.
&lt;/p&gt;
&lt;p&gt;
What you are &lt;em&gt;supposed&lt;/em&gt; to do is simply this:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
install your web site into IIS (create an IIS Application where the virtual root points
to your web site directory)&lt;/li&gt;
&lt;li&gt;
in IIS Manager go to the virtual root, and click the Configure link on the far right
under the Manage WCF and WF Services label&lt;/li&gt;
&lt;li&gt;
in the resulting dialog, click Monitoring on the left, then enable application monitoring&lt;/li&gt;
&lt;li&gt;
call your service&lt;/li&gt;
&lt;li&gt;
back in IIS Manager, double-click the AppFabric Dashboard option for your virtual
root to see the dashboard, with the cute little counters showing that your services
have been used&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Of course that didn’t work.
&lt;/p&gt;
&lt;p&gt;
In the end, I &lt;em&gt;think&lt;/em&gt; it didn’t work because the AppFabric Event Collection
Service (a Windows service that runs to collect event information) didn’t have NTFS
security rights to read my application’s web.config file.
&lt;/p&gt;
&lt;p&gt;
But that’s not the first thing I thought to check. No, the first thing I thought to
check was whether data was getting into the AppFabric tables in SQL Server. It was
not. So then (after a little googling with Bing), it sounded like the problem was
that SQL Agent wasn’t running.
&lt;/p&gt;
&lt;p&gt;
Of course it turns out that SQL Agent can’t run against SQL Express. But having three
different versions of SQL Server installed was making this all very hard to troubleshoot.
So I spent some quality time uninstalling SQL 2005 and 2008, and then installing SQL
Server Developer 2008 R2 – so now I have a real up-to-date SQL Server instance where
SQL Agent does work.
&lt;/p&gt;
&lt;p&gt;
(again, I suspect that was all wasted time – but on the upside, I have a far less
confusing SQL Server installation &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/Windows-Server-AppFabric-and-WCF-monitor_8BCD/wlEmoticon-smile_2.png" /&gt; )
&lt;/p&gt;
&lt;p&gt;
All that work, and it didn’t help. Then it occurred to me that my configurations were
probably out of sync. So I reconfigured AppFabric, and my app, and the web sites and
virtual roots in IIS Manager – all to use the new 2008 R2 database. And things were
out of sync, so this was necessary and good.
&lt;/p&gt;
&lt;p&gt;
But that didn’t help either. Still no data was in the AppFabric database.
&lt;/p&gt;
&lt;p&gt;
Finally, I found a &lt;a href="http://msdn.microsoft.com/en-us/library/ee677384.aspx"&gt;page
lurking deep in MSDN&lt;/a&gt; that contained good troubleshooting information. And in here
were instructions on how to view the event log for the AppFabric event collection
service – which couldn’t read my web.config file.
&lt;/p&gt;
&lt;p&gt;
I thought I’d hit the jackpot, so I updated the NTFS permissions on my web folder
so the collection service could read the directory.
&lt;/p&gt;
&lt;p&gt;
Still nothing. So I went to bed, frustrated at the continual failure.
&lt;/p&gt;
&lt;p&gt;
This morning I thought I’d try again. Still no joy. So I rebooted my machine, and
then it worked.
&lt;/p&gt;
&lt;p&gt;
So I suspect that the core issue was the NTFS file permissions for the collection
service. But with all the other changes I made, some service didn’t re-read its configuration
until the system was rebooted.
&lt;/p&gt;
&lt;p&gt;
In the end, it only took me about 6 hours of work to get Windows Server AppFabric
to monitor the health of my WCF service. Hopefully I’ll never have to go through that
again…
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=fd8a5ae9-4570-4422-8c17-589d633b23b2" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,fd8a5ae9-4570-4422-8c17-589d633b23b2.aspx</comments>
      <category>Microsoft .NET</category>
      <category>WCF</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=df95e884-8fe5-4740-8ac8-9b61cf1dfb5d</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,df95e884-8fe5-4740-8ac8-9b61cf1dfb5d.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,df95e884-8fe5-4740-8ac8-9b61cf1dfb5d.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=df95e884-8fe5-4740-8ac8-9b61cf1dfb5d</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One week from today, on December 6, at the Microsoft office in Bloomington, MN you
can attend a free two-track .NET developer training event: <a href="http://www.codemastery.com/">Code
Mastery</a>.
</p>
        <p>
This event includes content from the Microsoft PDC 2010 event, plus custom content
covering topics such as:
</p>
        <ul>
          <li>
Windows Phone 7 (WP7) development</li>
          <li>
How to really use the MVVM design pattern in WPF</li>
          <li>
SQL Azure</li>
          <li>
Combining Scrum and TFS 2010</li>
          <li>
Best practices for development in .NET</li>
          <li>
and more!!</li>
        </ul>
        <p>
If that isn’t enough, there’s a raffle at the end of the day, with great prizes (including
an MSDN Universal subscription), and our special guest Carl Franklin from .NET Rocks!
will be in attendance to spice up the event.
</p>
        <p>
          <a href="http://www.magenic.com/Default.aspx?tabid=134&amp;id=39C5D10D-E9D6-DF11-881F-00304861CFBC">Register
now</a> to reserve your seat!
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=df95e884-8fe5-4740-8ac8-9b61cf1dfb5d" />
      </body>
      <title>Minneapolis PDC, Code Mastery and more!</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,df95e884-8fe5-4740-8ac8-9b61cf1dfb5d.aspx</guid>
      <link>http://www.lhotka.net/weblog/MinneapolisPDCCodeMasteryAndMore.aspx</link>
      <pubDate>Tue, 30 Nov 2010 04:21:14 GMT</pubDate>
      <description>&lt;p&gt;
One week from today, on December 6, at the Microsoft office in Bloomington, MN you
can attend a free two-track .NET developer training event: &lt;a href="http://www.codemastery.com/"&gt;Code
Mastery&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
This event includes content from the Microsoft PDC 2010 event, plus custom content
covering topics such as:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Windows Phone 7 (WP7) development&lt;/li&gt;
&lt;li&gt;
How to really use the MVVM design pattern in WPF&lt;/li&gt;
&lt;li&gt;
SQL Azure&lt;/li&gt;
&lt;li&gt;
Combining Scrum and TFS 2010&lt;/li&gt;
&lt;li&gt;
Best practices for development in .NET&lt;/li&gt;
&lt;li&gt;
and more!!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
If that isn’t enough, there’s a raffle at the end of the day, with great prizes (including
an MSDN Universal subscription), and our special guest Carl Franklin from .NET Rocks!
will be in attendance to spice up the event.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.magenic.com/Default.aspx?tabid=134&amp;amp;id=39C5D10D-E9D6-DF11-881F-00304861CFBC"&gt;Register
now&lt;/a&gt; to reserve your seat!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=df95e884-8fe5-4740-8ac8-9b61cf1dfb5d" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,df95e884-8fe5-4740-8ac8-9b61cf1dfb5d.aspx</comments>
      <category>Magenic</category>
      <category>Microsoft .NET</category>
      <category>Programming</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=61527092-40ff-44e5-abca-8c52519dc86f</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,61527092-40ff-44e5-abca-8c52519dc86f.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,61527092-40ff-44e5-abca-8c52519dc86f.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=61527092-40ff-44e5-abca-8c52519dc86f</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The Microsoft Patterns and Practices group has a new guidance book out:
</p>
        <p>
          <a href="http://msdn.microsoft.com/en-us/library/ff963553.aspx">MSDN Library: Parallel
Programming with Microsoft .NET</a>
        </p>
        <p>
A printed version will be coming from O’Reilly
</p>
        <p>
          <a href="http://oreilly.com/catalog/9780735651593/">Parallel Programming with Microsoft®
.NET</a>
        </p>
        <p>
And there are code samples on CodePlex
</p>
        <p>
          <a href="http://parallelpatterns.codeplex.com/">Parallel Patterns CodePlex</a>
        </p>
        <p>
Good stuff from the P&amp;P group!
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=61527092-40ff-44e5-abca-8c52519dc86f" />
      </body>
      <title>Parallel Programming with Microsoft .NET</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,61527092-40ff-44e5-abca-8c52519dc86f.aspx</guid>
      <link>http://www.lhotka.net/weblog/ParallelProgrammingWithMicrosoftNET.aspx</link>
      <pubDate>Wed, 01 Sep 2010 22:22:41 GMT</pubDate>
      <description>&lt;p&gt;
The Microsoft Patterns and Practices group has a new guidance book out:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/ff963553.aspx"&gt;MSDN Library: Parallel
Programming with Microsoft .NET&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
A printed version will be coming from O’Reilly
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://oreilly.com/catalog/9780735651593/"&gt;Parallel Programming with Microsoft®
.NET&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
And there are code samples on CodePlex
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://parallelpatterns.codeplex.com/"&gt;Parallel Patterns CodePlex&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Good stuff from the P&amp;amp;P group!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=61527092-40ff-44e5-abca-8c52519dc86f" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,61527092-40ff-44e5-abca-8c52519dc86f.aspx</comments>
      <category>Microsoft .NET</category>
      <category>Programming</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=2738e3d0-f180-4ccf-9019-c3b7ea0c98c5</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,2738e3d0-f180-4ccf-9019-c3b7ea0c98c5.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,2738e3d0-f180-4ccf-9019-c3b7ea0c98c5.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=2738e3d0-f180-4ccf-9019-c3b7ea0c98c5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have put the demos from my Visual Studio 2010 launch talks online:
</p>
        <p>
          <a href="http://www.lhotka.net/files/devconn/VS2010Launch.zip">http://www.lhotka.net/files/devconn/VS2010Launch.zip</a>
        </p>
        <p>
BasicVM and LiveDemo are literally the code I created on stage, so they are nothing
to look at and probably have little value if you weren’t at the talks. The other demos
are more complete and may be useful – especially UsingBxf, which shows some interesting
UI proto-framework concepts in a pretty straightforward manner.
</p>
        <h3>BasicVM
</h3>
        <p>
Demo created on stage to illustrate the most basic MVVM concepts.
</p>
        <h3>Collective
</h3>
        <p>
Demo/prototype of a knowledge base/forum application that makes use of a pre-release
version of CSLA 4, MVVM and other Silverlight concepts. It is a 3-tier physical deployment
(Silverlight client, web/app server, SQL Server database) architecture using many
CSLA .NET concepts.
</p>
        <p>
This code uses the Bxf (“Basic XAML Framework”) to implement its shell and viewmodel
code in a way that can be unit tested.
</p>
        <p>
This project has a dependency on a pre-release version of <a href="http://www.lhotka.net/cslanet/download.aspx">CSLA
4</a>.
</p>
        <h3>LiveDemo
</h3>
        <p>
Demo created on stage to illustrate the basic use of the Visual Studio 2010 XAML designer.
</p>
        <h3>UsingBxf
</h3>
        <p>
Demo showing simple use of the “Basic XAML Framework” (Bxf) in WPF. The same Bxf code
works in Silverlight as well. The Bxf code and this demo show how to implement a basic
UI shell that shows content and a status bar. For more advanced uses of Bxf see the
Collective demo.
</p>
        <p>
This project has a dependency on a pre-release version of <a href="http://www.lhotka.net/cslanet/download.aspx">CSLA
4</a>.
</p>
        <h3>VSL01
</h3>
        <p>
Demo showing some concepts and implementation around MVVM.
</p>
        <h3>VSL02
</h3>
        <p>
Demo showing some concepts and implementation around MVVM.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=2738e3d0-f180-4ccf-9019-c3b7ea0c98c5" />
      </body>
      <title>Visual Studio 2010 launch demos</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,2738e3d0-f180-4ccf-9019-c3b7ea0c98c5.aspx</guid>
      <link>http://www.lhotka.net/weblog/VisualStudio2010LaunchDemos.aspx</link>
      <pubDate>Mon, 19 Apr 2010 14:59:44 GMT</pubDate>
      <description>&lt;p&gt;
I have put the demos from my Visual Studio 2010 launch talks online:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.lhotka.net/files/devconn/VS2010Launch.zip"&gt;http://www.lhotka.net/files/devconn/VS2010Launch.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
BasicVM and LiveDemo are literally the code I created on stage, so they are nothing
to look at and probably have little value if you weren’t at the talks. The other demos
are more complete and may be useful – especially UsingBxf, which shows some interesting
UI proto-framework concepts in a pretty straightforward manner.
&lt;/p&gt;
&lt;h3&gt;BasicVM
&lt;/h3&gt;
&lt;p&gt;
Demo created on stage to illustrate the most basic MVVM concepts.
&lt;/p&gt;
&lt;h3&gt;Collective
&lt;/h3&gt;
&lt;p&gt;
Demo/prototype of a knowledge base/forum application that makes use of a pre-release
version of CSLA 4, MVVM and other Silverlight concepts. It is a 3-tier physical deployment
(Silverlight client, web/app server, SQL Server database) architecture using many
CSLA .NET concepts.
&lt;/p&gt;
&lt;p&gt;
This code uses the Bxf (“Basic XAML Framework”) to implement its shell and viewmodel
code in a way that can be unit tested.
&lt;/p&gt;
&lt;p&gt;
This project has a dependency on a pre-release version of &lt;a href="http://www.lhotka.net/cslanet/download.aspx"&gt;CSLA
4&lt;/a&gt;.
&lt;/p&gt;
&lt;h3&gt;LiveDemo
&lt;/h3&gt;
&lt;p&gt;
Demo created on stage to illustrate the basic use of the Visual Studio 2010 XAML designer.
&lt;/p&gt;
&lt;h3&gt;UsingBxf
&lt;/h3&gt;
&lt;p&gt;
Demo showing simple use of the “Basic XAML Framework” (Bxf) in WPF. The same Bxf code
works in Silverlight as well. The Bxf code and this demo show how to implement a basic
UI shell that shows content and a status bar. For more advanced uses of Bxf see the
Collective demo.
&lt;/p&gt;
&lt;p&gt;
This project has a dependency on a pre-release version of &lt;a href="http://www.lhotka.net/cslanet/download.aspx"&gt;CSLA
4&lt;/a&gt;.
&lt;/p&gt;
&lt;h3&gt;VSL01
&lt;/h3&gt;
&lt;p&gt;
Demo showing some concepts and implementation around MVVM.
&lt;/p&gt;
&lt;h3&gt;VSL02
&lt;/h3&gt;
&lt;p&gt;
Demo showing some concepts and implementation around MVVM.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=2738e3d0-f180-4ccf-9019-c3b7ea0c98c5" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,2738e3d0-f180-4ccf-9019-c3b7ea0c98c5.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
      <category>Silverlight</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=b68b1fb2-ee8c-478b-a565-8ceba56faedb</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,b68b1fb2-ee8c-478b-a565-8ceba56faedb.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,b68b1fb2-ee8c-478b-a565-8ceba56faedb.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=b68b1fb2-ee8c-478b-a565-8ceba56faedb</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Here’s a link to an article I wrote on using code-gen vs building a more dynamic runtime:
</p>
        <p>
          <a title="http://msdn.microsoft.com/en-us/library/ff621668.aspx" href="http://msdn.microsoft.com/en-us/library/ff621668.aspx">http://msdn.microsoft.com/en-us/library/ff621668.aspx</a>
        </p>
        <p>
          <strong>Update: </strong>There doesn't appear to be a code download on the Microsoft
site. <a href="http://www.lhotka.net/files/CodeGen-100510.zip">Click here</a> to download
the code.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=b68b1fb2-ee8c-478b-a565-8ceba56faedb" />
      </body>
      <title>Design Time Code Generation and Runtime Model-Driven Generation</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,b68b1fb2-ee8c-478b-a565-8ceba56faedb.aspx</guid>
      <link>http://www.lhotka.net/weblog/DesignTimeCodeGenerationAndRuntimeModelDrivenGeneration.aspx</link>
      <pubDate>Mon, 19 Apr 2010 05:30:24 GMT</pubDate>
      <description>&lt;p&gt;
Here’s a link to an article I wrote on using code-gen vs building a more dynamic runtime:
&lt;/p&gt;
&lt;p&gt;
&lt;a title=http://msdn.microsoft.com/en-us/library/ff621668.aspx href="http://msdn.microsoft.com/en-us/library/ff621668.aspx"&gt;http://msdn.microsoft.com/en-us/library/ff621668.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update: &lt;/strong&gt;There doesn't appear to be a code download on the Microsoft
site. &lt;a href="http://www.lhotka.net/files/CodeGen-100510.zip"&gt;Click here&lt;/a&gt; to download
the code.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=b68b1fb2-ee8c-478b-a565-8ceba56faedb" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,b68b1fb2-ee8c-478b-a565-8ceba56faedb.aspx</comments>
      <category>Microsoft .NET</category>
      <category>Programming</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=5947f2a0-f97f-4f7c-8dba-f5baacccbb8c</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,5947f2a0-f97f-4f7c-8dba-f5baacccbb8c.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,5947f2a0-f97f-4f7c-8dba-f5baacccbb8c.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=5947f2a0-f97f-4f7c-8dba-f5baacccbb8c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
From Scott Wiltamuth, Product Unit Manager for Visual Studio Languages:
</p>
        <p>
          <a title="VB and C# Coevolution" href="http://blogs.msdn.com/scottwil/archive/2010/03/09/vb-and-c-coevolution.aspx">VB
and C# Coevolution</a>
        </p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=5947f2a0-f97f-4f7c-8dba-f5baacccbb8c" />
      </body>
      <title>Good post on C#/VB co-evolution</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,5947f2a0-f97f-4f7c-8dba-f5baacccbb8c.aspx</guid>
      <link>http://www.lhotka.net/weblog/GoodPostOnCVBCoevolution.aspx</link>
      <pubDate>Tue, 09 Mar 2010 16:47:11 GMT</pubDate>
      <description>&lt;p&gt;
From Scott Wiltamuth, Product Unit Manager for Visual Studio Languages:
&lt;/p&gt;
&lt;p&gt;
&lt;a title="VB and C# Coevolution" href="http://blogs.msdn.com/scottwil/archive/2010/03/09/vb-and-c-coevolution.aspx"&gt;VB
and C# Coevolution&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=5947f2a0-f97f-4f7c-8dba-f5baacccbb8c" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,5947f2a0-f97f-4f7c-8dba-f5baacccbb8c.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=c35fbc92-d52c-4676-ab3a-3289f6c95348</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,c35fbc92-d52c-4676-ab3a-3289f6c95348.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,c35fbc92-d52c-4676-ab3a-3289f6c95348.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=c35fbc92-d52c-4676-ab3a-3289f6c95348</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last week I spent a few hours switching the CSLA .NET for Windows unit/integration
tests from nunit to mstest.
</p>
        <p>
This wasn’t terribly hard, because the tests were originally created with the idea
of supporting both test frameworks. Of course as different people added tests over
several years time inconsistencies crept in, and that’s what I had to address to make
this switch.
</p>
        <p>
I didn’t remove the compiler directives for nunit, so it should take relatively little
effort to switch back to nunit, but I don’t personally plan to do that.
</p>
        <p>
mstest is now available in all professional versions of Visual Studio 2010, and Microsoft
is obviously faster about getting their test framework updated as .NET and Visual
Studio change. Looking at <a href="http://www.nunit.org">www.nunit.org</a> there’s
no mention of VS10 or .NET 4.0. Yes, I know people have tweaked nunit to work on .NET
4.0, but mstest allows me to eliminate one level of uncertainty from my process.
</p>
        <p>
Besides, there are all these really cool tools and capabilities in VS10, some of which
tie into testing and coverage, and this gives me motivation to play with them :)
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=c35fbc92-d52c-4676-ab3a-3289f6c95348" />
      </body>
      <title>nunit to mstest for CSLA .NET 4</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,c35fbc92-d52c-4676-ab3a-3289f6c95348.aspx</guid>
      <link>http://www.lhotka.net/weblog/nunitToMstestForCSLANET4.aspx</link>
      <pubDate>Mon, 07 Dec 2009 03:02:07 GMT</pubDate>
      <description>&lt;p&gt;
Last week I spent a few hours switching the CSLA .NET for Windows unit/integration
tests from nunit to mstest.
&lt;/p&gt;
&lt;p&gt;
This wasn’t terribly hard, because the tests were originally created with the idea
of supporting both test frameworks. Of course as different people added tests over
several years time inconsistencies crept in, and that’s what I had to address to make
this switch.
&lt;/p&gt;
&lt;p&gt;
I didn’t remove the compiler directives for nunit, so it should take relatively little
effort to switch back to nunit, but I don’t personally plan to do that.
&lt;/p&gt;
&lt;p&gt;
mstest is now available in all professional versions of Visual Studio 2010, and Microsoft
is obviously faster about getting their test framework updated as .NET and Visual
Studio change. Looking at &lt;a href="http://www.nunit.org"&gt;www.nunit.org&lt;/a&gt; there’s
no mention of VS10 or .NET 4.0. Yes, I know people have tweaked nunit to work on .NET
4.0, but mstest allows me to eliminate one level of uncertainty from my process.
&lt;/p&gt;
&lt;p&gt;
Besides, there are all these really cool tools and capabilities in VS10, some of which
tie into testing and coverage, and this gives me motivation to play with them :)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=c35fbc92-d52c-4676-ab3a-3289f6c95348" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,c35fbc92-d52c-4676-ab3a-3289f6c95348.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=92bb1647-47ff-4e7f-8b84-37c1e8b661c0</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,92bb1647-47ff-4e7f-8b84-37c1e8b661c0.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,92bb1647-47ff-4e7f-8b84-37c1e8b661c0.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=92bb1647-47ff-4e7f-8b84-37c1e8b661c0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you go to <a title="http://www.microsoft.com/net/dotnetstories/" href="http://www.microsoft.com/net/dotnetstories/">http://www.microsoft.com/net/dotnetstories/</a> you’ll
see many compelling stories of people using Microsoft .NET to do cool things.
</p>
        <p>
This includes Andy Schwartz, a colleague of mine at Magenic. Andy is not only a great
technologist, but he has a couple real black belts in martial arts.
</p>
        <p>
I love working with such great people! :)
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=92bb1647-47ff-4e7f-8b84-37c1e8b661c0" />
      </body>
      <title>Magenic&amp;rsquo;s own Code Master</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,92bb1647-47ff-4e7f-8b84-37c1e8b661c0.aspx</guid>
      <link>http://www.lhotka.net/weblog/MagenicrsquosOwnCodeMaster.aspx</link>
      <pubDate>Tue, 10 Nov 2009 20:13:20 GMT</pubDate>
      <description>&lt;p&gt;
If you go to &lt;a title="http://www.microsoft.com/net/dotnetstories/" href="http://www.microsoft.com/net/dotnetstories/"&gt;http://www.microsoft.com/net/dotnetstories/&lt;/a&gt; you’ll
see many compelling stories of people using Microsoft .NET to do cool things.
&lt;/p&gt;
&lt;p&gt;
This includes Andy Schwartz, a colleague of mine at Magenic. Andy is not only a great
technologist, but he has a couple real black belts in martial arts.
&lt;/p&gt;
&lt;p&gt;
I love working with such great people! :)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=92bb1647-47ff-4e7f-8b84-37c1e8b661c0" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,92bb1647-47ff-4e7f-8b84-37c1e8b661c0.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=53472720-e2f0-40f2-847b-0ef4736ee6d6</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,53472720-e2f0-40f2-847b-0ef4736ee6d6.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,53472720-e2f0-40f2-847b-0ef4736ee6d6.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=53472720-e2f0-40f2-847b-0ef4736ee6d6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In Visual Studio 2010 and .NET 4.0 Microsoft is amping up the visibility of the “client
profile” concept. In fact, when you install the 4.0 client profile on a machine, it
doesn’t drag the rest of the framework to that client later – they just get the client
profile. And when you create a WPF or Windows Forms project in VS10 you default to
targeting the client profile.
</p>
        <p>
That’s all good – great in fact!!
</p>
        <p>
But I’ve fallen in love with the validation attribute concepts in System.ComponentModel.DataAnnotations.dll.
These attributes are designed specifically to enable a UI framework author (or a business
layer framework author – like me with CSLA .NET) to automatically create a rich user
experience based on the attributes decorating business objects.
</p>
        <p>
This concept was first fully realized in Silverlight 3 – a client technology – and
is now fully supported in .NET 4.0 <em>full profile</em>. But it is a <em>client side
technology</em>, and so should be in the client profile.
</p>
        <p>
I’ve logged this issue on connect, and recommend you vote for this to be resolved:
</p>
        <p>
          <a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=502807">https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=502807</a>
        </p>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=53472720-e2f0-40f2-847b-0ef4736ee6d6" />
      </body>
      <title>DataAnnotations not in the client profile</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,53472720-e2f0-40f2-847b-0ef4736ee6d6.aspx</guid>
      <link>http://www.lhotka.net/weblog/DataAnnotationsNotInTheClientProfile.aspx</link>
      <pubDate>Fri, 06 Nov 2009 21:41:13 GMT</pubDate>
      <description>&lt;p&gt;
In Visual Studio 2010 and .NET 4.0 Microsoft is amping up the visibility of the “client
profile” concept. In fact, when you install the 4.0 client profile on a machine, it
doesn’t drag the rest of the framework to that client later – they just get the client
profile. And when you create a WPF or Windows Forms project in VS10 you default to
targeting the client profile.
&lt;/p&gt;
&lt;p&gt;
That’s all good – great in fact!!
&lt;/p&gt;
&lt;p&gt;
But I’ve fallen in love with the validation attribute concepts in System.ComponentModel.DataAnnotations.dll.
These attributes are designed specifically to enable a UI framework author (or a business
layer framework author – like me with CSLA .NET) to automatically create a rich user
experience based on the attributes decorating business objects.
&lt;/p&gt;
&lt;p&gt;
This concept was first fully realized in Silverlight 3 – a client technology – and
is now fully supported in .NET 4.0 &lt;em&gt;full profile&lt;/em&gt;. But it is a &lt;em&gt;client side
technology&lt;/em&gt;, and so should be in the client profile.
&lt;/p&gt;
&lt;p&gt;
I’ve logged this issue on connect, and recommend you vote for this to be resolved:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=502807"&gt;https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=502807&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=53472720-e2f0-40f2-847b-0ef4736ee6d6" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,53472720-e2f0-40f2-847b-0ef4736ee6d6.aspx</comments>
      <category>Microsoft .NET</category>
      <category>Windows Forms</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=89d338dc-9021-45b3-9c53-839762ea0b5d</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,89d338dc-9021-45b3-9c53-839762ea0b5d.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,89d338dc-9021-45b3-9c53-839762ea0b5d.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=89d338dc-9021-45b3-9c53-839762ea0b5d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Of course I’m referring to Windows Forms, which is about 8 years old. Even in dog
years that’s not old. But in <em>software years</em> it is pretty old I’m afraid…
</p>
        <p>
I’m writing this post because here and in other venues I’ve recently referred to Windows
Forms as “legacy”, along with asmx and even possibly Web Forms. This has caused a
certain amount of alarm, but I’m not here to apologize or mollify.
</p>
        <p>
Technologies come and go. That’s just life in our industry. I was a DEC VAX guy for
many years (I hear Ted Neward laughing now, he loves these stories), but I could see
the end coming years before it faded away, so I switched to the woefully immature
Windows platform (Windows 3.0 – what a step backward from the VAX!). I know many FoxPro
people who transitioned, albeit painfully, to VB or other tools/languages. The same
with Clipper/dBase/etc. Most PowerBuilder people transitioned to Java or .NET (though
much to my surprise I recently learned that PowerBuilder still actually exists – like
you can still buy it!!).
</p>
        <p>
All through my career I’ve been lucky or observant enough to jump ship before any
technology came down on my head. I switched to Windows before the VAX collapsed, and
switched to .NET before VB6 collapsed, etc. And honestly I can’t think of a case where
I didn’t feel like I was stepping back in time to use the “new technology” because
it was so immature compared to the old stuff. But every single time it was worth the
effort, because I avoided being trapped on a slowly fading platform/technology with
my skills becoming less relevant every day.
</p>
        <p>
But what is “legacy”? I once heard a consultant say “legacy is anything you’ve put
in production”. Which might be good for a laugh, but isn’t terribly useful in any
practical sense.
</p>
        <p>
I think “legacy” refers to a technology or platform that is no longer an area of focus
or investment by the creator/maintainer. In our world that mostly means Microsoft,
and so the question is where is Microsoft focused, where are they spending their money
and what are they enhancing?
</p>
        <p>
The answers are pretty clear:
</p>
        <ul>
          <li>
Azure</li>
          <li>
Silverlight</li>
          <li>
ASP.NET MVC</li>
          <li>
WPF (to a lesser degree)</li>
          <li>
ADO.NET EF</li>
          <li>
WCF</li>
        </ul>
        <p>
These are the areas where the research, development, marketing and general energy
are all focused. Ask a Microsoft guy what’s cool or hot and you’ll hear about Azure
or Silverlight, maybe ADO.NET EF or ASP.NET MVC and possibly WPF or WCF. But you won’t
hear Windows Forms, Web Forms, asmx web services, Enterprise Services, Remoting, LINQ
to SQL, DataSet/TableAdapter/DataTable or numerous other technologies.
</p>
        <p>
Some of those other technologies aren’t legacy – they aren’t going away, they just
aren’t sexy. Raw ADO.NET, for example. Nobody talks about that, but ADO.NET EF can’t
exist without it, so it is safe. But in theory ADO.NET EF competes with the DataSet
(poorly, but still) and so the DataSet is a strong candidate for the “legacy” label.
</p>
        <p>
Silverlight and WPF both compete with Windows Forms. Poor Windows Forms is getting
no love, no meaningful enhancements or new features. It is just there. At the same
time, Silverlight gets a new release in less than 12 month cycles, and WPF gets all
sorts of amazingly cool new features for Windows 7. You tell me whether Windows Forms
is legacy. But whatever you decide, I’m surely spending zero cycles of my time on
it.
</p>
        <p>
asmx is obvious legacy too. Has been ever since WCF showed up, though WCF’s configuration
issues have been a plague on its existence. I rather suspect .NET 4.0 will address
those shortcomings though, making WCF as easy to use as asmx and driving the final
nail in the asmx coffin.
</p>
        <p>
Web Forms isn’t so clear to me. All the buzz is on ASP.NET MVC. That’s the technology
all the cool kids are using, and it really is some nice technology – I like it as
much as I’ll probably ever like a web technology. But if you look at .NET 4.0, Microsoft
has done some really nice things in Web Forms. So while it isn’t getting the hype
of MVC, it is still getting some very real love from the Microsoft development group
that owns the technology. So I don’t think Web Forms is legacy now or in .NET 4.0,
but beyond that it is hard to say. I strongly suspect the fate of Web Forms lies mostly
in its user base and whether they fight for it, whether they make Microsoft believe
it continues to be worth serious investment and improvement into the .NET 5.0 timeframe.
</p>
        <p>
For my part, I can tell you that it is amazingly (impossibly?) time-consuming to be
an expert on 7-9 different interface technologies (UI, service, workflow, etc). Sure
CSLA .NET supports <em>all of them</em>, but there are increasing tensions between
the stagnant technologies (most notably Windows Forms) and the vibrant technologies
like Silverlight and WPF. It is no longer possible, for example, to create a collection
object that works with all the interface technologies – you just can’t do it. And
the time needed to deeply understand the different binding models and subtle differences
grows with each release of .NET.
</p>
        <p>
CSLA .NET 4.0 will absolutely still support all the interface technologies. But it
would be foolish to cut off the future to protect the past – that way lies doom. So
in CSLA .NET 4.0 you should expect to see support for Windows Forms still there, but
probably moved into another namespace (Csla.Windows or something), while the main
Csla namespace provides support for modern interface technologies like WPF, ASP.NET
MVC, Silverlight, etc.
</p>
        <p>
I am absolutely committed to providing a window of time where Windows Forms users
can migrate their apps to WPF or Silverlight while still enjoying the value of CSLA
.NET. And I really hope to make that reasonably smooth – ideally you’ll just have
to change your base class types for your business objects when you switch the UI for
the object from Windows Forms to XAML – though I suspect other minor tweaks may be
necessary as well in some edge cases.
</p>
        <p>
But let’s face it, at some point CSLA .NET does have to drop legacy technologies.
I’m just one guy, and even with Magenic being such a great patron it isn’t realistic
to support every technology ever invented for .NET :)  I don’t think the time
to drop Windows Forms is in 4.0, because there are way too many people who need to
migrate to WPF over the next 2-3 years.
</p>
        <p>
On the other hand, if you and your organization aren’t developing a strategy to move
off Windows Forms in the next few years I suspect you’ll eventually wake up one day
and realize you are in a bad spot. One of those spots where you can’t hire anyone
because no one else has done your technology for years, and nobody really remembers
how it works (or at least won’t admit they do unless you offer them huge sums of money).
</p>
        <p>
I don’t see this as bad. People who want stability shouldn’t be in computing. They
should be in something like accounts receivable or accounts payable – parts of business
that haven’t changed substantially for decades, or perhaps centuries.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=89d338dc-9021-45b3-9c53-839762ea0b5d" />
      </body>
      <title>It is only 8, how can it be legacy???</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,89d338dc-9021-45b3-9c53-839762ea0b5d.aspx</guid>
      <link>http://www.lhotka.net/weblog/ItIsOnly8HowCanItBeLegacy.aspx</link>
      <pubDate>Thu, 05 Nov 2009 03:20:16 GMT</pubDate>
      <description>&lt;p&gt;
Of course I’m referring to Windows Forms, which is about 8 years old. Even in dog
years that’s not old. But in &lt;em&gt;software years&lt;/em&gt; it is pretty old I’m afraid…
&lt;/p&gt;
&lt;p&gt;
I’m writing this post because here and in other venues I’ve recently referred to Windows
Forms as “legacy”, along with asmx and even possibly Web Forms. This has caused a
certain amount of alarm, but I’m not here to apologize or mollify.
&lt;/p&gt;
&lt;p&gt;
Technologies come and go. That’s just life in our industry. I was a DEC VAX guy for
many years (I hear Ted Neward laughing now, he loves these stories), but I could see
the end coming years before it faded away, so I switched to the woefully immature
Windows platform (Windows 3.0 – what a step backward from the VAX!). I know many FoxPro
people who transitioned, albeit painfully, to VB or other tools/languages. The same
with Clipper/dBase/etc. Most PowerBuilder people transitioned to Java or .NET (though
much to my surprise I recently learned that PowerBuilder still actually exists – like
you can still buy it!!).
&lt;/p&gt;
&lt;p&gt;
All through my career I’ve been lucky or observant enough to jump ship before any
technology came down on my head. I switched to Windows before the VAX collapsed, and
switched to .NET before VB6 collapsed, etc. And honestly I can’t think of a case where
I didn’t feel like I was stepping back in time to use the “new technology” because
it was so immature compared to the old stuff. But every single time it was worth the
effort, because I avoided being trapped on a slowly fading platform/technology with
my skills becoming less relevant every day.
&lt;/p&gt;
&lt;p&gt;
But what is “legacy”? I once heard a consultant say “legacy is anything you’ve put
in production”. Which might be good for a laugh, but isn’t terribly useful in any
practical sense.
&lt;/p&gt;
&lt;p&gt;
I think “legacy” refers to a technology or platform that is no longer an area of focus
or investment by the creator/maintainer. In our world that mostly means Microsoft,
and so the question is where is Microsoft focused, where are they spending their money
and what are they enhancing?
&lt;/p&gt;
&lt;p&gt;
The answers are pretty clear:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Azure&lt;/li&gt;
&lt;li&gt;
Silverlight&lt;/li&gt;
&lt;li&gt;
ASP.NET MVC&lt;/li&gt;
&lt;li&gt;
WPF (to a lesser degree)&lt;/li&gt;
&lt;li&gt;
ADO.NET EF&lt;/li&gt;
&lt;li&gt;
WCF&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
These are the areas where the research, development, marketing and general energy
are all focused. Ask a Microsoft guy what’s cool or hot and you’ll hear about Azure
or Silverlight, maybe ADO.NET EF or ASP.NET MVC and possibly WPF or WCF. But you won’t
hear Windows Forms, Web Forms, asmx web services, Enterprise Services, Remoting, LINQ
to SQL, DataSet/TableAdapter/DataTable or numerous other technologies.
&lt;/p&gt;
&lt;p&gt;
Some of those other technologies aren’t legacy – they aren’t going away, they just
aren’t sexy. Raw ADO.NET, for example. Nobody talks about that, but ADO.NET EF can’t
exist without it, so it is safe. But in theory ADO.NET EF competes with the DataSet
(poorly, but still) and so the DataSet is a strong candidate for the “legacy” label.
&lt;/p&gt;
&lt;p&gt;
Silverlight and WPF both compete with Windows Forms. Poor Windows Forms is getting
no love, no meaningful enhancements or new features. It is just there. At the same
time, Silverlight gets a new release in less than 12 month cycles, and WPF gets all
sorts of amazingly cool new features for Windows 7. You tell me whether Windows Forms
is legacy. But whatever you decide, I’m surely spending zero cycles of my time on
it.
&lt;/p&gt;
&lt;p&gt;
asmx is obvious legacy too. Has been ever since WCF showed up, though WCF’s configuration
issues have been a plague on its existence. I rather suspect .NET 4.0 will address
those shortcomings though, making WCF as easy to use as asmx and driving the final
nail in the asmx coffin.
&lt;/p&gt;
&lt;p&gt;
Web Forms isn’t so clear to me. All the buzz is on ASP.NET MVC. That’s the technology
all the cool kids are using, and it really is some nice technology – I like it as
much as I’ll probably ever like a web technology. But if you look at .NET 4.0, Microsoft
has done some really nice things in Web Forms. So while it isn’t getting the hype
of MVC, it is still getting some very real love from the Microsoft development group
that owns the technology. So I don’t think Web Forms is legacy now or in .NET 4.0,
but beyond that it is hard to say. I strongly suspect the fate of Web Forms lies mostly
in its user base and whether they fight for it, whether they make Microsoft believe
it continues to be worth serious investment and improvement into the .NET 5.0 timeframe.
&lt;/p&gt;
&lt;p&gt;
For my part, I can tell you that it is amazingly (impossibly?) time-consuming to be
an expert on 7-9 different interface technologies (UI, service, workflow, etc). Sure
CSLA .NET supports &lt;em&gt;all of them&lt;/em&gt;, but there are increasing tensions between
the stagnant technologies (most notably Windows Forms) and the vibrant technologies
like Silverlight and WPF. It is no longer possible, for example, to create a collection
object that works with all the interface technologies – you just can’t do it. And
the time needed to deeply understand the different binding models and subtle differences
grows with each release of .NET.
&lt;/p&gt;
&lt;p&gt;
CSLA .NET 4.0 will absolutely still support all the interface technologies. But it
would be foolish to cut off the future to protect the past – that way lies doom. So
in CSLA .NET 4.0 you should expect to see support for Windows Forms still there, but
probably moved into another namespace (Csla.Windows or something), while the main
Csla namespace provides support for modern interface technologies like WPF, ASP.NET
MVC, Silverlight, etc.
&lt;/p&gt;
&lt;p&gt;
I am absolutely committed to providing a window of time where Windows Forms users
can migrate their apps to WPF or Silverlight while still enjoying the value of CSLA
.NET. And I really hope to make that reasonably smooth – ideally you’ll just have
to change your base class types for your business objects when you switch the UI for
the object from Windows Forms to XAML – though I suspect other minor tweaks may be
necessary as well in some edge cases.
&lt;/p&gt;
&lt;p&gt;
But let’s face it, at some point CSLA .NET does have to drop legacy technologies.
I’m just one guy, and even with Magenic being such a great patron it isn’t realistic
to support every technology ever invented for .NET :)&amp;#160; I don’t think the time
to drop Windows Forms is in 4.0, because there are way too many people who need to
migrate to WPF over the next 2-3 years.
&lt;/p&gt;
&lt;p&gt;
On the other hand, if you and your organization aren’t developing a strategy to move
off Windows Forms in the next few years I suspect you’ll eventually wake up one day
and realize you are in a bad spot. One of those spots where you can’t hire anyone
because no one else has done your technology for years, and nobody really remembers
how it works (or at least won’t admit they do unless you offer them huge sums of money).
&lt;/p&gt;
&lt;p&gt;
I don’t see this as bad. People who want stability shouldn’t be in computing. They
should be in something like accounts receivable or accounts payable – parts of business
that haven’t changed substantially for decades, or perhaps centuries.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=89d338dc-9021-45b3-9c53-839762ea0b5d" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,89d338dc-9021-45b3-9c53-839762ea0b5d.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
      <category>Silverlight</category>
      <category>WCF</category>
      <category>Web</category>
      <category>Windows Forms</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=12d4c0fd-0d0e-4868-8128-74910c48061d</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,12d4c0fd-0d0e-4868-8128-74910c48061d.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,12d4c0fd-0d0e-4868-8128-74910c48061d.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=12d4c0fd-0d0e-4868-8128-74910c48061d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I was just complaining that the cool new Windows 7 features weren’t available to me
as a .NET developer – at least not without painful p/invoke calls.
</p>
        <p>
My complaints were ill-founded however, as it turns out there’s a solution in the
form of the <a href="http://code.msdn.microsoft.com/WindowsAPICodePack">Windows API
Code Pack</a>.
</p>
        <p>
This makes me happy (though I haven’t tried it yet, so I’m just assuming it works)
because I want access to Jump Lists and some other Windows shell integration concepts
– which appear to be nicely included in the code pack.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=12d4c0fd-0d0e-4868-8128-74910c48061d" />
      </body>
      <title>Windows 7 features in .NET</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,12d4c0fd-0d0e-4868-8128-74910c48061d.aspx</guid>
      <link>http://www.lhotka.net/weblog/Windows7FeaturesInNET.aspx</link>
      <pubDate>Thu, 22 Oct 2009 16:56:24 GMT</pubDate>
      <description>&lt;p&gt;
I was just complaining that the cool new Windows 7 features weren’t available to me
as a .NET developer – at least not without painful p/invoke calls.
&lt;/p&gt;
&lt;p&gt;
My complaints were ill-founded however, as it turns out there’s a solution in the
form of the &lt;a href="http://code.msdn.microsoft.com/WindowsAPICodePack"&gt;Windows API
Code Pack&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
This makes me happy (though I haven’t tried it yet, so I’m just assuming it works)
because I want access to Jump Lists and some other Windows shell integration concepts
– which appear to be nicely included in the code pack.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=12d4c0fd-0d0e-4868-8128-74910c48061d" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,12d4c0fd-0d0e-4868-8128-74910c48061d.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=ed8abce1-3e78-40b7-ae6f-c090ae57807e</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,ed8abce1-3e78-40b7-ae6f-c090ae57807e.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,ed8abce1-3e78-40b7-ae6f-c090ae57807e.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=ed8abce1-3e78-40b7-ae6f-c090ae57807e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
My article providing an overview of some of the parallel and concurrent programming
features coming in .NET 4.0 is online: 
</p>
        <p>
          <a href="http://www.devx.com/SpecialReports/Article/40965">Parallel and Concurrency
Futures for Microsoft Developers</a>
        </p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=ed8abce1-3e78-40b7-ae6f-c090ae57807e" />
      </body>
      <title>Parallel and Concurrency Futures for Microsoft Developers</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,ed8abce1-3e78-40b7-ae6f-c090ae57807e.aspx</guid>
      <link>http://www.lhotka.net/weblog/ParallelAndConcurrencyFuturesForMicrosoftDevelopers.aspx</link>
      <pubDate>Mon, 02 Mar 2009 20:34:11 GMT</pubDate>
      <description>&lt;p&gt;
My article providing an overview of some of the parallel and concurrent programming
features coming in .NET 4.0 is online: 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.devx.com/SpecialReports/Article/40965"&gt;Parallel and Concurrency
Futures for Microsoft Developers&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=ed8abce1-3e78-40b7-ae6f-c090ae57807e" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,ed8abce1-3e78-40b7-ae6f-c090ae57807e.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=67223e24-5171-46c3-a8b1-1e63ff3cea02</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,67223e24-5171-46c3-a8b1-1e63ff3cea02.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,67223e24-5171-46c3-a8b1-1e63ff3cea02.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=67223e24-5171-46c3-a8b1-1e63ff3cea02</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A ridiculously long time ago I was in a meeting at Microsoft, sitting next to Ted
Neward. As you may know, Ted lives in both the Java and .NET worlds and kind of specializes
in interop between them.
</p>
        <p>
Somehow (and I don’t remember the specifics), we got to talking about object serialization
and related concepts like encryption, signing and so forth. It turned out that Java
had a library of wrapper types that worked with the serialization concept to make
it very easy to sign and encrypt an object graph.
</p>
        <p>
Thinking about this, it isn’t hard to imagine this working in .NET, and so I whipped
up a similar library concept. I’ve used it from time to time myself, but never quite
got around to putting it online for public consumption. Until now:
</p>
        <p>
          <a href="http://www.lhotka.net/files/SerializationWrapper-090210.zip">Download the
SerializationWrapper solution</a>
        </p>
        <p>
The download includes nunit tests, so you can figure out how to use it pretty easily
by looking at those.
</p>
        <p>
For example, to sign a serializable object graph, just do this:
</p>
        <blockquote>
          <p>
SignedWrapper&lt;string&gt; wrapper = new SignedWrapper&lt;string&gt;(data, hashKey); 
</p>
        </blockquote>
        <p>
You can then send the wrapper over the network as long as it is serialized using the
BinaryFormatter or NetDataContractSerializer, and on the other end you can make sure
it hasn’t been tampered with by verifying the signature:
</p>
        <blockquote>
          <p>
if (wrapper.Verify(hashKey)) 
</p>
        </blockquote>
        <p>
Of course the really tricky part is key exchange. How did both ends of the process
get access to the same hashKey value? That’s outside the scope of my library, and
frankly that is the really hard part about things like security…
</p>
        <p>
In fact, if you look inside the code for the various wrapper classes, you’ll find
that I’m just delegating all the interesting work to the .NET cryptography subsystem.
By using the various wrappers together you can do asymmetric public/private keys,
symmetric keys. You can do signing, and encryption. I think I now cover all the different
algorithms supported by .NET – in one nicely abstract scheme.
</p>
        <p>
Also, if you look inside the solution you’ll see a compression wrapper. That was an
experiment on my part, and I really didn’t find the result satisfying. My thought
was that you’d wrap your object graph (maybe after it was encrypted and signed) in
the compression wrapper, and then <em>that</em> would be serialized to go over the
wire.
</p>
        <p>
But it turns out that there are two flaws:
</p>
        <ol>
          <li>
Serializing the compressed data makes it quite a bit bigger, and you are better off
transferring the CompressedData value from the wrapper rather than allowing the wrapper
itself to be serialized.</li>
          <li>
More importantly, compressing encrypted data doesn’t work well. Encrypted data is
pretty random, and the two compression algorithms included in .NET don’t do a particularly
good job of compressing that data. I don’t know if other algorithms are better at
compressing encrypted data, but I was disappointed with the results I found here.</li>
        </ol>
        <p>
In any case, I’ve found the crypto wrapper classes to be generally useful in abstracting
most of the complexity of dealing with the .NET crypto subsystem, and I thought I’d
share the code in case anyone else can find it useful as well.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=67223e24-5171-46c3-a8b1-1e63ff3cea02" />
      </body>
      <title>.NET Serialization wrappers</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,67223e24-5171-46c3-a8b1-1e63ff3cea02.aspx</guid>
      <link>http://www.lhotka.net/weblog/NETSerializationWrappers.aspx</link>
      <pubDate>Tue, 10 Feb 2009 21:24:10 GMT</pubDate>
      <description>&lt;p&gt;
A ridiculously long time ago I was in a meeting at Microsoft, sitting next to Ted
Neward. As you may know, Ted lives in both the Java and .NET worlds and kind of specializes
in interop between them.
&lt;/p&gt;
&lt;p&gt;
Somehow (and I don’t remember the specifics), we got to talking about object serialization
and related concepts like encryption, signing and so forth. It turned out that Java
had a library of wrapper types that worked with the serialization concept to make
it very easy to sign and encrypt an object graph.
&lt;/p&gt;
&lt;p&gt;
Thinking about this, it isn’t hard to imagine this working in .NET, and so I whipped
up a similar library concept. I’ve used it from time to time myself, but never quite
got around to putting it online for public consumption. Until now:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.lhotka.net/files/SerializationWrapper-090210.zip"&gt;Download the
SerializationWrapper solution&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The download includes nunit tests, so you can figure out how to use it pretty easily
by looking at those.
&lt;/p&gt;
&lt;p&gt;
For example, to sign a serializable object graph, just do this:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
SignedWrapper&amp;lt;string&amp;gt; wrapper = new SignedWrapper&amp;lt;string&amp;gt;(data, hashKey); 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
You can then send the wrapper over the network as long as it is serialized using the
BinaryFormatter or NetDataContractSerializer, and on the other end you can make sure
it hasn’t been tampered with by verifying the signature:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
if (wrapper.Verify(hashKey)) 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Of course the really tricky part is key exchange. How did both ends of the process
get access to the same hashKey value? That’s outside the scope of my library, and
frankly that is the really hard part about things like security…
&lt;/p&gt;
&lt;p&gt;
In fact, if you look inside the code for the various wrapper classes, you’ll find
that I’m just delegating all the interesting work to the .NET cryptography subsystem.
By using the various wrappers together you can do asymmetric public/private keys,
symmetric keys. You can do signing, and encryption. I think I now cover all the different
algorithms supported by .NET – in one nicely abstract scheme.
&lt;/p&gt;
&lt;p&gt;
Also, if you look inside the solution you’ll see a compression wrapper. That was an
experiment on my part, and I really didn’t find the result satisfying. My thought
was that you’d wrap your object graph (maybe after it was encrypted and signed) in
the compression wrapper, and then &lt;em&gt;that&lt;/em&gt; would be serialized to go over the
wire.
&lt;/p&gt;
&lt;p&gt;
But it turns out that there are two flaws:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Serializing the compressed data makes it quite a bit bigger, and you are better off
transferring the CompressedData value from the wrapper rather than allowing the wrapper
itself to be serialized.&lt;/li&gt;
&lt;li&gt;
More importantly, compressing encrypted data doesn’t work well. Encrypted data is
pretty random, and the two compression algorithms included in .NET don’t do a particularly
good job of compressing that data. I don’t know if other algorithms are better at
compressing encrypted data, but I was disappointed with the results I found here.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
In any case, I’ve found the crypto wrapper classes to be generally useful in abstracting
most of the complexity of dealing with the .NET crypto subsystem, and I thought I’d
share the code in case anyone else can find it useful as well.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=67223e24-5171-46c3-a8b1-1e63ff3cea02" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,67223e24-5171-46c3-a8b1-1e63ff3cea02.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=9efcafc7-68a2-4f8f-bc64-66174453adfd</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,9efcafc7-68a2-4f8f-bc64-66174453adfd.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,9efcafc7-68a2-4f8f-bc64-66174453adfd.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=9efcafc7-68a2-4f8f-bc64-66174453adfd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of the topic areas I get asked about frequently is authorization. Specifically
role-based authorization as supported by .NET, and how to make that work in the "real
world".
</p>
        <p>
I get asked about this because CSLA .NET (for Windows and Silverlight) follow the
standard role-based .NET model. In fact, CSLA .NET rests directly on the existing
.NET infrastructure.
</p>
        <p>
So what's the problem? Why doesn't the role-based model work in the real world?
</p>
        <p>
First off, it is important to realize that it <em>does work</em> for some scenarios.
It isn't bad for course-grained models where users are authorized at the page or form
level. ASP.NET directly uses this model for its authorization, and many people are
happy with that.
</p>
        <p>
But it doesn't match the requirements of a lot of organizations in my experience.
Many organizations have a slightly more complex structure that provides better administrative
control and manageability.
</p>
        <p>
          <a href="http://www.lhotka.net/weblog/content/binary/WindowsLiveWriter/Permissionbasedauthorizationvsrolebaseda_9EEA/image_2.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="274" alt="image" src="http://www.lhotka.net/weblog/content/binary/WindowsLiveWriter/Permissionbasedauthorizationvsrolebaseda_9EEA/image_thumb.png" width="497" border="0" />
          </a>
        </p>
        <p>
Whether a user can get to a page/form, or can view a property or edit a property is
often controlled by a <em>permission</em>, not a role. In other words, users are in
roles, and a role is essentially a <em>permission set</em>: a list of permissions
the role has (or doesn't have).
</p>
        <p>
This doesn't map real well into the .NET IPrincipal interface, which only exposes
an IsInRole() method. Finding out if the user is in a role isn't particularly useful,
because the application really needs to call some sort of HasPermission() method.
</p>
        <p>
In my view the answer is relatively simple.
</p>
        <p>
The first step is understanding that there are two concerns here: the administrative
issues, and the runtime issues.
</p>
        <p>
At administration time the concepts of "user", "role" and "permission" are all important.
Admins will associate permissions with roles, and roles with users. This gives them
the kind of control and manageability they require.
</p>
        <p>
At <em>runtime</em>, when the user is actually using the application, the roles are <em>entirely
meaningless</em>. However, if you consider that IsInRole() can be <em>thought of as
"HasPermission()"</em>, then there's a solution. When you load the .NET principal
with a list of "roles", you really load it with a list of permissions. So when your
application asks "IsInRole()", it does it like this:
</p>
        <blockquote>
          <p>
bool result = currentPrincipal.IsInRole(requiredPermission);
</p>
        </blockquote>
        <p>
Notice that I am "misusing" the IsInRole() method by passing in the name of a permission,
not the name of a role. But that's ok, assuming that I've loaded my principal object
with a list of permissions instead of a list of roles. Remember, the IsInRole() method
typically does nothing more than determine whether the string parameter value is in
a list of known values. It doesn't really matter if that list of values are "roles"
or "permissions".
</p>
        <p>
And since, at runtime, no one cares about roles at all, there's no sense loading them
into memory. This means the list of "roles" can instead be a list of "permissions".
</p>
        <p>
The great thing is that many people store their users, roles and permissions in some
sort of relational store (like SQL Server). In that case it is a simple JOIN statement
to retrieve all permissions for a user, merging all the user's roles together to get
that list, and not returning the actual role values at all (because they are only
useful at admin time).
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=9efcafc7-68a2-4f8f-bc64-66174453adfd" />
      </body>
      <title>Permission-based authorization vs role-based authorization</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,9efcafc7-68a2-4f8f-bc64-66174453adfd.aspx</guid>
      <link>http://www.lhotka.net/weblog/PermissionbasedAuthorizationVsRolebasedAuthorization.aspx</link>
      <pubDate>Wed, 03 Dec 2008 17:19:01 GMT</pubDate>
      <description>&lt;p&gt;
One of the topic areas I get asked about frequently is authorization. Specifically
role-based authorization as supported by .NET, and how to make that work in the "real
world".
&lt;/p&gt;
&lt;p&gt;
I get asked about this because CSLA .NET (for Windows and Silverlight) follow the
standard role-based .NET model. In fact, CSLA .NET rests directly on the existing
.NET infrastructure.
&lt;/p&gt;
&lt;p&gt;
So what's the problem? Why doesn't the role-based model work in the real world?
&lt;/p&gt;
&lt;p&gt;
First off, it is important to realize that it &lt;em&gt;does work&lt;/em&gt; for some scenarios.
It isn't bad for course-grained models where users are authorized at the page or form
level. ASP.NET directly uses this model for its authorization, and many people are
happy with that.
&lt;/p&gt;
&lt;p&gt;
But it doesn't match the requirements of a lot of organizations in my experience.
Many organizations have a slightly more complex structure that provides better administrative
control and manageability.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.lhotka.net/weblog/content/binary/WindowsLiveWriter/Permissionbasedauthorizationvsrolebaseda_9EEA/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="274" alt="image" src="http://www.lhotka.net/weblog/content/binary/WindowsLiveWriter/Permissionbasedauthorizationvsrolebaseda_9EEA/image_thumb.png" width="497" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Whether a user can get to a page/form, or can view a property or edit a property is
often controlled by a &lt;em&gt;permission&lt;/em&gt;, not a role. In other words, users are in
roles, and a role is essentially a &lt;em&gt;permission set&lt;/em&gt;: a list of permissions
the role has (or doesn't have).
&lt;/p&gt;
&lt;p&gt;
This doesn't map real well into the .NET IPrincipal interface, which only exposes
an IsInRole() method. Finding out if the user is in a role isn't particularly useful,
because the application really needs to call some sort of HasPermission() method.
&lt;/p&gt;
&lt;p&gt;
In my view the answer is relatively simple.
&lt;/p&gt;
&lt;p&gt;
The first step is understanding that there are two concerns here: the administrative
issues, and the runtime issues.
&lt;/p&gt;
&lt;p&gt;
At administration time the concepts of "user", "role" and "permission" are all important.
Admins will associate permissions with roles, and roles with users. This gives them
the kind of control and manageability they require.
&lt;/p&gt;
&lt;p&gt;
At &lt;em&gt;runtime&lt;/em&gt;, when the user is actually using the application, the roles are &lt;em&gt;entirely
meaningless&lt;/em&gt;. However, if you consider that IsInRole() can be &lt;em&gt;thought of as
"HasPermission()"&lt;/em&gt;, then there's a solution. When you load the .NET principal
with a list of "roles", you really load it with a list of permissions. So when your
application asks "IsInRole()", it does it like this:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
bool result = currentPrincipal.IsInRole(requiredPermission);
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Notice that I am "misusing" the IsInRole() method by passing in the name of a permission,
not the name of a role. But that's ok, assuming that I've loaded my principal object
with a list of permissions instead of a list of roles. Remember, the IsInRole() method
typically does nothing more than determine whether the string parameter value is in
a list of known values. It doesn't really matter if that list of values are "roles"
or "permissions".
&lt;/p&gt;
&lt;p&gt;
And since, at runtime, no one cares about roles at all, there's no sense loading them
into memory. This means the list of "roles" can instead be a list of "permissions".
&lt;/p&gt;
&lt;p&gt;
The great thing is that many people store their users, roles and permissions in some
sort of relational store (like SQL Server). In that case it is a simple JOIN statement
to retrieve all permissions for a user, merging all the user's roles together to get
that list, and not returning the actual role values at all (because they are only
useful at admin time).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=9efcafc7-68a2-4f8f-bc64-66174453adfd" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,9efcafc7-68a2-4f8f-bc64-66174453adfd.aspx</comments>
      <category>Architecture</category>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=c76d5eb6-ad0e-48fb-abee-28e81736cdcf</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,c76d5eb6-ad0e-48fb-abee-28e81736cdcf.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,c76d5eb6-ad0e-48fb-abee-28e81736cdcf.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=c76d5eb6-ad0e-48fb-abee-28e81736cdcf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
PDC 2008 was a lot of fun - a big show, with lots of announcements, lots of sessions
and some thought-provoking content. I thought I'd through out a few observations.
Not really conclusions, as those take time and reflection, so just some observations.
</p>
        <p>
          <strong>Windows Azure</strong>, the operating system for the cloud, is intriguing.
For a first run at this, the technology seems surprisingly complete and contains a
pretty reasonable set of features. I can easily see how web sites, XML services and
both data-centric and compute-centric processing could be built for this platform.
For that matter, it looks like it would be perhaps a week's work to get my web site
ported over to run completely in Azure.
</p>
        <p>
The real question is whether that would even make sense, and <em>that</em> comes down
to the value proposition. One big component of value is price. Like anyone else, I
pay a certain amount to run my web site. Electricity, bandwidth, support time, hardware
costs, software costs, etc. I've never really sorted out an exact cost, but it isn't
real high on a per-month basis. And I could host on any number of .NET-friendly hosting
services that have been around for years, and some of them are pretty inexpensive.
So the question becomes whether Azure will be priced in such a way that it is attractive
to me. If so, I'm excited about Azure!! If not, then I really don't care about Azure.
</p>
        <p>
I suspect most attendees went through a similar thought process. If Microsoft prices
Azure for "the enterprise" then 90% of the developers in the world simply don't care
about Azure. But if Microsoft prices Azure for small to mid-size businesses, and for
the very small players (like me) then 90% of the developers in the world should (I
think) really be looking at this technology
</p>
        <p>
          <strong>Windows 7 </strong>looks good to me. After the Tuesday keynote I was ready
to install it <em>now</em>. As time goes by the urgency has faded a bit - Vista has
stabilized nicely over the past 6-8 months and I really like it now. Windows 7 has
some nice-sounding new features though. Probably the single biggest one is reduced
system resource requirements. If Microsoft can deliver on that part of the promise
I'll be totally thrilled. Though I really <em>do</em> want multi-monitor RDP and the
ability to manage, mount (and even boot from) vhd files directly from the host OS.
</p>
        <p>
In talking to friends of mine that work at Microsoft, my level of confidence in W7
is quite high. A couple of them have been running it for some time now, and while
it is clearly pre-beta, they have found it to be a very satisfying experience. When
I get back from all my travels I do think I'll have to buy a spare HD for my laptop
and give it a try myself.
</p>
        <p>
The <strong>Oslo modeling tools</strong> are also interesting, though they are more
future-looking. Realistically this idea of model-driven development will require a
major shift in how our industry thinks about and approaches <a href="http://magenic.com/Services/CustomSoftwareDevelopment.aspx">custom
software development</a>. Such a massive shift will take many years to occur, regardless
of whether the technology is there to enable it. It is admirable that Microsoft is
taking such a gamble - building a set of tools and technologies for something that
might become acceptable to developers in the murky future. Their gamble will pay off
if we collectively decide that the world of 3GL development really is at an end and
that we need to move to higher levels of abstraction. Of course we could decide to
stick with what has (and hasn't) worked for 30+ years, in which case modeling tools
will go the way of CASE.
</p>
        <p>
But even if some of the really forward-looking modeling ideas never become palatable,
many of the things Microsoft is doing to support modeling are immediately useful.
Enhancements to Windows Workflow are a prime example, as is the M language. I've hard
a hard time getting excited about WF, because it has felt like a graphical way to
do FORTRAN. But some of the enhancements to WF directly address my primary concerns,
and I can see myself getting much more interested in WF in the relatively near future.
And the ability of the M language to define other languages (create DSLs), where I
can create my own output generator to create whatever I need - now <em>that</em> is
really, really cool!
</p>
        <p>
Once I get done with my book and all my fall travel, you can bet I'll be exploring
the use of M to create a specialized language to simplify the creation of CSLA .NET
business classes :)
</p>
        <p>
There were numerous talks about <strong>.NET 4.0</strong> and the future of C# and
VB. 
</p>
        <p>
Probably the single biggest thing on the language front is that Microsoft has finally
decided to sync VB and C# so they have feature parity. Enough of this back-and-forth
with different features, the languages will now just move forward together. A few
years ago I would have argued against this, because competition breeds innovation.
But today I don't think it matters, because the innovation is coming from F#, Ruby,
Python and various other languages and initiatives. Both VB and C# have such massive
pre-existing code-bases (all the code we've written) that they can't move rapidly
or explore radical ideas - while some of these other languages are more free to do
just that.
</p>
        <p>
The framework itself has all sorts of changes and improvements. I spent less time
looking at this than at Azure and Oslo though, so I honestly just don't have a lot
to say on it right now. I look at .NET 4.0 and Visual Studio 2010 as being more tactical
- things I'll spend a lot of time on over the next few months anyway - so I didn't
see so much need to spend my time on it during PDC.
</p>
        <p>
Finally, there were announcements around <strong>Silverlight and WPF</strong>. If
anyone doubts that XAML is the future of the UI on Windows and (to some degree) the
web, now is the time to wake up and smell the coffee. I'm obviously convinced Silverlight
is going to rapidly become the default technology for building business apps, with
WPF and Ajax as fallback positions, and everything at the PDC simply reinforced this
viewpoint.
</p>
        <p>
The new Silverlight and WPF toolkits provide better parity between the two XAML dialects,
and show how aggressively Microsoft is working to achieve true parity.
</p>
        <p>
But more important is the Silverlight intersection with Azure and Live Mesh. The fact
that I can build <em>smart client apps</em> that totally host in Azure or the Mesh
is compelling, and puts Silverlight a notch above WPF in terms of being the desired
start-point for app development. Yes, I really like WPF, but even if it can host in
Azure it probably won't host in Mesh, and in neither case will it be as clean or seamless.
</p>
        <p>
So while I fully appreciate that WPF is good for that small percentage of business
apps that need access to DirectX or rich client-side resources, I still think <em>most</em> business
apps will work just fine with access to the monitor/keyboard/mouse/memory/CPU provided
by Silverlight. 
</p>
        <p>
A couple people asked why I think Silverlight is better than Ajax. To me this is drop-dead
simple. I can write a class in C# or VB that runs on the client in Silverlight. I
can write real smart client applications that run in the browser. And I can run that <em>exact
same code</em> on the server too. So I can give the user a very interactive experience,
and then re-run that same code on the server because I don't trust the client.
</p>
        <p>
To do that in Ajax you'd either have to write your code twice (in C# and in Javascript),
or you'd have to do tons of server calls to simulate the interactivity provided by
Silverlight - and that obviously won't scale nearly the same as the more correct Silverlight
solution.
</p>
        <p>
To me it is a no-brainer - Ajax loses when it comes to building interactive business
apps like order entry screens, customer maintenance screens, etc.
</p>
        <p>
That's not to say Ajax has no home. The web and browser world is really good at displaying
data, and Ajax makes data display more interesting that simple HTML. I strongly suspect
that most "Silverlight" apps will make heavy use of HTML/Ajax for data display, but
I just can't see why anyone would willingly choose to create data entry forms or other
interactive parts of their app outside of Silverlight.
</p>
        <p>
And that wraps up my on-the-flight-home summary of thoughts about PDC. 
</p>
        <p>
Next week I'm speaking at the Patterns and Practices Summit in Redmond, and then I'll
be at Tech Ed EMEA in Barcelona. I'm doing a number of sessions at both events, but
what's cool is that at each event I'm doing a talk specifically about CSLA .NET for
Silverlight. And in December I'll be at VS Live in Dallas, where I'll also give a
talk directly on using CSLA .NET.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=c76d5eb6-ad0e-48fb-abee-28e81736cdcf" />
      </body>
      <title>Thoughts on PDC 2008</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,c76d5eb6-ad0e-48fb-abee-28e81736cdcf.aspx</guid>
      <link>http://www.lhotka.net/weblog/ThoughtsOnPDC2008.aspx</link>
      <pubDate>Sat, 01 Nov 2008 01:10:16 GMT</pubDate>
      <description>&lt;p&gt;
PDC 2008 was a lot of fun - a big show, with lots of announcements, lots of sessions
and some thought-provoking content. I thought I'd through out a few observations.
Not really conclusions, as those take time and reflection, so just some observations.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Windows Azure&lt;/strong&gt;, the operating system for the cloud, is intriguing.
For a first run at this, the technology seems surprisingly complete and contains a
pretty reasonable set of features. I can easily see how web sites, XML services and
both data-centric and compute-centric processing could be built for this platform.
For that matter, it looks like it would be perhaps a week's work to get my web site
ported over to run completely in Azure.
&lt;/p&gt;
&lt;p&gt;
The real question is whether that would even make sense, and &lt;em&gt;that&lt;/em&gt; comes down
to the value proposition. One big component of value is price. Like anyone else, I
pay a certain amount to run my web site. Electricity, bandwidth, support time, hardware
costs, software costs, etc. I've never really sorted out an exact cost, but it isn't
real high on a per-month basis. And I could host on any number of .NET-friendly hosting
services that have been around for years, and some of them are pretty inexpensive.
So the question becomes whether Azure will be priced in such a way that it is attractive
to me. If so, I'm excited about Azure!! If not, then I really don't care about Azure.
&lt;/p&gt;
&lt;p&gt;
I suspect most attendees went through a similar thought process. If Microsoft prices
Azure for "the enterprise" then 90% of the developers in the world simply don't care
about Azure. But if Microsoft prices Azure for small to mid-size businesses, and for
the very small players (like me) then 90% of the developers in the world should (I
think) really be looking at this technology
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Windows 7 &lt;/strong&gt;looks good to me. After the Tuesday keynote I was ready
to install it &lt;em&gt;now&lt;/em&gt;. As time goes by the urgency has faded a bit - Vista has
stabilized nicely over the past 6-8 months and I really like it now. Windows 7 has
some nice-sounding new features though. Probably the single biggest one is reduced
system resource requirements. If Microsoft can deliver on that part of the promise
I'll be totally thrilled. Though I really &lt;em&gt;do&lt;/em&gt; want multi-monitor RDP and the
ability to manage, mount (and even boot from) vhd files directly from the host OS.
&lt;/p&gt;
&lt;p&gt;
In talking to friends of mine that work at Microsoft, my level of confidence in W7
is quite high. A couple of them have been running it for some time now, and while
it is clearly pre-beta, they have found it to be a very satisfying experience. When
I get back from all my travels I do think I'll have to buy a spare HD for my laptop
and give it a try myself.
&lt;/p&gt;
&lt;p&gt;
The &lt;strong&gt;Oslo modeling tools&lt;/strong&gt; are also interesting, though they are more
future-looking. Realistically this idea of model-driven development will require a
major shift in how our industry thinks about and approaches &lt;a href="http://magenic.com/Services/CustomSoftwareDevelopment.aspx"&gt;custom
software development&lt;/a&gt;. Such a massive shift will take many years to occur, regardless
of whether the technology is there to enable it. It is admirable that Microsoft is
taking such a gamble - building a set of tools and technologies for something that
might become acceptable to developers in the murky future. Their gamble will pay off
if we collectively decide that the world of 3GL development really is at an end and
that we need to move to higher levels of abstraction. Of course we could decide to
stick with what has (and hasn't) worked for 30+ years, in which case modeling tools
will go the way of CASE.
&lt;/p&gt;
&lt;p&gt;
But even if some of the really forward-looking modeling ideas never become palatable,
many of the things Microsoft is doing to support modeling are immediately useful.
Enhancements to Windows Workflow are a prime example, as is the M language. I've hard
a hard time getting excited about WF, because it has felt like a graphical way to
do FORTRAN. But some of the enhancements to WF directly address my primary concerns,
and I can see myself getting much more interested in WF in the relatively near future.
And the ability of the M language to define other languages (create DSLs), where I
can create my own output generator to create whatever I need - now &lt;em&gt;that&lt;/em&gt; is
really, really cool!
&lt;/p&gt;
&lt;p&gt;
Once I get done with my book and all my fall travel, you can bet I'll be exploring
the use of M to create a specialized language to simplify the creation of CSLA .NET
business classes :)
&lt;/p&gt;
&lt;p&gt;
There were numerous talks about &lt;strong&gt;.NET 4.0&lt;/strong&gt; and the future of C# and
VB. 
&lt;/p&gt;
&lt;p&gt;
Probably the single biggest thing on the language front is that Microsoft has finally
decided to sync VB and C# so they have feature parity. Enough of this back-and-forth
with different features, the languages will now just move forward together. A few
years ago I would have argued against this, because competition breeds innovation.
But today I don't think it matters, because the innovation is coming from F#, Ruby,
Python and various other languages and initiatives. Both VB and C# have such massive
pre-existing code-bases (all the code we've written) that they can't move rapidly
or explore radical ideas - while some of these other languages are more free to do
just that.
&lt;/p&gt;
&lt;p&gt;
The framework itself has all sorts of changes and improvements. I spent less time
looking at this than at Azure and Oslo though, so I honestly just don't have a lot
to say on it right now. I look at .NET 4.0 and Visual Studio 2010 as being more tactical
- things I'll spend a lot of time on over the next few months anyway - so I didn't
see so much need to spend my time on it during PDC.
&lt;/p&gt;
&lt;p&gt;
Finally, there were announcements around &lt;strong&gt;Silverlight and WPF&lt;/strong&gt;. If
anyone doubts that XAML is the future of the UI on Windows and (to some degree) the
web, now is the time to wake up and smell the coffee. I'm obviously convinced Silverlight
is going to rapidly become the default technology for building business apps, with
WPF and Ajax as fallback positions, and everything at the PDC simply reinforced this
viewpoint.
&lt;/p&gt;
&lt;p&gt;
The new Silverlight and WPF toolkits provide better parity between the two XAML dialects,
and show how aggressively Microsoft is working to achieve true parity.
&lt;/p&gt;
&lt;p&gt;
But more important is the Silverlight intersection with Azure and Live Mesh. The fact
that I can build &lt;em&gt;smart client apps&lt;/em&gt; that totally host in Azure or the Mesh
is compelling, and puts Silverlight a notch above WPF in terms of being the desired
start-point for app development. Yes, I really like WPF, but even if it can host in
Azure it probably won't host in Mesh, and in neither case will it be as clean or seamless.
&lt;/p&gt;
&lt;p&gt;
So while I fully appreciate that WPF is good for that small percentage of business
apps that need access to DirectX or rich client-side resources, I still think &lt;em&gt;most&lt;/em&gt; business
apps will work just fine with access to the monitor/keyboard/mouse/memory/CPU provided
by Silverlight. 
&lt;/p&gt;
&lt;p&gt;
A couple people asked why I think Silverlight is better than Ajax. To me this is drop-dead
simple. I can write a class in C# or VB that runs on the client in Silverlight. I
can write real smart client applications that run in the browser. And I can run that &lt;em&gt;exact
same code&lt;/em&gt; on the server too. So I can give the user a very interactive experience,
and then re-run that same code on the server because I don't trust the client.
&lt;/p&gt;
&lt;p&gt;
To do that in Ajax you'd either have to write your code twice (in C# and in Javascript),
or you'd have to do tons of server calls to simulate the interactivity provided by
Silverlight - and that obviously won't scale nearly the same as the more correct Silverlight
solution.
&lt;/p&gt;
&lt;p&gt;
To me it is a no-brainer - Ajax loses when it comes to building interactive business
apps like order entry screens, customer maintenance screens, etc.
&lt;/p&gt;
&lt;p&gt;
That's not to say Ajax has no home. The web and browser world is really good at displaying
data, and Ajax makes data display more interesting that simple HTML. I strongly suspect
that most "Silverlight" apps will make heavy use of HTML/Ajax for data display, but
I just can't see why anyone would willingly choose to create data entry forms or other
interactive parts of their app outside of Silverlight.
&lt;/p&gt;
&lt;p&gt;
And that wraps up my on-the-flight-home summary of thoughts about PDC. 
&lt;/p&gt;
&lt;p&gt;
Next week I'm speaking at the Patterns and Practices Summit in Redmond, and then I'll
be at Tech Ed EMEA in Barcelona. I'm doing a number of sessions at both events, but
what's cool is that at each event I'm doing a talk specifically about CSLA .NET for
Silverlight. And in December I'll be at VS Live in Dallas, where I'll also give a
talk directly on using CSLA .NET.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=c76d5eb6-ad0e-48fb-abee-28e81736cdcf" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,c76d5eb6-ad0e-48fb-abee-28e81736cdcf.aspx</comments>
      <category>Microsoft .NET</category>
      <category>Silverlight</category>
      <category>WCF</category>
      <category>Workflow</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=1ce9b2ba-7caa-4653-8049-94099fa60727</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,1ce9b2ba-7caa-4653-8049-94099fa60727.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,1ce9b2ba-7caa-4653-8049-94099fa60727.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=1ce9b2ba-7caa-4653-8049-94099fa60727</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Someone on the CSLA .NET discussion forum recently asked what new .NET 3.5 features
I used in CSLA .NET 3.5. The poster noted that there are a lot of new features in
.NET 3.5, which is true. They also included some .NET 3.0 features as "new", though
really those features have now been around for 15 months or so and were addressed
in CSLA .NET 3.0. CSLA .NET 3.0 already added support for WCF, WPF and WF, so those
technologies had very little impact on CSLA .NET 3.5.
</p>
        <p>
My philosophy is to use new technologies only if they provide value to me and my work.
In the case of CSLA .NET this is extended slightly, such that I try to make sure CSLA
.NET also <em>supports</em> new technologies that might be of value to people who
use CSLA .NET.
</p>
        <p>
While .NET 3.5 has a number of new technologies at various levels (UI, data, languages),
many of them required no changes to CSLA to support. I like to think this is because
I'm always trying to look into the future as I work on CSLA, anticipating at least
some of what is coming so I can make the transition smoother. For example, this is
why CSLA .NET 2.0 introduced a provider model for the data portal - because I knew
WCF was coming in a couple years and I wanted to be ready.
</p>
        <p>
Since CSLA .NET already supported data binding to WPF, Windows Forms and Web Forms,
there was no real work to do at the UI level for .NET 3.5. I actually <em>removed</em> Csla.Wpf.Validator
because WPF now directly supplies that behavior, but I really didn't <em>add</em> anything
for UI support because it is already there. 
</p>
        <p>
Looking forward beyond 3.5, it is possible I'll need to add support for ASP.NET MVC
because that technology eschews data binding in favor of other techniques to create
the view - but it is too early to know for sure what I'll do in that regard.
</p>
        <p>
Since CSLA .NET has always abstracted the business object concept from the data access
technique you choose, it automatically supported LINQ to SQL (and will automatically
support ADO.NET EF too). No changes required to do that were required, though I did
add Csla.Data.ContextManager to simplify the use of L2S data context objects (as a
companion to the new Csla.Data.ConnectionManager for raw ADO.NET connections). And
I enhanced Csla.Data.DataMapper to have some more powerful mapping options that may
be useful in some L2S or EF scenarios.
</p>
        <p>
LINQ to Objects did require some work. Technically this too was optional, but I felt
it was critical, and so there is now "LINQ to CSLA" functionality provided in 3.5
(thanks to my colleague Aaron Erickson). The primary feature of this is creating a
synchronized view of a BusinessListBase list when you do a non-projection query, which
means you can data bind the results of a non-projection query and allow the user to
add/remove items from the query result <em>and those changes are also reflected in
the original list</em>. As a cool option, LINQ to CSLA also implements indexed queries
against lists, so if you are doing many queries against the same list object you should
look into this as a performance booster!
</p>
        <p>
So all that's left are some of the language enhancements that exist to support LINQ.
And I do use some of them - mostly type inference (which I love). But I didn't go
through the entire body of existing code to use the new language features. The risk
of breaking functionality that has worked for 6-7 years is <em>way</em> too high!
I can't see where anyone would choose to take such a risk with a body of code, but
especially one like CSLA that is used by thousands of people world-wide.
</p>
        <p>
That means I used some of the new language features in new code, and in code I had
to rework anyway. And to be honest, I use those features sparingly and where I thought
they helped. 
</p>
        <p>
I think trying to force new technologies/concepts/patterns into code is a bad idea.
If a given pattern or technology obviously saves code/time/money or has other clear
benefits then I use it, but I try never to get attached to some idea such that I force
it into places where it doesn't fit with my overall goals.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=1ce9b2ba-7caa-4653-8049-94099fa60727" />
      </body>
      <title>My philosophy on using new technologies</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,1ce9b2ba-7caa-4653-8049-94099fa60727.aspx</guid>
      <link>http://www.lhotka.net/weblog/MyPhilosophyOnUsingNewTechnologies.aspx</link>
      <pubDate>Sat, 12 Apr 2008 21:11:52 GMT</pubDate>
      <description>&lt;p&gt;
Someone on the CSLA .NET discussion forum recently asked what new .NET 3.5 features
I used in CSLA .NET 3.5. The poster noted that there are a lot of new features in
.NET 3.5, which is true. They also included some .NET 3.0 features as "new", though
really those features have now been around for 15 months or so and were addressed
in CSLA .NET 3.0. CSLA .NET 3.0 already added support for WCF, WPF and WF, so those
technologies had very little impact on CSLA .NET 3.5.
&lt;/p&gt;
&lt;p&gt;
My philosophy is to use new technologies only if they provide value to me and my work.
In the case of CSLA .NET this is extended slightly, such that I try to make sure CSLA
.NET also &lt;em&gt;supports&lt;/em&gt; new technologies that might be of value to people who
use CSLA .NET.
&lt;/p&gt;
&lt;p&gt;
While .NET 3.5 has a number of new technologies at various levels (UI, data, languages),
many of them required no changes to CSLA to support. I like to think this is because
I'm always trying to look into the future as I work on CSLA, anticipating at least
some of what is coming so I can make the transition smoother. For example, this is
why CSLA .NET 2.0 introduced a provider model for the data portal - because I knew
WCF was coming in a couple years and I wanted to be ready.
&lt;/p&gt;
&lt;p&gt;
Since CSLA .NET already supported data binding to WPF, Windows Forms and Web Forms,
there was no real work to do at the UI level for .NET 3.5. I actually &lt;em&gt;removed&lt;/em&gt; Csla.Wpf.Validator
because WPF now directly supplies that behavior, but I really didn't &lt;em&gt;add&lt;/em&gt; anything
for UI support because it is already there. 
&lt;/p&gt;
&lt;p&gt;
Looking forward beyond 3.5, it is possible I'll need to add support for ASP.NET MVC
because that technology eschews data binding in favor of other techniques to create
the view - but it is too early to know for sure what I'll do in that regard.
&lt;/p&gt;
&lt;p&gt;
Since CSLA .NET has always abstracted the business object concept from the data access
technique you choose, it automatically supported LINQ to SQL (and will automatically
support ADO.NET EF too). No changes required to do that were required, though I did
add Csla.Data.ContextManager to simplify the use of L2S data context objects (as a
companion to the new Csla.Data.ConnectionManager for raw ADO.NET connections). And
I enhanced Csla.Data.DataMapper to have some more powerful mapping options that may
be useful in some L2S or EF scenarios.
&lt;/p&gt;
&lt;p&gt;
LINQ to Objects did require some work. Technically this too was optional, but I felt
it was critical, and so there is now "LINQ to CSLA" functionality provided in 3.5
(thanks to my colleague Aaron Erickson). The primary feature of this is creating a
synchronized view of a BusinessListBase list when you do a non-projection query, which
means you can data bind the results of a non-projection query and allow the user to
add/remove items from the query result &lt;em&gt;and those changes are also reflected in
the original list&lt;/em&gt;. As a cool option, LINQ to CSLA also implements indexed queries
against lists, so if you are doing many queries against the same list object you should
look into this as a performance booster!
&lt;/p&gt;
&lt;p&gt;
So all that's left are some of the language enhancements that exist to support LINQ.
And I do use some of them - mostly type inference (which I love). But I didn't go
through the entire body of existing code to use the new language features. The risk
of breaking functionality that has worked for 6-7 years is &lt;em&gt;way&lt;/em&gt; too high!
I can't see where anyone would choose to take such a risk with a body of code, but
especially one like CSLA that is used by thousands of people world-wide.
&lt;/p&gt;
&lt;p&gt;
That means I used some of the new language features in new code, and in code I had
to rework anyway. And to be honest, I use those features sparingly and where I thought
they helped. 
&lt;/p&gt;
&lt;p&gt;
I think trying to force new technologies/concepts/patterns into code is a bad idea.
If a given pattern or technology obviously saves code/time/money or has other clear
benefits then I use it, but I try never to get attached to some idea such that I force
it into places where it doesn't fit with my overall goals.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=1ce9b2ba-7caa-4653-8049-94099fa60727" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,1ce9b2ba-7caa-4653-8049-94099fa60727.aspx</comments>
      <category>Architecture</category>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=6ac60906-da38-485b-937d-970378bc3eb8</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,6ac60906-da38-485b-937d-970378bc3eb8.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,6ac60906-da38-485b-937d-970378bc3eb8.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=6ac60906-da38-485b-937d-970378bc3eb8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have a question (helping a colleague do some research) for all .NET VB developers.
</p>
        <p>
Do you use late binding in VB? If so, how/why do you use it? What are the scenarios
where you find it of value?
</p>
        <p>
I'll start this off with my own observations:
</p>
        <p>
I use late binding when getting data of a given shape from unknown types. 
</p>
        <p>
For example, you can write a nice bit of reusable data access code that accepts data
from a web service, LINQ object, etc. by using late binding. You can’t easily do this
without late binding in fact, because the <i>types of the objects are different</i> even
though their shapes are the same. 
</p>
        <p>
That dynamic interface concept that got dropped from VB9 would address this issue
in a better way, but late binding makes it work too. 
</p>
        <p>
I also use late binding when creating some generic types. There are cases where generics
and casting are problematic, but converting a value to type Object first allows you
to do a cast or operation that wouldn’t otherwise be allowed. I don’t know if this
is “late binding” as such, but it is a useful technique! 
</p>
        <p>
I have used late binding when dynamically loading an assembly for interaction. Ideally
you’d require the assembly author to implement one of your interfaces, but that’s
not always possible, and late binding is a particularly nice way to get “polymorphic”
access to multiple assemblies that you don’t control. 
</p>
        <p>
What about you?
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=6ac60906-da38-485b-937d-970378bc3eb8" />
      </body>
      <title>Do you use VB late binding? If so, how?</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,6ac60906-da38-485b-937d-970378bc3eb8.aspx</guid>
      <link>http://www.lhotka.net/weblog/DoYouUseVBLateBindingIfSoHow.aspx</link>
      <pubDate>Sun, 16 Mar 2008 20:56:16 GMT</pubDate>
      <description>&lt;p&gt;
I have a question (helping a colleague do some research) for all .NET VB developers.
&lt;/p&gt;
&lt;p&gt;
Do you use late binding in VB? If so, how/why do you use it? What are the scenarios
where you find it of value?
&lt;/p&gt;
&lt;p&gt;
I'll start this off with my own observations:
&lt;/p&gt;
&lt;p&gt;
I use late binding when getting data of a given shape from unknown types. 
&lt;p&gt;
For example, you can write a nice bit of reusable data access code that accepts data
from a web service, LINQ object, etc. by using late binding. You can’t easily do this
without late binding in fact, because the &lt;i&gt;types of the objects are different&lt;/i&gt; even
though their shapes are the same. 
&lt;p&gt;
That dynamic interface concept that got dropped from VB9 would address this issue
in a better way, but late binding makes it work too. 
&lt;p&gt;
I also use late binding when creating some generic types. There are cases where generics
and casting are problematic, but converting a value to type Object first allows you
to do a cast or operation that wouldn’t otherwise be allowed. I don’t know if this
is “late binding” as such, but it is a useful technique! 
&lt;p&gt;
I have used late binding when dynamically loading an assembly for interaction. Ideally
you’d require the assembly author to implement one of your interfaces, but that’s
not always possible, and late binding is a particularly nice way to get “polymorphic”
access to multiple assemblies that you don’t control. 
&lt;p&gt;
What about you?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=6ac60906-da38-485b-937d-970378bc3eb8" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,6ac60906-da38-485b-937d-970378bc3eb8.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=cce56446-b1f5-46e2-ad41-b56804bb2f47</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,cce56446-b1f5-46e2-ad41-b56804bb2f47.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,cce56446-b1f5-46e2-ad41-b56804bb2f47.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=cce56446-b1f5-46e2-ad41-b56804bb2f47</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm just back from the <a href="http://visitmix.com/2008/">MIX 08</a> conference.
This was the first conference I've attended in many years (around 10 I think) where
I wasn't speaking or somehow working. I'd forgotten just how fun and inspiring it
can be to simply attend sessions and network with people in the open areas. No wonder
people come to conference!! :)
</p>
        <p>
Not that it was all fun and games. I did have meetings with some key Microsoft people
and Scott Hanselman interviewed me for an upcoming episode of <a href="http://www.hanselminutes.com/">Hanselminutes</a> (discussing
the various data access and ORM technologies and how they relate to CSLA .NET 3.5).
</p>
        <p>
The Day 1 keynote was everything I'd hoped for. 
</p>
        <p>
Well, nearly. The first part of the keynote was Ray Ozzie trying to convey how Microsoft
and the web got to where it is now. The goal was to show the vision they are pursuing
now and into the future, but I thought the whole segment was rather flat.
</p>
        <p>
But then <a href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a> came on stage
and <em>that</em> was everything you could hope for. Scott is a great guy, and his
dedication and openness seem unparalleled within Microsoft. I remember first meeting
him when ASP.NET was being unveiled. At that time he seemed so young and enthusiastic,
and he was basically just this kick-ass dev who'd created the core of something that
ultimately changed the Microsoft world. Today he seems nearly as young and easily
as enthusiastic, and he's overseeing most of the cool technologies that continue to
change the Microsoft world. Awesome!
</p>
        <p>
So ScottGu gets on stage and orchestrates a keynote that really illustrates the future
of the web. <a href="http://www.silverlight.net">Silverlight</a> (which makes me SOOoooo
happy!), IE8, new data access technologies (like we needed more, but they are still
cool!) and things like ASP.NET MVC and more.
</p>
        <p>
As I expected, they released a whole lot of beta code. You can get a full list with
links from <a href="http://blogs.msdn.com/tims/archive/2008/03/05/download-links-for-mix08-announcements.aspx">Tim
Sneath's blog</a>. He also has links to some <a href="http://blogs.msdn.com/tims/archive/2008/03/05/so-you-ve-installed-silverlight-2-beta-1-what-next.aspx">getting
started materials</a>.
</p>
        <p>
The real reason for keynotes though, is to inspire. And this keynote didn't disappoint.
The demos of Silverlight and related technologies were awesome! There was some funny
and cute banter with the casting director from Circ del Sole as she demonstrated using
a cool disconnected WPF app. There was a fellow RD, Scott Stanfield, showing integration
of SeaDragon into Silveright so we can look (in exquisite detail) at the memorabilia
owned by the Hard Rock Cafe company, some thought-provoking demos of Silverlight on
mobile devices and more.
</p>
        <p>
Now to be honest, I've never been a fan of the web development model. Having done
terminal-based programming for many years before coming to Windows, I find it hard
to get excited about returning to that ancient programming model. Well, a worse one
actually, because at least the mainframe/minicomputer world had decent state management...
</p>
        <p>
AJAX helps, but the browser makes for a pretty lame programming platform. It is more
comparable perhaps to an Apple II or a Commodore 64 than to a modern environment,
and that's before you get into the inconsistencies across browsers and that whole
mess. Yuck!
</p>
        <p>
Which is why Silverlight is so darn cool! Silverlight 2.0 is really a way to do smart
client development with a true web deployment model. Much of the power of .NET and
WPF/XAML, with the transparent deployment and cross-platform capabilities of the browser
world. THIS is impressive stuff. To me Silverlight represents the real future of the
web.
</p>
        <p>
It should come as no surprise then, that I spent my time in Silverlight 2.0 sessions
after the keynote. Sure, I've been working (on and off) with Silverlight 1.1/2.0 for
the past several months, but it was a lot of fun to see presentations by great speakers
like <a href="http://blogs.msdn.com/jstegman/">Joe Stegman</a> (a Microsoft PM) and
various other people. 
</p>
        <p>
One of the best sessions was on game development with Silverlight. I dabble in game
development whenever I have spare time (not nearly as much as I'd like), and so the
talk was interesting from that perspective. But many of the concepts and techniques
they used in their games are things designers and developers will likely use in many
other types of application. Background loading of assemblies and content while the
app is running, and some clever animation techniques using pure XAML-based concepts
(as opposed to some other animation techniques I saw that use custom controls written
in C#/VB - which isn't bad, but it was fun to see the pure-XAML approaches).
</p>
        <p>
Many people have asked about "CSLA Light", my planned version of <a href="http://www.lhotka.net/cslanet">CSLA
.NET</a> for Silverlight. Now that we have a Beta 1 of Silverlight I'll be working
on a public release of CSLA Light, based on CSLA .NET 3.5. Microsoft has put a lot
more functionality into Silverlight 2.0 than they'd originally planned - things like
data binding, reflection and other key concepts are directly supported. This means
that the majority of CSLA can be ported (with some work) into Silverlight. The data
portal is the one big sticking point, and I'm sure that'll be the topic of future
blog posts.
</p>
        <p>
My goal is to support the CSLA .NET 3.5 syntax for property declaration and other
coding constructs such that with little or no change you can take a business class
from full CSLA and have it work in CSLA Light. This goal excludes the DataPortal_XZY
implementations - those will almost always be different, though if you plan ahead
and use a DTO-based data access model even that code may be the same. Of course time
will tell how closely I'll meet this goal - but given my work with pre-beta Silverlight
2.0 code I think it is pretty realistic.
</p>
        <p>
Scott Guthrie indicated that Silverlight 2.0 Beta 1 has a non-commercial go-live license
- right now. And that Beta 2 would be in Q2 (I'm guessing June) and would have a commercial
go-live license, meaning it can be used for real work in any context. 
</p>
        <p>
The future of the web is Silverlight, and Beta 1 is the start of that future. 2008
is going to be a great year!
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=cce56446-b1f5-46e2-ad41-b56804bb2f47" />
      </body>
      <title>Thoughts on MIX 08</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,cce56446-b1f5-46e2-ad41-b56804bb2f47.aspx</guid>
      <link>http://www.lhotka.net/weblog/ThoughtsOnMIX08.aspx</link>
      <pubDate>Sun, 09 Mar 2008 11:18:27 GMT</pubDate>
      <description>&lt;p&gt;
I'm just back from the &lt;a href="http://visitmix.com/2008/"&gt;MIX 08&lt;/a&gt; conference.
This was the first conference I've attended in many years (around 10 I think) where
I wasn't speaking or somehow working. I'd forgotten just how fun and inspiring it
can be to simply attend sessions and network with people in the open areas. No wonder
people come to conference!! :)
&lt;/p&gt;
&lt;p&gt;
Not that it was all fun and games. I did have meetings with some key Microsoft people
and Scott Hanselman interviewed me for an upcoming episode of &lt;a href="http://www.hanselminutes.com/"&gt;Hanselminutes&lt;/a&gt; (discussing
the various data access and ORM technologies and how they relate to CSLA .NET 3.5).
&lt;/p&gt;
&lt;p&gt;
The Day 1 keynote was everything I'd hoped for. 
&lt;/p&gt;
&lt;p&gt;
Well, nearly. The first part of the keynote was Ray Ozzie trying to convey how Microsoft
and the web got to where it is now. The goal was to show the vision they are pursuing
now and into the future, but I thought the whole segment was rather flat.
&lt;/p&gt;
&lt;p&gt;
But then &lt;a href="http://weblogs.asp.net/scottgu/"&gt;Scott Guthrie&lt;/a&gt; came on stage
and &lt;em&gt;that&lt;/em&gt; was everything you could hope for. Scott is a great guy, and his
dedication and openness seem unparalleled within Microsoft. I remember first meeting
him when ASP.NET was being unveiled. At that time he seemed so young and enthusiastic,
and he was basically just this kick-ass dev who'd created the core of something that
ultimately changed the Microsoft world. Today he seems nearly as young and easily
as enthusiastic, and he's overseeing most of the cool technologies that continue to
change the Microsoft world. Awesome!
&lt;/p&gt;
&lt;p&gt;
So ScottGu gets on stage and orchestrates a keynote that really illustrates the future
of the web. &lt;a href="http://www.silverlight.net"&gt;Silverlight&lt;/a&gt; (which makes me SOOoooo
happy!), IE8, new data access technologies (like we needed more, but they are still
cool!) and things like ASP.NET MVC and more.
&lt;/p&gt;
&lt;p&gt;
As I expected, they released a whole lot of beta code. You can get a full list with
links from &lt;a href="http://blogs.msdn.com/tims/archive/2008/03/05/download-links-for-mix08-announcements.aspx"&gt;Tim
Sneath's blog&lt;/a&gt;. He also has links to some &lt;a href="http://blogs.msdn.com/tims/archive/2008/03/05/so-you-ve-installed-silverlight-2-beta-1-what-next.aspx"&gt;getting
started materials&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
The real reason for keynotes though, is to inspire. And this keynote didn't disappoint.
The demos of Silverlight and related technologies were awesome! There was some funny
and cute banter with the casting director from Circ del Sole as she demonstrated using
a cool disconnected WPF app. There was a fellow RD, Scott Stanfield, showing integration
of SeaDragon into Silveright so we can look (in exquisite detail) at the memorabilia
owned by the Hard Rock Cafe company, some thought-provoking demos of Silverlight on
mobile devices and more.
&lt;/p&gt;
&lt;p&gt;
Now to be honest, I've never been a fan of the web development model. Having done
terminal-based programming for many years before coming to Windows, I find it hard
to get excited about returning to that ancient programming model. Well, a worse one
actually, because at least the mainframe/minicomputer world had decent state management...
&lt;/p&gt;
&lt;p&gt;
AJAX helps, but the browser makes for a pretty lame programming platform. It is more
comparable perhaps to an Apple II or a Commodore 64 than to a modern environment,
and that's before you get into the inconsistencies across browsers and that whole
mess. Yuck!
&lt;/p&gt;
&lt;p&gt;
Which is why Silverlight is so darn cool! Silverlight 2.0 is really a way to do smart
client development with a true web deployment model. Much of the power of .NET and
WPF/XAML, with the transparent deployment and cross-platform capabilities of the browser
world. THIS is impressive stuff. To me Silverlight represents the real future of the
web.
&lt;/p&gt;
&lt;p&gt;
It should come as no surprise then, that I spent my time in Silverlight 2.0 sessions
after the keynote. Sure, I've been working (on and off) with Silverlight 1.1/2.0 for
the past several months, but it was a lot of fun to see presentations by great speakers
like &lt;a href="http://blogs.msdn.com/jstegman/"&gt;Joe Stegman&lt;/a&gt; (a Microsoft PM) and
various other people. 
&lt;/p&gt;
&lt;p&gt;
One of the best sessions was on game development with Silverlight. I dabble in game
development whenever I have spare time (not nearly as much as I'd like), and so the
talk was interesting from that perspective. But many of the concepts and techniques
they used in their games are things designers and developers will likely use in many
other types of application. Background loading of assemblies and content while the
app is running, and some clever animation techniques using pure XAML-based concepts
(as opposed to some other animation techniques I saw that use custom controls written
in C#/VB - which isn't bad, but it was fun to see the pure-XAML approaches).
&lt;/p&gt;
&lt;p&gt;
Many people have asked about "CSLA Light", my planned version of &lt;a href="http://www.lhotka.net/cslanet"&gt;CSLA
.NET&lt;/a&gt; for Silverlight. Now that we have a Beta 1 of Silverlight I'll be working
on a public release of CSLA Light, based on CSLA .NET 3.5. Microsoft has put a lot
more functionality into Silverlight 2.0 than they'd originally planned - things like
data binding, reflection and other key concepts are directly supported. This means
that the majority of CSLA can be ported (with some work) into Silverlight. The data
portal is the one big sticking point, and I'm sure that'll be the topic of future
blog posts.
&lt;/p&gt;
&lt;p&gt;
My goal is to support the CSLA .NET 3.5 syntax for property declaration and other
coding constructs such that with little or no change you can take a business class
from full CSLA and have it work in CSLA Light. This goal excludes the DataPortal_XZY
implementations - those will almost always be different, though if you plan ahead
and use a DTO-based data access model even that code may be the same. Of course time
will tell how closely I'll meet this goal - but given my work with pre-beta Silverlight
2.0 code I think it is pretty realistic.
&lt;/p&gt;
&lt;p&gt;
Scott Guthrie indicated that Silverlight 2.0 Beta 1 has a non-commercial go-live license
- right now. And that Beta 2 would be in Q2 (I'm guessing June) and would have a commercial
go-live license, meaning it can be used for real work in any context. 
&lt;/p&gt;
&lt;p&gt;
The future of the web is Silverlight, and Beta 1 is the start of that future. 2008
is going to be a great year!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=cce56446-b1f5-46e2-ad41-b56804bb2f47" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,cce56446-b1f5-46e2-ad41-b56804bb2f47.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
      <category>Web</category>
      <category>WPF</category>
      <category>Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=d9db6f2a-7522-4bb0-acd3-8d5d3e03ba84</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,d9db6f2a-7522-4bb0-acd3-8d5d3e03ba84.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,d9db6f2a-7522-4bb0-acd3-8d5d3e03ba84.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=d9db6f2a-7522-4bb0-acd3-8d5d3e03ba84</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've been working all day on this WPF/WCF application, mostly trying to figure out
how to configure WCF to actually do what I want in terms of security and authentication.
All those angle brackets from the config files have given me a splitting headache...
WCF may be cool, but configuring even relatively simple security scenarios is ridiculously
difficult.
</p>
        <p>
And then distaster struck. As though fighting with WCF and SSL wasn't enough, VS 2008
decided to quit publishing my app for ClickOnce. In order to test this app, I need
to publish for ClickOnce on my dev box, copy the results to a test server and then
run the code on a test client (thankfully we live in an age of virtual machines!!).
</p>
        <p>
So the failure to publish to ClickOnce brought me up short. The issue is that the
WPF project wouldn't build. It would build and run fine in all other ways, but not
when I tried to publish for ClickOnce. It <em>had been publishing</em> just fine,
and then BOOM!
</p>
        <p>
(The only thing I can think of is that I was publishing for online only, then I published
for online/offline, and then I switched back to online only - maybe VS doesn't like
that sort of waffling and wants me to be more decisive?)
</p>
        <p>
The specific problem is that the .g.i.cs files for each XAML source file that should
have been in the obj\Debug directory didn't get there. Google was no help - searching
for "clickonce publish .g.i.cs obj\Debug could not be found" resulted in one hit -
to an MSDN forums post that was unreachable (I kept getting an MSDN forums error page).
</p>
        <p>
          <em>Build|Clean Solution</em> had no effect. Shutting down and reopening VS had no
effect. Rebooting the dev box had no effect.
</p>
        <p>
Finally I thought to manually delete the obj and bin folders in the project directory.
And for good measure I deleted the .user file and .suo file for the project and solution.
Then I reopened the project and it how publishes just fine.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=d9db6f2a-7522-4bb0-acd3-8d5d3e03ba84" />
      </body>
      <title>ClickOnce and WFP publish failure (and solution)</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,d9db6f2a-7522-4bb0-acd3-8d5d3e03ba84.aspx</guid>
      <link>http://www.lhotka.net/weblog/ClickOnceAndWFPPublishFailureAndSolution.aspx</link>
      <pubDate>Wed, 19 Dec 2007 23:10:22 GMT</pubDate>
      <description>&lt;p&gt;
I've been working all day on this WPF/WCF application, mostly trying to figure out
how to configure WCF to actually do what I want in terms of security and authentication.
All those angle brackets from the config files have given me a splitting headache...
WCF may be cool, but configuring even relatively simple security scenarios is ridiculously
difficult.
&lt;/p&gt;
&lt;p&gt;
And then distaster struck. As though fighting with WCF and SSL wasn't enough, VS 2008
decided to quit publishing my app for ClickOnce. In order to test this app, I need
to publish for ClickOnce on my dev box, copy the results to a test server and then
run the code on a test client (thankfully we live in an age of virtual machines!!).
&lt;/p&gt;
&lt;p&gt;
So the failure to publish to ClickOnce brought me up short. The issue is that the
WPF project wouldn't build. It would build and run fine in all other ways, but not
when I tried to publish for ClickOnce. It &lt;em&gt;had been publishing&lt;/em&gt; just fine,
and then BOOM!
&lt;/p&gt;
&lt;p&gt;
(The only thing I can think of is that I was publishing for online only, then I published
for online/offline, and then I switched back to online only - maybe VS doesn't like
that sort of waffling and wants me to be more decisive?)
&lt;/p&gt;
&lt;p&gt;
The specific problem is that the .g.i.cs files for each XAML source file that should
have been in the obj\Debug directory didn't get there. Google was no help - searching
for "clickonce publish .g.i.cs obj\Debug could not be found" resulted in one hit -
to an MSDN forums post that was unreachable (I kept getting an MSDN forums error page).
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Build|Clean Solution&lt;/em&gt; had no effect. Shutting down and reopening VS had no
effect. Rebooting the dev box had no effect.
&lt;/p&gt;
&lt;p&gt;
Finally I thought to manually delete the obj and bin folders in the project directory.
And for good measure I deleted the .user file and .suo file for the project and solution.
Then I reopened the project and it how publishes just fine.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=d9db6f2a-7522-4bb0-acd3-8d5d3e03ba84" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,d9db6f2a-7522-4bb0-acd3-8d5d3e03ba84.aspx</comments>
      <category>Microsoft .NET</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=b47b2a30-201b-4b65-b8b7-d66aca2edf98</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,b47b2a30-201b-4b65-b8b7-d66aca2edf98.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,b47b2a30-201b-4b65-b8b7-d66aca2edf98.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=b47b2a30-201b-4b65-b8b7-d66aca2edf98</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I rather expected this - a bit of confusion around .NET versions and related CSLA
.NET versions.
</p>
        <p>
Microsoft started the whole thing by calling .NET 2.5 version 3.0. Oops, did I say
that out loud? :)
</p>
        <p>
But it is true. From a .NET programming perspective, 3.0 is purely additive over 2.0.
Thus it is really hard to see why it is a major version.
</p>
        <p>
          <em>Especially</em> when .NET 3.5 has a much bigger impact on day-to-day use of .NET,
but is just a point release... If anything, this should have been .NET 4.0, but it
isn't and so now we're all royally stuck in the land of confusion.
</p>
        <p>
Nothing to do but make the best of it.
</p>
        <p>
I know several people and organizations who ignored .NET 3.0, but are now looking
to move to .NET 3.5. Effectively "skipping" 3.0, though the reality is that their
move to 3.5 is also a move to 3.0. Personally I think that's smart - they saved themselves a
year of pain by not trying to use .NET 3.0 with the limited tools available, and can
now move to 3.0/3.5 with Visual Studio 2008 - so they have decent tool support for
the technology.
</p>
        <p>
When it comes to CSLA .NET, here's my take on it:
</p>
        <ul>
          <li>
CSLA .NET 1.5.3 - latest version for .NET 1.x</li>
          <li>
CSLA .NET 2.1.4 - effectively obsolete</li>
          <li>
CSLA .NET 3.0.3 - latest version for .NET 2.0 <em>and</em> .NET 3.0</li>
          <li>
CSLA .NET 3.5.0 - in-progress version supporting .NET 3.5</li>
        </ul>
        <p>
At this time I do not anticipate being able to make CSLA 3.5 work without .NET 3.5,
primarily due to use of new compiler features as well as LINQ and features in .NET
2.0a and 3.0a (aka .NET 2.0 SP1 and 3.0 SP1).
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=b47b2a30-201b-4b65-b8b7-d66aca2edf98" />
      </body>
      <title>Microsoft .NET and CSLA .NET version confusion</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,b47b2a30-201b-4b65-b8b7-d66aca2edf98.aspx</guid>
      <link>http://www.lhotka.net/weblog/MicrosoftNETAndCSLANETVersionConfusion.aspx</link>
      <pubDate>Fri, 07 Dec 2007 20:29:51 GMT</pubDate>
      <description>&lt;p&gt;
I rather expected this - a bit of confusion around .NET versions and related CSLA
.NET versions.
&lt;/p&gt;
&lt;p&gt;
Microsoft started the whole thing by calling .NET 2.5 version 3.0. Oops, did I say
that out loud? :)
&lt;/p&gt;
&lt;p&gt;
But it is true. From a .NET programming perspective, 3.0 is purely additive over 2.0.
Thus it is really hard to see why it is a major version.
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Especially&lt;/em&gt; when .NET 3.5 has a much bigger impact on day-to-day use of .NET,
but is just a point release... If anything, this should have been .NET 4.0, but it
isn't and so now we're all royally stuck in the land of confusion.
&lt;/p&gt;
&lt;p&gt;
Nothing to do but make the best of it.
&lt;/p&gt;
&lt;p&gt;
I know several people and organizations who ignored .NET 3.0, but are now looking
to move to .NET 3.5. Effectively "skipping" 3.0, though the reality is that their
move to 3.5 is also a move to 3.0. Personally I think that's smart - they saved themselves&amp;nbsp;a
year of pain by not trying to use .NET 3.0 with the limited tools available, and can
now move to 3.0/3.5 with Visual Studio 2008 - so they have decent tool support for
the technology.
&lt;/p&gt;
&lt;p&gt;
When it comes to CSLA .NET, here's my take on it:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
CSLA .NET 1.5.3 - latest version for .NET 1.x&lt;/li&gt;
&lt;li&gt;
CSLA .NET 2.1.4&amp;nbsp;- effectively obsolete&lt;/li&gt;
&lt;li&gt;
CSLA .NET 3.0.3 - latest version for .NET 2.0 &lt;em&gt;and&lt;/em&gt; .NET 3.0&lt;/li&gt;
&lt;li&gt;
CSLA .NET 3.5.0 - in-progress version supporting .NET 3.5&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
At this time I do not anticipate being able to make CSLA 3.5 work without .NET 3.5,
primarily due to use of new compiler features as well as LINQ and features in .NET
2.0a and 3.0a (aka .NET 2.0 SP1 and 3.0 SP1).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=b47b2a30-201b-4b65-b8b7-d66aca2edf98" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,b47b2a30-201b-4b65-b8b7-d66aca2edf98.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=0721ff6a-8705-4e3d-b61a-9a52ec89de51</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,0721ff6a-8705-4e3d-b61a-9a52ec89de51.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,0721ff6a-8705-4e3d-b61a-9a52ec89de51.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=0721ff6a-8705-4e3d-b61a-9a52ec89de51</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Visual Studio 2008 Beta 2, along with Microsoft .NET 3.5 Beta 2, is available for
download. Here's Soma's <a href="http://blogs.msdn.com/somasegar/archive/2007/07/26/announcing-the-release-of-visual-studio-2008-beta-2-net-fx-3-5-beta-2-and-silverlight-1-0-rc.aspx">official
announcement</a>.
</p>
        <p>
I find that downloading such huge sets of files requires a bit of help. My recommendation: <a href="http://www.freedownloadmanager.org">Free
Download Manager</a>. This tool is awesome - indispensable in fact - if you do any
downloads beyond small text files :) It does queued downloads, resumed downloads and
throttling. Perhaps best of all, it does multi-threaded downloads, so it maximizes
the use of your bandwidth when running at full throttle.
</p>
        <p>
          <strong>Update: </strong>Apparently there are some things you must do/fix before using
VS 2008!! Read <a href="http://weblogs.asp.net/scottgu/archive/2007/07/26/vs-2008-and-net-3-5-beta-2-released.aspx">ScottGu's
blog post</a> about it!
</p>
        <p>
          <strong>Update 2:</strong> According to Juval Lowy, the svcutil.exe program in Beta
2 is broken. <strike>A workaround is to copy an older (Beta 1?) version of svcutil.exe
over the top of the Beta 2 version.</strike>  <em>Instead, Justin Smith says
that you need to run "sn.exe -Vr svcutil.exe" - apparently then you don't need
to copy an older verison over the new one.</em></p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=0721ff6a-8705-4e3d-b61a-9a52ec89de51" />
      </body>
      <title>Visual Studio 2008 Beta 2 and .NET FX 3.5 Beta 2 are available now!</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,0721ff6a-8705-4e3d-b61a-9a52ec89de51.aspx</guid>
      <link>http://www.lhotka.net/weblog/VisualStudio2008Beta2AndNETFX35Beta2AreAvailableNow.aspx</link>
      <pubDate>Thu, 26 Jul 2007 21:21:37 GMT</pubDate>
      <description>&lt;p&gt;
Visual Studio 2008 Beta 2, along with Microsoft .NET 3.5 Beta 2, is available for
download. Here's Soma's &lt;a href="http://blogs.msdn.com/somasegar/archive/2007/07/26/announcing-the-release-of-visual-studio-2008-beta-2-net-fx-3-5-beta-2-and-silverlight-1-0-rc.aspx"&gt;official
announcement&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I find that downloading such huge sets of files requires a bit of help. My recommendation: &lt;a href="http://www.freedownloadmanager.org"&gt;Free
Download Manager&lt;/a&gt;. This tool is awesome - indispensable in fact - if you do any
downloads beyond small text files :) It does queued downloads, resumed downloads and
throttling. Perhaps best of all, it does multi-threaded downloads, so it maximizes
the use of your bandwidth when running at full throttle.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update: &lt;/strong&gt;Apparently there are some things you must do/fix before using
VS 2008!! Read &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/07/26/vs-2008-and-net-3-5-beta-2-released.aspx"&gt;ScottGu's
blog post&lt;/a&gt; about it!
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update 2:&lt;/strong&gt; According to Juval Lowy, the svcutil.exe program in Beta
2 is broken. &lt;strike&gt;A workaround is to copy an older (Beta 1?) version of svcutil.exe
over the top of the Beta 2 version.&lt;/strike&gt;&amp;nbsp; &lt;em&gt;Instead, Justin Smith says
that you need to run "sn.exe -Vr svcutil.exe"&amp;nbsp;- apparently then you don't need
to copy an older verison over the new one.&lt;/em&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=0721ff6a-8705-4e3d-b61a-9a52ec89de51" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,0721ff6a-8705-4e3d-b61a-9a52ec89de51.aspx</comments>
      <category>Microsoft .NET</category>
      <category>News</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=1b2ac299-bbfb-488f-a58d-70aa583bd115</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,1b2ac299-bbfb-488f-a58d-70aa583bd115.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,1b2ac299-bbfb-488f-a58d-70aa583bd115.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=1b2ac299-bbfb-488f-a58d-70aa583bd115</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I <a href="http://www.lhotka.net/weblog/WCFNetDataContractSerializerAndSecurityException.aspx">posted
previously </a>about an issue where the WCF NetDataContractSerializer was unable to
serialize a SecurityException object. Microsoft provided some insight.
</p>
        <p>
It turns out that the constructor of the SerializationException object doesn't set
the Action property to anything valid. Before you can serialize a SerializationException
with NDCS you must explicitly set the Action property to a valid SecurityAction.
</p>
        <p>
This <em>does mean</em> that NDCS is not compatible with the BinaryFormatter in this
case, but at least there's a workaround/solution.
</p>
        <p>
I've now updated CSLA .NET 3.0 to explicitly set the Action property any time a SecurityException
is thrown, thus allowing the WCF data portal channel to return valid details about
the nature of any exception.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=1b2ac299-bbfb-488f-a58d-70aa583bd115" />
      </body>
      <title>Resolution to the NetDataContract/SerializationException issue</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,1b2ac299-bbfb-488f-a58d-70aa583bd115.aspx</guid>
      <link>http://www.lhotka.net/weblog/ResolutionToTheNetDataContractSerializationExceptionIssue.aspx</link>
      <pubDate>Mon, 11 Jun 2007 15:07:53 GMT</pubDate>
      <description>&lt;p&gt;
I &lt;a href="http://www.lhotka.net/weblog/WCFNetDataContractSerializerAndSecurityException.aspx"&gt;posted
previously &lt;/a&gt;about an issue where the WCF NetDataContractSerializer was unable to
serialize a SecurityException object. Microsoft provided some insight.
&lt;/p&gt;
&lt;p&gt;
It turns out that the constructor of the SerializationException object doesn't set
the Action property to anything valid. Before you can serialize a SerializationException
with NDCS you must explicitly set the Action property to a valid SecurityAction.
&lt;/p&gt;
&lt;p&gt;
This &lt;em&gt;does mean&lt;/em&gt; that NDCS is not compatible with the BinaryFormatter in this
case, but at least there's a workaround/solution.
&lt;/p&gt;
&lt;p&gt;
I've now updated CSLA .NET 3.0 to explicitly set the Action property any time a SecurityException
is thrown, thus allowing the WCF data portal channel to return valid details about
the nature of any exception.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=1b2ac299-bbfb-488f-a58d-70aa583bd115" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,1b2ac299-bbfb-488f-a58d-70aa583bd115.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
      <category>WCF</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=180a1aff-fb67-4555-9c80-ee1f0844309b</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,180a1aff-fb67-4555-9c80-ee1f0844309b.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,180a1aff-fb67-4555-9c80-ee1f0844309b.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=180a1aff-fb67-4555-9c80-ee1f0844309b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The WCF NetDataContractSerializer is an almost, but not quite perfect, replacement
for the BinaryFormatter. 
</p>
        <p>
The NDCS is very important, because without it WCF could never be viewed as a logical
upgrade path for either Remoting or Enterprise Services users. Both Remoting and Enterprise
Services use the BinaryFormatter to serialize objects and data for movement across
AppDomain, process or network boundaries.
</p>
        <p>
Very clearly, since WCF is the upgrade path for these core technologies, it had to
include a serialization technology that was functionally equivalent to the BinaryFormatter,
and that is the NDCS. The NDCS is very cool, because it honors both the Serializable
model and the DataContract model, and even allows you to mix them within a single
object graph.
</p>
        <p>
Unfortunately I have run into a serious issue, where the NDCS is not able to serialize
the System.Security.SecurityException type, while the BinaryFormatter has no issue
with it.
</p>
        <p>
The issue shows up in CSLA in the data portal, because it is quite possible for the
server to throw a SecurityException. You'd like to get that detail back on the client
so you can tell the user why the server call failed, but instead you get a "connection
unexpectedly closed" exception instead. The reason is that WCF itself blew up when
trying to serialize the SecurityException to return it to the client. So rather than
getting any meaningful result, the client gets this vague and nearly useless exception
instead.
</p>
        <p>
By the way, if you want to see the failure, just run this code:
</p>
        <p>
    Dim buffer As New System.IO.MemoryStream<br />
    Dim formatter As New System.Runtime.Serialization.NetDataContractSerializer<br />
    Dim ex As New System.Security.SecurityException("a test")<br />
    formatter.Serialize(buffer, ex)
</p>
        <p>
And if you want to see it not fail run this code:
</p>
        <p>
    Dim buffer As New System.IO.MemoryStream<br />
    Dim formatter As New System.Runtime.Serialization.Formatters.Binary.BinaryFormatter<br />
    Dim ex As New System.Security.SecurityException("a test")<br />
    formatter.Serialize(buffer, ex)
</p>
        <p>
I've been doing a lot of work with the NDCS over the past several months. And this
is the first time I've encountered a single case where NDCS didn't mirror the behavior
of the BinaryFormatter - which is why I do think this is a WCF bug. Now just to get
it acknowledged by someone at Microsoft so it can hopefully get fixed in the future...
</p>
        <p>
The immediate issue I face is that I'm not entirely sure how to resolve this issue
in the data portal. One (somewhat ugly) solution is to catch all exceptions (which
I actually do anyway), and then scan the object graph that is about to be returned
to the client to see if there's a SecurityException in the graph. If so perhaps I
could manually invoke the BinaryFormatter and just return a byte array. The problem
with that is in the case where the object graph is a mix of Serializable and DataContract
objects - in which case the BinaryFormatter won't work because it doesn't understand
DataContract...
</p>
        <p>
In the end I may just have to leave it be, and people will need to be aware that they
can never throw a SecurityException from the server...
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=180a1aff-fb67-4555-9c80-ee1f0844309b" />
      </body>
      <title>WCF NetDataContractSerializer and SecurityException</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,180a1aff-fb67-4555-9c80-ee1f0844309b.aspx</guid>
      <link>http://www.lhotka.net/weblog/WCFNetDataContractSerializerAndSecurityException.aspx</link>
      <pubDate>Fri, 01 Jun 2007 17:34:14 GMT</pubDate>
      <description>&lt;p&gt;
The WCF NetDataContractSerializer is an almost, but not quite perfect, replacement
for the BinaryFormatter. 
&lt;/p&gt;
&lt;p&gt;
The NDCS is very important, because without it WCF could never be viewed as a logical
upgrade path for either Remoting or Enterprise Services users. Both Remoting and Enterprise
Services use the BinaryFormatter to serialize objects and data for movement across
AppDomain, process or network boundaries.
&lt;/p&gt;
&lt;p&gt;
Very clearly, since WCF is the upgrade path for these core technologies, it had to
include a serialization technology that was functionally equivalent to the BinaryFormatter,
and that is the NDCS. The NDCS is very cool, because it honors both the Serializable
model and the DataContract model, and even allows you to mix them within a single
object graph.
&lt;/p&gt;
&lt;p&gt;
Unfortunately I have run into a serious issue, where the NDCS is not able to serialize
the System.Security.SecurityException type, while the BinaryFormatter has no issue
with it.
&lt;/p&gt;
&lt;p&gt;
The issue shows up in CSLA in the data portal, because it is quite possible for the
server to throw a SecurityException. You'd like to get that detail back on the client
so you can tell the user why the server call failed, but instead you get a "connection
unexpectedly closed" exception instead. The reason is that WCF itself blew up when
trying to serialize the SecurityException to return it to the client. So rather than
getting any meaningful result, the client gets this vague and nearly useless exception
instead.
&lt;/p&gt;
&lt;p&gt;
By the way, if you want to see the failure, just run this code:
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim buffer As New System.IO.MemoryStream&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim formatter As New System.Runtime.Serialization.NetDataContractSerializer&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ex As New System.Security.SecurityException("a test")&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formatter.Serialize(buffer, ex)
&lt;/p&gt;
&lt;p&gt;
And if you want to see it not fail run this code:
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim buffer As New System.IO.MemoryStream&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim formatter As New System.Runtime.Serialization.Formatters.Binary.BinaryFormatter&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ex As New System.Security.SecurityException("a test")&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formatter.Serialize(buffer, ex)
&lt;/p&gt;
&lt;p&gt;
I've been doing a lot of work with the NDCS over the past several months. And this
is the first time I've encountered a single case where NDCS didn't mirror the behavior
of the BinaryFormatter - which is why I do think this is a WCF bug. Now just to get
it acknowledged by someone at Microsoft so it can hopefully get fixed in the future...
&lt;/p&gt;
&lt;p&gt;
The immediate issue I face is that I'm not entirely sure how to resolve this issue
in the data portal. One (somewhat ugly) solution is to catch all exceptions (which
I actually do anyway), and then scan the object graph that is about to be returned
to the client to see if there's a SecurityException in the graph. If so perhaps I
could manually invoke the BinaryFormatter and just return a byte array. The problem
with that is in the case where the object graph is a mix of Serializable and DataContract
objects - in which case the BinaryFormatter won't work because it doesn't understand
DataContract...
&lt;/p&gt;
&lt;p&gt;
In the end I may just have to leave it be, and people will need to be aware that they
can never throw a SecurityException from the server...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=180a1aff-fb67-4555-9c80-ee1f0844309b" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,180a1aff-fb67-4555-9c80-ee1f0844309b.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
      <category>Service-Oriented</category>
      <category>WCF</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=36b5ff87-f151-4ac6-9d44-5eac31094d75</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,36b5ff87-f151-4ac6-9d44-5eac31094d75.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,36b5ff87-f151-4ac6-9d44-5eac31094d75.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=36b5ff87-f151-4ac6-9d44-5eac31094d75</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Earlier <a href="http://www.lhotka.net/weblog/OrcasBeta1ASPNETNotEnabledByDefault.aspx">I
blogged</a> about the fact that the <a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx">Orcas
Beta 1 VPC image</a> doesn't have ASP.NET set up with IIS, so you have to do that.
Unfortunately there are a couple other issues I've discovered. Here's the full list:
</p>
        <ol>
          <li>
IIS isn't configured for ASP.NET</li>
          <li>
Windows authentication isn't enabled for the default web site in IIS - blocking the
use of VS debugging until you enable it</li>
          <li>
The default for a VS Orcas web site is to build for .NET 3.5. If you attempt to debug
such a project (when it is set to run in IIS) you'll get an error dialog with a vague
message about an authentication error. The reason for this is that ASP.NET only supports
.NET 2.0. To resolve this, you must go into the web site's properties dialog and set
its target .NET version to 2.0. You can still reference the 3.0 and 3.5 assemblies
and use the new features, but VS must <em>build to .NET 2.0</em> or you can't debug
in IIS. 
<br /><br />
But it isn't just the debugger - other features may not work properly either, possibly
resulting in a "hang" when you try to access a page.</li>
        </ol>
        <p>
For those of you at my workshop at <a href="http://www.vslive.com">VS Live</a> this
past Sunday, this was why my web site wouldn't run properly in the VPC. Fortunately
there is this workaround, but I hope Microsoft provides a more comprehensive solution
in the release version, because it is quite confusing to have to set your build version
back to 2.0 even though you are really building against 3.5...
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=36b5ff87-f151-4ac6-9d44-5eac31094d75" />
      </body>
      <title>More on VS Orcas Beta 1 VPC and ASP.NET</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,36b5ff87-f151-4ac6-9d44-5eac31094d75.aspx</guid>
      <link>http://www.lhotka.net/weblog/MoreOnVSOrcasBeta1VPCAndASPNET.aspx</link>
      <pubDate>Fri, 11 May 2007 15:01:33 GMT</pubDate>
      <description>&lt;p&gt;
Earlier &lt;a href="http://www.lhotka.net/weblog/OrcasBeta1ASPNETNotEnabledByDefault.aspx"&gt;I
blogged&lt;/a&gt; about the fact that the &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx"&gt;Orcas
Beta 1 VPC image&lt;/a&gt; doesn't have ASP.NET set up with IIS, so you have to do that.
Unfortunately there are a couple other issues I've discovered. Here's the full list:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
IIS isn't configured for ASP.NET&lt;/li&gt;
&lt;li&gt;
Windows authentication isn't enabled for the default web site in IIS - blocking the
use of VS debugging until you enable it&lt;/li&gt;
&lt;li&gt;
The default for a VS Orcas web site is to build for .NET 3.5. If you attempt to debug
such a project (when it is set to run in IIS) you'll get an error dialog with a vague
message about an authentication error. The reason for this is that ASP.NET only supports
.NET 2.0. To resolve this, you must go into the web site's properties dialog and set
its target .NET version to 2.0. You can still reference the 3.0 and 3.5 assemblies
and use the new features, but VS must &lt;em&gt;build to .NET 2.0&lt;/em&gt; or you can't debug
in IIS. 
&lt;br&gt;
&lt;br&gt;
But it isn't just the debugger - other features may not work properly either, possibly
resulting in a "hang" when you try to access a page.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
For those of you at my workshop at &lt;a href="http://www.vslive.com"&gt;VS Live&lt;/a&gt; this
past Sunday, this was why my web site wouldn't run properly in the VPC. Fortunately
there is this workaround, but I hope Microsoft provides a more comprehensive solution
in the release version, because it is quite confusing to have to set your build version
back to 2.0 even though you are really building against 3.5...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=36b5ff87-f151-4ac6-9d44-5eac31094d75" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,36b5ff87-f151-4ac6-9d44-5eac31094d75.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=b0725bfb-4b96-47d3-b017-c19cbd316fd1</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,b0725bfb-4b96-47d3-b017-c19cbd316fd1.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,b0725bfb-4b96-47d3-b017-c19cbd316fd1.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=b0725bfb-4b96-47d3-b017-c19cbd316fd1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <a href="http://blog.magenic.com/blogs/aarone/">Aaron
Erickson</a>, a <a href="http://www.magenic.com">Magenic</a> consultant, has been
working on an interesting project: providing an indexing service for LINQ. You can
get full information about i4o from <a href="http://blog.magenic.com/blogs/aarone/archive/2007/04/09/Introducing-i4o.aspx">this
blog post</a>, and from the <a href="http://www.codeplex.com/i4o">official codeplex
site</a>. 
<p>
You might wonder why this matters, given that LINQ uses database indexes to get its
data. But that's actually <em>Dlinq</em>, which runs against SQL Server.
</p><p>
LINQ itself runs against objects, arrays, collections, lists and so forth. All of
which are just in-memory objects, and obviously aren't indexed at all. LINQ does "table
scans" against arrays and lists at all times. Basically LINQ just runs a lot of for-each
loops for you. And in the vast majority of cases that is the right answer, because
most lists are only a few score or maybe a few hundred items in length, and using
for-each is faster than building an index.
</p><p>
However, you might have lists that are big enough, or where you are doing many repeated
queries against the same set of properties, where the cost of building an index is
lower than the cost of using simple for-each loops. And this is where the ability
to index properties of the objects in a list such that LINQ uses the index becomes
very useful.
</p><p>
In any case, check out i4o, because it is interesting and very cool stuff!
</p><img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=b0725bfb-4b96-47d3-b017-c19cbd316fd1" /></body>
      <title>Check out i4o: indexing for LINQ</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,b0725bfb-4b96-47d3-b017-c19cbd316fd1.aspx</guid>
      <link>http://www.lhotka.net/weblog/CheckOutI4oIndexingForLINQ.aspx</link>
      <pubDate>Thu, 26 Apr 2007 14:33:32 GMT</pubDate>
      <description>&lt;a href="http://blog.magenic.com/blogs/aarone/"&gt;Aaron Erickson&lt;/a&gt;, a &lt;a href="http://www.magenic.com"&gt;Magenic&lt;/a&gt; consultant,
has been working on an interesting project: providing an indexing service for LINQ.
You can get full information about i4o from &lt;a href="http://blog.magenic.com/blogs/aarone/archive/2007/04/09/Introducing-i4o.aspx"&gt;this
blog post&lt;/a&gt;, and from the &lt;a href="http://www.codeplex.com/i4o"&gt;official codeplex
site&lt;/a&gt;. 
&lt;p&gt;
You might wonder why this matters, given that LINQ uses database indexes to get its
data. But that's actually &lt;em&gt;Dlinq&lt;/em&gt;, which runs against SQL Server.
&lt;/p&gt;
&lt;p&gt;
LINQ itself runs against objects, arrays, collections, lists and so forth. All of
which are just in-memory objects, and obviously aren't indexed at all. LINQ does "table
scans" against arrays and lists at all times. Basically LINQ just runs a lot of for-each
loops for you. And in the vast majority of cases that is the right answer, because
most lists are only a few score or maybe a few hundred items in length, and using
for-each is faster than building an index.
&lt;/p&gt;
&lt;p&gt;
However, you might have lists that are big enough, or where you are doing many repeated
queries against the same set of properties, where the cost of building an index is
lower than the cost of using simple for-each loops. And this is where the ability
to index properties of the objects in a list such that LINQ uses the index becomes
very useful.
&lt;/p&gt;
&lt;p&gt;
In any case, check out i4o, because it is interesting and very cool stuff!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=b0725bfb-4b96-47d3-b017-c19cbd316fd1" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,b0725bfb-4b96-47d3-b017-c19cbd316fd1.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=7bec0b2c-60c5-4e46-aac0-be029f802bd9</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,7bec0b2c-60c5-4e46-aac0-be029f802bd9.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,7bec0b2c-60c5-4e46-aac0-be029f802bd9.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=7bec0b2c-60c5-4e46-aac0-be029f802bd9</wfw:commentRss>
      <title>Binding a WPF ComboBox to a display source and a binding source</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,7bec0b2c-60c5-4e46-aac0-be029f802bd9.aspx</guid>
      <link>http://www.lhotka.net/weblog/BindingAWPFComboBoxToADisplaySourceAndABindingSource.aspx</link>
      <pubDate>Wed, 25 Apr 2007 01:55:13 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;I am building a WPF UI for my ProjectTracker &lt;a href="http://www.lhotka.net/cslanet"&gt;CSLA
.NET&lt;/a&gt; sample app. On the whole this is going pretty well, and I anticipate being
done within the next couple days. I’ve found and fixed a couple bugs in CSLA – one
in BusinessListBase that’s been there forever, and one in ValidationPanel that caused
a null reference exception. While I fixed that last one, I optimized the code a bit,
which does seem to make the control a bit faster.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;But one thing I spent a ridiculous amount
of time on was the simple process of getting a ComboBox control to bind to one data
source to get its list of items, and to the business object property for the key value.
Google turned up a number of search results, none of which really addressed this particular
scenario – which seems odd to me given how common a scenario it is…&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;In ProjectTracker, a person (resource) can
be assigned to a project. If they are, they are given a role on that project. The
Role property is numeric – a key into a name/value list, and a foreign key into the
Roles table in the database. In Windows Forms and Web Forms the UI handles translating
this numeric value to a human-readable value through ComboBox controls, and obviously
WPF can do the same thing. The trick is in figuring out the XAML to make it happen.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Here’s the ComboBox XAML:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;ComboBox &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ItemsSource="{Binding
Source={StaticResource RoleList}}" &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;DisplayMemberPath="Value"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SelectedValuePath="Key"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SelectedValue="{Binding
Path=Role}" &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Width="150"
/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Let’s break this down.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The ItemsSource property specifies the data
source for the data that will populate the display of the control. In my case it is
referencing a data provider control defined like this:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&amp;lt;Page.Resources&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;csla:CslaDataProvider
x:Key="RoleList"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ObjectType="{x:Type
PTracker:RoleList}"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;FactoryMethod="GetList"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;IsAsynchronous="False"
/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&amp;lt;/Page.Resources&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;This data provider control loads a name/value
list object called RoleList (that inherits from Csla.NameValueListBase). The child
objects in this collection expose properties Key and Value. &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;You can see how the ComboBox uses the DisplayMemberPath
to specify that the Value property from the name/value list should be displayed to
the user, and the SelectedValuePath specifies that the Key value from the list should
be used to select the current item (the Key value is not displayed to the user).&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Then notice that the SelectedValue property
is used to bind to the main business object. This binding statement sets a path to
a property on the overall DataContext for the ComboBox, which in my case is actually
set through code at the Page object level:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;this.DataContext
= project;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;So all controls on the entire page, by default,
bind to a Project object, and this includes the ComboBox.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Remember though, that the Role property on
the Project is a numeric index value. And so is the Key value from the name/value
list. The ComboBox control connects these two automatically. So when the business
object’s Role property changes, the ComboBox automatically changes the displayed/selected
item. Conversely, when the user changes the ComboBox selected item, that automatically
causes the business object’s Role property to change.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=7bec0b2c-60c5-4e46-aac0-be029f802bd9" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,7bec0b2c-60c5-4e46-aac0-be029f802bd9.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=02a2b212-0c9e-42a3-9c79-f56565f89190</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,02a2b212-0c9e-42a3-9c79-f56565f89190.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,02a2b212-0c9e-42a3-9c79-f56565f89190.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=02a2b212-0c9e-42a3-9c79-f56565f89190</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just spent more time than I care to think about chasing down a silly config error
in the <a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx">Visual Studio
codename "Orcas" Beta 1</a> VPC image.
</p>
        <p>
I wanted to run a pre-existing web site, so I copied it to the VPC, aimed a virtual
directory at it in IIS and BOOM! 404 errors.
</p>
        <p>
I figured it was directory permissions, incorrect paths, all sorts of things.
</p>
        <p>
Eventually, in frustration I opened VS and created a new ASP.NET web project at localhost/test.
Guess what? VS kindly informed me that ASP.NET wasn't enabled for IIS on this machine,
and asked if I'd like to enable it. Of course I said yes - and instantly my pre-existing
web site started working.
</p>
        <p>
So if you decided to use the Beta 1 VPC (which is a nice way to go), be aware
that ASP.NET is not enabled for IIS, and you'll need to enable it before doing any
work with ASP.NET or WCF.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=02a2b212-0c9e-42a3-9c79-f56565f89190" />
      </body>
      <title>Orcas Beta 1: ASP.NET not enabled by default</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,02a2b212-0c9e-42a3-9c79-f56565f89190.aspx</guid>
      <link>http://www.lhotka.net/weblog/OrcasBeta1ASPNETNotEnabledByDefault.aspx</link>
      <pubDate>Mon, 23 Apr 2007 19:43:31 GMT</pubDate>
      <description>&lt;p&gt;
I just spent more time than I care to think about chasing down a silly config error
in the &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx"&gt;Visual Studio
codename "Orcas" Beta 1&lt;/a&gt; VPC image.
&lt;/p&gt;
&lt;p&gt;
I wanted to run a pre-existing web site, so I copied it to the VPC, aimed a virtual
directory at it in IIS and BOOM! 404 errors.
&lt;/p&gt;
&lt;p&gt;
I figured it was directory permissions, incorrect paths, all sorts of things.
&lt;/p&gt;
&lt;p&gt;
Eventually, in frustration I opened VS and created a new ASP.NET web project at localhost/test.
Guess what? VS kindly informed me that ASP.NET wasn't enabled for IIS on this machine,
and asked if I'd like to enable it. Of course I said yes - and instantly my pre-existing
web site started working.
&lt;/p&gt;
&lt;p&gt;
So if you decided to use the Beta 1 VPC (which is&amp;nbsp;a nice way to go), be aware
that ASP.NET is not enabled for IIS, and you'll need to enable it before doing any
work with ASP.NET or WCF.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=02a2b212-0c9e-42a3-9c79-f56565f89190" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,02a2b212-0c9e-42a3-9c79-f56565f89190.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=3ed0bf6e-7290-40f4-b6a0-923c3b508259</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,3ed0bf6e-7290-40f4-b6a0-923c3b508259.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,3ed0bf6e-7290-40f4-b6a0-923c3b508259.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=3ed0bf6e-7290-40f4-b6a0-923c3b508259</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We're really not that far away from some major new technology. Visual Studio "Orcas"
is slated to ship this fall, and will include .NET 3.5; which includes new compilers.
And new compilers always means fun! :)
</p>
        <p>
The VB team is running a <a href="http://blogs.msdn.com/vbteam/archive/2007/04/09/live-from-redmond-webcast-series-beth-massi.aspx">series
of webcasts</a> to bring everyone up to speed on the language changes and the resulting
capabilities.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=3ed0bf6e-7290-40f4-b6a0-923c3b508259" />
      </body>
      <title>VB 9 and C# 3 are not far away</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,3ed0bf6e-7290-40f4-b6a0-923c3b508259.aspx</guid>
      <link>http://www.lhotka.net/weblog/VB9AndC3AreNotFarAway.aspx</link>
      <pubDate>Wed, 11 Apr 2007 21:09:12 GMT</pubDate>
      <description>&lt;p&gt;
We're really not that far away from some major new technology. Visual Studio "Orcas"
is slated to ship this fall, and will include .NET 3.5; which includes new compilers.
And new compilers always means fun! :)
&lt;/p&gt;
&lt;p&gt;
The VB team is running a &lt;a href="http://blogs.msdn.com/vbteam/archive/2007/04/09/live-from-redmond-webcast-series-beth-massi.aspx"&gt;series
of webcasts&lt;/a&gt; to bring everyone up to speed on the language changes and the resulting
capabilities.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=3ed0bf6e-7290-40f4-b6a0-923c3b508259" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,3ed0bf6e-7290-40f4-b6a0-923c3b508259.aspx</comments>
      <category>Microsoft .NET</category>
      <category>News</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=b2587583-bc16-42f6-99f3-f45750d87519</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,b2587583-bc16-42f6-99f3-f45750d87519.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,b2587583-bc16-42f6-99f3-f45750d87519.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=b2587583-bc16-42f6-99f3-f45750d87519</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">I’ve been spending a lot of time in
WPF-land over the past few weeks, and thought I’d share some of what I’ve learned.
I haven’t been learning styles or UI layout stuff – Microsoft says that’s the job
of the turtleneck-wearing, metrosexual GQ crowd, so I’ll just roll with that. Instead,
I’ve been learning how to write data source provider controls, and implement Windows
Forms-like behaviors similar to the ErrorProvider and my Csla.Windows.ReadWriteAuthorization
control. </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">You know, manly programming </font>
              <span style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings">
                <span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">J</span>
              </span>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">The data source provider control is,
perhaps, the easiest thing I’ve done. Like ASP.NET, WPF likes to use a data control
concept. And like ASP.NET, the WPF data provider controls are easy to create, because
they don’t actually do all that much at runtime. <span style="mso-spacerun: yes"> </span>(I
do want to say thank you to Abed Mohammed for helping to debug some issues with the
CslaDataProvider control!)</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">I’m sure, as designer support for data
provider controls matures in tools like Visual Studio and Expression Blend, that life
will get far more complex. Certainly the Visual Studio designer support for Csla.Web.CslaDataProvider
has been the single most time consuming part of </font>
          <a href="http://www.lhotka.net/cslanet">
            <font face="Calibri" size="3">CSLA
.NET</font>
          </a>
          <font face="Calibri" color="#000000" size="3">, though I was able to
create the runtime support in an afternoon…</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">What I have today, is a Csla.Wpf.CslaDataProvider
control that works similar to the ObjectDataProvider. The primary difference is that
CslaDataProvider understands how to call Shared/static factory methods to get your
objects, rather than calling a constructor method. The result is that you can create/fetch
CSLA .NET business objects directly from your XAML.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">The really cool part of this, is that
CslaDataProvider supports asynchronous loading of the data. To be fair, the hard work
is done by the WPF base class, DataSourceProvider. Even so, supporting async is optional,
and requires a bit of extra work in the control – work that is worth it though. If
you construct a form that has multiple DataContext objects for different parts of
the form, loading all of them async should give some nice performance benefits overall.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">On the other hand, if your form is bound
to a single business object the value isn’t clear at all. Though the data load is
async, the form won’t actually display until all the async loads are complete, so
for a single data source on a form my guess is that async is actually counter-productive.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">The validation/ErrorProvider support
is based on some work </font>
          <a href="http://paulstovell.net/">
            <font face="Calibri" color="#800080" size="3">Paul
Stovell</font>
          </a>
          <font face="Calibri" color="#000000" size="3"> published on the
web. I conceptually based my work on similar concepts, and have created a ValidationPanel
control that uses IDataErrorInfo to determine if any bindings of any controls contained
in the panel are invalid. </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">The panel control loops through all
the controls contained inside the panel. On each control it loops through the DependencyProperty
elements defined for that control (in WPF controls, normal properties aren’t bindable,
only dependency properties). And it then loops through any Binding objects attached
to each DependencyProperty. I discovered that those Binding objects are complex little
buggers, and that there are different kinds of binding that I need to filter out.
Specifically relative bindings and control-to-control bindings must be ignored, because
they don’t represent a binding to the actual business object.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">To optimize performance the panel does
a bunch of caching of binding information, and is relatively sparing in how often
it refreshes the validation data – but it is comparable to ErrorProvider, in that
changing one business object property does trigger rechecking of all other properties
bound within the same ValidationPanel. I think this is necessary, because so many
data source objects are constructed around the Windows Forms model. Not following
that model would cause a lot of headache when moving to WPF.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">The authorization support is implemented
in a manner similar to the validation. Csla.Wpf.AuthorizationPanel uses the CSLA .NET
IAuthorizeReadWrite interface and scans all bindings for all controls contained in
the panel to see if the business object will allow the current user to read or write
to the bound property. If the user isn’t allowed to read the property, the panel either
hides or collapses the data bound control (your choice). If the user isn’t allowed
to write to the property, the panel sets the control’s IsReadOnly property to true,
or if the control doesn’t have IsReadOnly, it sets IsEnabled to false.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">AuthorizationPanel doesn’t include the
same level of caching as ValidationPanel, but I don’t think it is necessary. Where
ValidationPanel refreshes on every property change, AuthorizationPanel only refreshes
if the data source object is changed (replaced) or if you explicitly force a refresh
– probably because the current user’s principal object has changed.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">I want to pause here and point out that
I’ve had a lot of help in these efforts from Paul Czywczynski. He’s spent a lot of
time trying these controls and finding various holes in my logic. And the next control
addresses one of those holes...</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">The IsValid, IsDirty, IsSavable, IsNew
and IsDeleted properties on a CSLA .NET business object are marked as Browsable(false),
meaning they aren’t available for data binding. In Windows Forms you can work around
this easily by </font>
          <a href="http://www.lhotka.net/Article.aspx?area=4&amp;id=5faaee8e-8496-4845-86f7-787c6b64096c">
            <font face="Calibri" color="#800080" size="3">handling
a simple event</font>
          </a>
          <font face="Calibri" color="#000000" size="3"> on the BindingSource
object. But in WPF the goal is to write no code – to do everything through XAML (or
at least to make that possible), so such a solution isn’t sufficient.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">Enter the ObjectStatusPanel, which takes
the business object’s properties and exposes them in a way that WPF can consume. Using
this panel, your object’s status properties (single object or collection) become available
for binding to WPF controls, and if the object’s properties change those changes are
automatically reflected in the UI. The most common scenario here is to bind a button’s
enabled status to the IsSavable property of your editable root business object.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">Most recently I’ve started refactoring
the code in these controls. For the most part, I’ve now consolidated the common code
from all three into a base class: Csla.Wpf.DataPanelBase. This base class encapsulates
the code to walk through and find relevant Binding objects on all child controls,
and also encapsulates all the related event handling to detect when the data context,
data object, object property, list or collection have changed. It turns out that a
lot of things can happen during data binding, and detecting all of them means hooking,
unhooking and responding to a lot of events.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">I wrote all these controls originally
using the Dec 2006 CTP, and just started using them in the Mar 2007 CTP. As a pleasant
surprise there was no upgrade pain – they just kept working.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">In fact, they work better in the MarCTP,
because the Cider designer (WPF forms designer) is now capable of actually rendering
my custom controls. What I find <i style="mso-bidi-font-style: normal">very</i> interesting,
is that the designer actually <i style="mso-bidi-font-style: normal">runs the factory
method</i> of the CslaDataProvider control, so the form shows real data from the real
objects right there in Visual Studio. I’m not sure this is a good thing, but that’s
what happens.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">There’s no doubt that I’ll find more
issues with these controls, and they’ll change over the next few weeks and months.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">But the exciting thing is that I’m now
able to create WPF forms that have functional parity with Windows Forms, including
validation, authorization and object status binding. And it can all be done in either
XAML or code, running against standard CSLA .NET business objects.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">People attending </font>
          <a href="http://www.vslive.com/">
            <font face="Calibri" color="#800080" size="3">VS
Live</font>
          </a>
          <font face="Calibri" color="#000000" size="3"> at the end of this month
will be the first to see these controls in action – both in my workshop on Sunday
the 25<sup>th</sup> and in my sessions during the week. And I plan to put a test version
of CSLA .NET 3.0 online that week as well, so anyone who wants to play with it can
give it a go.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">Right now, if you aren’t faint of heart,
you can grab the live code from my </font>
          <a href="http://www.lhotka.net/Article.aspx?id=5987a664-4b44-45a7-bc1d-695610964718">
            <font face="Calibri" color="#800080" size="3">svn
repository</font>
          </a>
          <font face="Calibri" color="#000000" size="3">. Keeping in mind,
of course, that this is an active repository and so the code in trunk/ may or may
not actually work at any given point in time.</font>
        </p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=b2587583-bc16-42f6-99f3-f45750d87519" />
      </body>
      <title>CSLA .NET 3.0 - WPF support progress</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,b2587583-bc16-42f6-99f3-f45750d87519.aspx</guid>
      <link>http://www.lhotka.net/weblog/CSLANET30WPFSupportProgress.aspx</link>
      <pubDate>Fri, 16 Mar 2007 03:37:24 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;I’ve been spending a lot of time in WPF-land
over the past few weeks, and thought I’d share some of what I’ve learned. I haven’t
been learning styles or UI layout stuff – Microsoft says that’s the job of the turtleneck-wearing,
metrosexual GQ crowd, so I’ll just roll with that. Instead, I’ve been learning how
to write data source provider controls, and implement Windows Forms-like behaviors
similar to the ErrorProvider and my Csla.Windows.ReadWriteAuthorization control. &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;You know, manly programming &lt;/font&gt;&lt;span style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The data source provider control is, perhaps,
the easiest thing I’ve done. Like ASP.NET, WPF likes to use a data control concept.
And like ASP.NET, the WPF data provider controls are easy to create, because they
don’t actually do all that much at runtime. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;(I
do want to say thank you to Abed Mohammed for helping to debug some issues with the
CslaDataProvider control!)&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;I’m sure, as designer support for data provider
controls matures in tools like Visual Studio and Expression Blend, that life will
get far more complex. Certainly the Visual Studio designer support for Csla.Web.CslaDataProvider
has been the single most time consuming part of &lt;/font&gt;&lt;a href="http://www.lhotka.net/cslanet"&gt;&lt;font face=Calibri size=3&gt;CSLA
.NET&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri color=#000000 size=3&gt;, though I was able to create
the runtime support in an afternoon…&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;What I have today, is a Csla.Wpf.CslaDataProvider
control that works similar to the ObjectDataProvider. The primary difference is that
CslaDataProvider understands how to call Shared/static factory methods to get your
objects, rather than calling a constructor method. The result is that you can create/fetch
CSLA .NET business objects directly from your XAML.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The really cool part of this, is that CslaDataProvider
supports asynchronous loading of the data. To be fair, the hard work is done by the
WPF base class, DataSourceProvider. Even so, supporting async is optional, and requires
a bit of extra work in the control – work that is worth it though. If you construct
a form that has multiple DataContext objects for different parts of the form, loading
all of them async should give some nice performance benefits overall.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;On the other hand, if your form is bound to
a single business object the value isn’t clear at all. Though the data load is async,
the form won’t actually display until all the async loads are complete, so for a single
data source on a form my guess is that async is actually counter-productive.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The validation/ErrorProvider support is based
on some work &lt;/font&gt;&lt;a href="http://paulstovell.net/"&gt;&lt;font face=Calibri color=#800080 size=3&gt;Paul
Stovell&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri color=#000000 size=3&gt; published on the web. I
conceptually based my work on similar concepts, and have created a ValidationPanel
control that uses IDataErrorInfo to determine if any bindings of any controls contained
in the panel are invalid. &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The panel control loops through all the controls
contained inside the panel. On each control it loops through the DependencyProperty
elements defined for that control (in WPF controls, normal properties aren’t bindable,
only dependency properties). And it then loops through any Binding objects attached
to each DependencyProperty. I discovered that those Binding objects are complex little
buggers, and that there are different kinds of binding that I need to filter out.
Specifically relative bindings and control-to-control bindings must be ignored, because
they don’t represent a binding to the actual business object.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;To optimize performance the panel does a bunch
of caching of binding information, and is relatively sparing in how often it refreshes
the validation data – but it is comparable to ErrorProvider, in that changing one
business object property does trigger rechecking of all other properties bound within
the same ValidationPanel. I think this is necessary, because so many data source objects
are constructed around the Windows Forms model. Not following that model would cause
a lot of headache when moving to WPF.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The authorization support is implemented in
a manner similar to the validation. Csla.Wpf.AuthorizationPanel uses the CSLA .NET
IAuthorizeReadWrite interface and scans all bindings for all controls contained in
the panel to see if the business object will allow the current user to read or write
to the bound property. If the user isn’t allowed to read the property, the panel either
hides or collapses the data bound control (your choice). If the user isn’t allowed
to write to the property, the panel sets the control’s IsReadOnly property to true,
or if the control doesn’t have IsReadOnly, it sets IsEnabled to false.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;AuthorizationPanel doesn’t include the same
level of caching as ValidationPanel, but I don’t think it is necessary. Where ValidationPanel
refreshes on every property change, AuthorizationPanel only refreshes if the data
source object is changed (replaced) or if you explicitly force a refresh – probably
because the current user’s principal object has changed.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;I want to pause here and point out that I’ve
had a lot of help in these efforts from Paul Czywczynski. He’s spent a lot of time
trying these controls and finding various holes in my logic. And the next control
addresses one of those holes...&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The IsValid, IsDirty, IsSavable, IsNew and
IsDeleted properties on a CSLA .NET business object are marked as Browsable(false),
meaning they aren’t available for data binding. In Windows Forms you can work around
this easily by &lt;/font&gt;&lt;a href="http://www.lhotka.net/Article.aspx?area=4&amp;amp;id=5faaee8e-8496-4845-86f7-787c6b64096c"&gt;&lt;font face=Calibri color=#800080 size=3&gt;handling
a simple event&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri color=#000000 size=3&gt; on the BindingSource
object. But in WPF the goal is to write no code – to do everything through XAML (or
at least to make that possible), so such a solution isn’t sufficient.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Enter the ObjectStatusPanel, which takes the
business object’s properties and exposes them in a way that WPF can consume. Using
this panel, your object’s status properties (single object or collection) become available
for binding to WPF controls, and if the object’s properties change those changes are
automatically reflected in the UI. The most common scenario here is to bind a button’s
enabled status to the IsSavable property of your editable root business object.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Most recently I’ve started refactoring the
code in these controls. For the most part, I’ve now consolidated the common code from
all three into a base class: Csla.Wpf.DataPanelBase. This base class encapsulates
the code to walk through and find relevant Binding objects on all child controls,
and also encapsulates all the related event handling to detect when the data context,
data object, object property, list or collection have changed. It turns out that a
lot of things can happen during data binding, and detecting all of them means hooking,
unhooking and responding to a lot of events.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;I wrote all these controls originally using
the Dec 2006 CTP, and just started using them in the Mar 2007 CTP. As a pleasant surprise
there was no upgrade pain – they just kept working.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;In fact, they work better in the MarCTP, because
the Cider designer (WPF forms designer) is now capable of actually rendering my custom
controls. What I find &lt;i style="mso-bidi-font-style: normal"&gt;very&lt;/i&gt; interesting,
is that the designer actually &lt;i style="mso-bidi-font-style: normal"&gt;runs the factory
method&lt;/i&gt; of the CslaDataProvider control, so the form shows real data from the real
objects right there in Visual Studio. I’m not sure this is a good thing, but that’s
what happens.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;There’s no doubt that I’ll find more issues
with these controls, and they’ll change over the next few weeks and months.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;But the exciting thing is that I’m now able
to create WPF forms that have functional parity with Windows Forms, including validation,
authorization and object status binding. And it can all be done in either XAML or
code, running against standard CSLA .NET business objects.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;People attending &lt;/font&gt;&lt;a href="http://www.vslive.com/"&gt;&lt;font face=Calibri color=#800080 size=3&gt;VS
Live&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri color=#000000 size=3&gt; at the end of this month will
be the first to see these controls in action – both in my workshop on Sunday the 25&lt;sup&gt;th&lt;/sup&gt; and
in my sessions during the week. And I plan to put a test version of CSLA .NET 3.0
online that week as well, so anyone who wants to play with it can give it a go.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Right now, if you aren’t faint of heart, you
can grab the live code from my &lt;/font&gt;&lt;a href="http://www.lhotka.net/Article.aspx?id=5987a664-4b44-45a7-bc1d-695610964718"&gt;&lt;font face=Calibri color=#800080 size=3&gt;svn
repository&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri color=#000000 size=3&gt;. Keeping in mind, of
course, that this is an active repository and so the code in trunk/ may or may not
actually work at any given point in time.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=b2587583-bc16-42f6-99f3-f45750d87519" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,b2587583-bc16-42f6-99f3-f45750d87519.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=2fd11bea-b6fb-45cb-aa6c-f9d26265192b</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,2fd11bea-b6fb-45cb-aa6c-f9d26265192b.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,2fd11bea-b6fb-45cb-aa6c-f9d26265192b.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=2fd11bea-b6fb-45cb-aa6c-f9d26265192b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
String formatting in .NET is a pain. Not that it has ever been easy - even COBOL formatting
masks can get out of hand, but there's no doubt that the .NET system is harder to
grasp and remember than the VB 1-6 scheme...
</p>
        <p>
I just had a need to format an arbitrary value using a user-supplied format string.
You'd think that
</p>
        <p>
obj.ToString(format)
</p>
        <p>
would do the trick. Except that System.Object doesn't have that override of ToString(),
so that's not a universal solution. So String.Format() is the obvious next choice,
except that I need to somehow take a format string like 'N' or 'd' and make it into
something valid for String.Format()...
</p>
        <p>
Brad Abrams has <a href="http://blogs.msdn.com/brada/archive/2004/01/14/58851.aspx">some
good info</a>. But his problem/solution isn't quite what I needed. Close enough to
extrapolate though:
</p>
        <font size="2">
          <p>
outValue = 
</p>
        </font>
        <font color="#0000ff" size="2">string</font>
        <font size="2">.Format(</font>
        <font color="#0000ff" size="2">string</font>
        <font size="2">.Format(</font>
        <font color="#a31515" size="2">"{{0:{0}}}"</font>
        <font size="2">,
format), value);
</font>
        <p>
Given a format string of 'N', the inner Format() returns "{0:N}", which is then used
by the outer Format() to format the actual value.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=2fd11bea-b6fb-45cb-aa6c-f9d26265192b" />
      </body>
      <title>String formatting fun</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,2fd11bea-b6fb-45cb-aa6c-f9d26265192b.aspx</guid>
      <link>http://www.lhotka.net/weblog/StringFormattingFun.aspx</link>
      <pubDate>Wed, 14 Mar 2007 03:30:21 GMT</pubDate>
      <description>&lt;p&gt;
String formatting in .NET is a pain. Not that it has ever been easy - even COBOL formatting
masks can get out of hand, but there's no doubt that the .NET system is harder to
grasp and remember than the VB 1-6 scheme...
&lt;/p&gt;
&lt;p&gt;
I just had a need to format an arbitrary value using a user-supplied format string.
You'd think that
&lt;/p&gt;
&lt;p&gt;
obj.ToString(format)
&lt;/p&gt;
&lt;p&gt;
would do the trick. Except that System.Object doesn't have that override of ToString(),
so that's not a universal solution. So String.Format() is the obvious next choice,
except that I need to somehow take a format string like 'N' or 'd' and make it into
something valid for String.Format()...
&lt;/p&gt;
&lt;p&gt;
Brad Abrams has &lt;a href="http://blogs.msdn.com/brada/archive/2004/01/14/58851.aspx"&gt;some
good info&lt;/a&gt;. But his problem/solution isn't quite what I needed. Close enough to
extrapolate though:
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
outValue = 
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;string&lt;/font&gt;&lt;font size=2&gt;.Format(&lt;/font&gt;&lt;font color=#0000ff size=2&gt;string&lt;/font&gt;&lt;font size=2&gt;.Format(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;"{{0:{0}}}"&lt;/font&gt;&lt;font size=2&gt;,
format), value);&gt;
&lt;/font&gt; 
&lt;p&gt;
Given a format string of 'N', the inner Format() returns "{0:N}", which is then used
by the outer Format() to format the actual value.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=2fd11bea-b6fb-45cb-aa6c-f9d26265192b" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,2fd11bea-b6fb-45cb-aa6c-f9d26265192b.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=880b0528-bc87-4566-b33f-5a05b55bbb70</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,880b0528-bc87-4566-b33f-5a05b55bbb70.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,880b0528-bc87-4566-b33f-5a05b55bbb70.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=880b0528-bc87-4566-b33f-5a05b55bbb70</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've been working with the <a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx">Visual
Studio Orcas CTP from March 2007</a> for a few days now. My focus had been around
WCF and WPF and ensuring my CSLA .NET 3.0 development worked in the new CTP.
</p>
        <p>
Then earlier today I tried building a workflow. And the workflow designer wouldn't
open. Instead I got a concise little error dialog saying "<span style="COLOR: #1f497d"><font size="3"><font face="Calibri">Microsoft.VisualStudio.Shell.WindowPane.GetService(System.Type)</font></font></span>".
This was the case with both C# and VB projects.
</p>
        <p>
Worse, attempting to close VS after that point caused a complete VS crash. It turns
out that other designers (like project properties) fail as well, with similar errors.
</p>
        <p>
In talking to some people at Microsoft, I discovered that the problem wasn't universal.
But in talking to more people, the root of the issue appeared.
</p>
        <p>
I downloaded the huge 9 part VSTS/TFS edition of the Orcas VPC. Other people downloaded
the smaller 7 part VSTS-only edition. The problem only occurs in the big 9 parter,
and is due to a side-by-side issue. Some VS 2005 components are in the bigger VPC
to support SQL Server, and they are causing the issue. The 7 part VPC doesn't have
that functionality, or those components, and so the SxS problem doesn't occur.
</p>
        <p>
So I'm about 80% done downloading the 7 parter, then I can get back to work.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=880b0528-bc87-4566-b33f-5a05b55bbb70" />
      </body>
      <title>Issue with Orcas March 2007 CTP</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,880b0528-bc87-4566-b33f-5a05b55bbb70.aspx</guid>
      <link>http://www.lhotka.net/weblog/IssueWithOrcasMarch2007CTP.aspx</link>
      <pubDate>Wed, 14 Mar 2007 03:15:14 GMT</pubDate>
      <description>&lt;p&gt;
I've been working with the &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx"&gt;Visual
Studio Orcas CTP from March 2007&lt;/a&gt; for a few days now. My focus had been around
WCF and WPF and ensuring my CSLA .NET 3.0 development worked in the new CTP.
&lt;/p&gt;
&lt;p&gt;
Then earlier today I tried building a workflow. And the workflow designer wouldn't
open. Instead I got&amp;nbsp;a concise little error dialog saying "&lt;span style="COLOR: #1f497d"&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Microsoft.VisualStudio.Shell.WindowPane.GetService(System.Type)&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;".
This was the case with both C# and VB projects.
&lt;/p&gt;
&lt;p&gt;
Worse, attempting to close VS after that point caused a complete VS crash. It turns
out that other designers (like project properties) fail as well, with similar errors.
&lt;/p&gt;
&lt;p&gt;
In talking to some people at Microsoft, I discovered that the problem wasn't universal.
But in talking to more people, the root of the issue appeared.
&lt;/p&gt;
&lt;p&gt;
I downloaded the huge 9 part VSTS/TFS edition of the Orcas VPC. Other people downloaded
the smaller 7 part VSTS-only edition. The problem only occurs in the big 9 parter,
and is due to a side-by-side issue. Some VS 2005 components are in the bigger VPC
to support SQL Server, and they are causing the issue. The 7 part VPC doesn't have
that functionality, or those components, and so the SxS problem doesn't occur.
&lt;/p&gt;
&lt;p&gt;
So I'm about 80% done downloading the 7 parter, then I can get back to work.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=880b0528-bc87-4566-b33f-5a05b55bbb70" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,880b0528-bc87-4566-b33f-5a05b55bbb70.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=b6f47368-78c9-4f16-a7e3-4905f761c2e5</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,b6f47368-78c9-4f16-a7e3-4905f761c2e5.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,b6f47368-78c9-4f16-a7e3-4905f761c2e5.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=b6f47368-78c9-4f16-a7e3-4905f761c2e5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I get a lot of questions about the new ADO.NET Entity Framework and LINQ and how these
technologies interact with CSLA .NET. I've discussed this in a <a href="http://www.lhotka.net/weblog/SearchView.aspx?q=linq">few
other blog posts</a>, but the question recently came up on the <a href="http://forums.lhotka.net">CSLA
.NET forum</a> and I thought I'd share my answer:
</p>
        <p>
          <font face="Times New Roman" color="#000000" size="3">They are totally compatible,
but it is important to remember what they are for.</font>
        </p>
        <p>
          <font face="Times New Roman" color="#000000" size="3">Both ADO.NET EF and LINQ work
with <em>entity objects</em> - objects designed primarily as data containers. These
technologies are all about making it an easy and intuitive process to get data into
and out of databases (or other data stores) into entity objects, and then to reshape
those entity objects in memory.</font>
        </p>
        <p>
          <font face="Times New Roman" color="#000000" size="3">CSLA .NET is all about creating <em>business
objects</em> - objects designed primarily around the responsibilities and behaviors
defined by a business use case. It is all about making it easy to build use case-derived
objects that have business logic, validaiton rules and authorization rules. Additionally,
CSLA .NET helps create objects that support a rich range of UI supporting behaviors,
such as data binding and n-level undo.</font>
        </p>
        <p>
          <font face="Times New Roman" color="#000000" size="3">It is equally important to remember
what these technologies are <em>not</em>.</font>
        </p>
        <p>
          <font face="Times New Roman" color="#000000" size="3">ADO.NET EF and LINQ are not
well-suited to creating a rich business layer. While it is technically possible to
use them in this manner, it is already clear that the process will be very painful
for anything but the most trivial of applications. This is because the resulting entity
objects are data-centric, and don't easily match up to business use cases - at least
not in any way that makes any embedded business logic maintainable or easily reusable.</font>
        </p>
        <p>
          <font face="Times New Roman" color="#000000" size="3">CSLA .NET is not an object-relational
mapping technology. I have very specifically avoided ORM concepts in the framework,
in the hopes that someone (like Microsoft) would eventually provide an elegant and
productive solution to the problem. Obviously solutions do exist today: raw ADO.NET,
, the DAAB, nHibernate, Paul Wilson's ORM mapper, LLBLgen and more. Many people use
these various technologies behind CSLA .NET, and that's awesome.</font>
        </p>
        <p>
          <font face="Times New Roman" color="#000000" size="3">So looking forward, I see a
bright future. One where the DataPortal_XYZ methods either directly make use of ADO.NET
EF and LINQ, or call a data access layer (DAL) that makes use of those technologies
to build and return entity objects.</font>
        </p>
        <p>
          <font face="Times New Roman" color="#000000" size="3">Either way, you can envision
this future where the DP_XYZ methods primarily interact with entity objects, deferring
all the actual persistence work off to EF/LINQ code. If Microsoft lives up to the
promise with EF and LINQ, this model should seriously reduce the complexity of data
access, resulting in more developer productivity - giving us more time to focus
on the important stuff: object-oriented design ;) .</font>
        </p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=b6f47368-78c9-4f16-a7e3-4905f761c2e5" />
      </body>
      <title>ADO.NET Entity Framework, LINQ and CSLA .NET</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,b6f47368-78c9-4f16-a7e3-4905f761c2e5.aspx</guid>
      <link>http://www.lhotka.net/weblog/ADONETEntityFrameworkLINQAndCSLANET.aspx</link>
      <pubDate>Wed, 07 Feb 2007 18:08:20 GMT</pubDate>
      <description>&lt;p&gt;
I get a lot of questions about the new ADO.NET Entity Framework and LINQ and how these
technologies interact with CSLA .NET. I've discussed this in a &lt;a href="http://www.lhotka.net/weblog/SearchView.aspx?q=linq"&gt;few
other blog posts&lt;/a&gt;, but the question recently came up on the &lt;a href="http://forums.lhotka.net"&gt;CSLA
.NET forum&lt;/a&gt; and I thought I'd share my answer:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;They are totally compatible, but
it is important to remember what they are for.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Both ADO.NET EF and LINQ work with &lt;em&gt;entity
objects&lt;/em&gt; - objects designed primarily as data containers. These technologies are
all about making it an easy and intuitive process to get data into and out of databases
(or other data stores) into entity objects, and then to reshape those entity objects
in memory.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;CSLA .NET is all about creating &lt;em&gt;business
objects&lt;/em&gt; - objects designed primarily around the responsibilities and behaviors
defined by a business use case. It is all about making it easy to build use case-derived
objects that have business logic, validaiton rules and authorization rules. Additionally,
CSLA .NET helps create objects that support a rich range of UI supporting behaviors,
such as data binding and n-level undo.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;It is equally important to remember
what these technologies are &lt;em&gt;not&lt;/em&gt;.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;ADO.NET EF and LINQ are not well-suited
to creating a rich business layer. While it is technically possible to use them in
this manner, it is already clear that the process will be very painful for anything
but the most trivial of applications. This is because the resulting entity objects
are data-centric, and don't easily match up to business use cases - at least not in
any way that makes any embedded business logic maintainable or easily reusable.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;CSLA .NET is not an object-relational
mapping technology. I have very specifically avoided ORM concepts in the framework,
in the hopes that someone (like Microsoft) would eventually provide an elegant and
productive solution to the problem. Obviously solutions do exist today: raw ADO.NET,
, the DAAB, nHibernate, Paul Wilson's ORM mapper, LLBLgen and more. Many people use
these various technologies behind CSLA .NET, and that's awesome.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;So looking forward, I see a bright
future. One where the DataPortal_XYZ methods either directly make use of ADO.NET EF
and LINQ, or call a data access layer (DAL) that makes use of those technologies to
build and return entity objects.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Either way, you can envision this
future where the DP_XYZ methods primarily interact with entity objects, deferring
all the actual persistence work off to EF/LINQ code. If Microsoft lives up to the
promise with EF and LINQ, this model should seriously reduce the complexity of data
access, resulting in more developer productivity&amp;nbsp;- giving us more time to focus
on the important stuff: object-oriented design ;) .&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=b6f47368-78c9-4f16-a7e3-4905f761c2e5" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,b6f47368-78c9-4f16-a7e3-4905f761c2e5.aspx</comments>
      <category>Architecture</category>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=406b393e-5360-4b3f-8497-b3e97d084c8e</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,406b393e-5360-4b3f-8497-b3e97d084c8e.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,406b393e-5360-4b3f-8497-b3e97d084c8e.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=406b393e-5360-4b3f-8497-b3e97d084c8e</wfw:commentRss>
      <title>Help requested with weird ASP.NET custom datasource control issue</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,406b393e-5360-4b3f-8497-b3e97d084c8e.aspx</guid>
      <link>http://www.lhotka.net/weblog/HelpRequestedWithWeirdASPNETCustomDatasourceControlIssue.aspx</link>
      <pubDate>Wed, 07 Feb 2007 06:40:18 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;I have a custom data source control as part
of my CSLA .NET framework. It is somewhat like ObjectDataSource, but works with objects
that are created through factory methods rather than default constructors (and some
other variations).&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;All is pretty well with this control, except
one issue: it fails when adding a CslaDataSource control to a page as a new data source
from a DetailsView or other control.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;In other words, you add a DetailsView to the
page, then tell that control you want it to bind to a new data source and it brings
up a wizard, where you pick CslaDataSource so a new one is added to the page.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The problem I’m getting is a VERY odd exception:
Csla.Web.CslaDataSource can not be cast to Csla.Web.CslaDataSource.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Yes, that’s right – the type can’t be cast
to itself.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;I believe this is because the wizard is loading
its own copy of Csla.dll into memory, separate from the one used by the web forms
designer. Or something like that. This even confuses the debugger – it can’t show
details about the type because it says the type is loaded into two different GUIDs.
I don’t know what the GUIDs represent (appdomains, versions?), but it is obviously
not good.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;This is very weird, and after hours of time
on this, I’m quite stumped. Any help, clues, pointers or ideas are VERY welcome!&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Thanks! Rocky&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=406b393e-5360-4b3f-8497-b3e97d084c8e" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,406b393e-5360-4b3f-8497-b3e97d084c8e.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=2508e05d-4d80-4891-b909-0df6546f7dc9</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,2508e05d-4d80-4891-b909-0df6546f7dc9.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,2508e05d-4d80-4891-b909-0df6546f7dc9.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=2508e05d-4d80-4891-b909-0df6546f7dc9</wfw:commentRss>
      <title>Should you change values in a property set block?</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,2508e05d-4d80-4891-b909-0df6546f7dc9.aspx</guid>
      <link>http://www.lhotka.net/weblog/ShouldYouChangeValuesInAPropertySetBlock.aspx</link>
      <pubDate>Wed, 17 Jan 2007 21:45:30 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;I recently had an email discussion
where I was describing why I needed to solve the problem I described in &lt;/font&gt;&lt;a href="http://www.lhotka.net/weblog/DataBindingIssueInWPFWithSolution.aspx"&gt;&lt;font face="Times New Roman" size=3&gt;this
article for WPF&lt;/font&gt;&lt;/a&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt; and &lt;/font&gt;&lt;a href="http://www.lhotka.net/weblog/WindowsFormsBindingIssueAComponentSolution.aspx"&gt;&lt;font face="Times New Roman" size=3&gt;this
article for Windows Forms&lt;/font&gt;&lt;/a&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt;. &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;In both cases the issue is that
data binding doesn’t refresh the value from the data source after it updates the data
source from the UI. This means that any changes to the value that occur in the property
set code aren’t reflected in the UI.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;The question he posed to me was
whether it was a good idea to have a property set block actually change the value.
In most programming models, goes the thought, assigning a property to a value can’t
result in that property value changing. So any changes to the value that occur in
the set block of a property are counter-intuitive, and so you simply shouldn’t change
the value in the setter code.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Here’s my response:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;The idea of a setter
(which is really just a mutator method by another name) changing a value doesn't (or
shouldn't) seem counter-intuitive at all.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="mso-spacerun: yes"&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;If we were talking about assigning
a value to a public field I’d agree entirely. But we are not. Instead we’re talking
about assigning a value to a property, and that’s very different.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;If all we wanted were public fields,
we wouldn't need the concept of "property" at all. The concept of "property" is merely
a formalization of the following:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;ol style="MARGIN-TOP: 0in" type=1&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;public fields are bad&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/li&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;private fields are exposed
through an accessor method&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/li&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;private fields are changed
through a mutator method&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/li&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;creating and using accessor/mutator
methods is awkward without a standard mechanism&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;So the concept of "property"
exists to standardize and formalize the idea that we need controlled access to private
fields, and a standard way to change their value through a mutator method.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Consider the business
rule that says a document id must follow a certain form - like &lt;/font&gt;&lt;span style="FONT-FAMILY: 'Courier New'"&gt;SOP433&lt;/span&gt;&lt;font face="Times New Roman"&gt;.
The first three characters must be alpha and upper case, the last three must be numeric.
This is an incredibly common scenario for document, product, customer and other user-entered
id values.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Only a poor UI would
force the user to actually enter upper case values. The user should be able to type
what they want, and the software will fix it.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;But putting the upper
case rule in the UI is bad, because code in the UI isn't reusable, and tends to become
obsolete very rapidly as technology and/or the UI design changes. There's nothing
more expensive over the life of an application than a line of code in the UI. So while
it is possible to implement this rule in a validation control, in JavaScript, in a
button click event handler - none of those are good solutions to the real problem.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Yet if that rule is
placed purely in the backend system, then the user can't get any sort of interactive
response. The form must be "posted" or "transmitted" to the backend before the processing
can occur. Users want to immediately see the value be upper case or they get nervous.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;So then we're stuck.
Many people implement the rule twice. Once in the UI to make the user happy, and once
in the backend, which is the &lt;i style="mso-bidi-font-style: normal"&gt;real&lt;/i&gt; rule
implementation. And then they try to keep those rules in sync forever - the result
being an expensive, unreliable and hard to maintain system.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;I've watched this cycle
occur for 20 years now, and it is the same time after time. And it sucks. 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;This, right here, is
why VB got such a bad name through the 1990’s. The VB forms designer made it way too
easy to write all the logic in the UI, and without any other clear alternative that's
what happened. The resulting applications are very fragile and are impossible to upgrade
to the next technology (like .NET). Today, as we talk, many thousands of lines of
code are being written in Windows Forms and Web Forms in exactly the same way. Those
poor people will have a hell of a time upgrading to WPF, because none of their code
is reusable.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;What's needed is &lt;i style="mso-bidi-font-style: normal"&gt;one&lt;/i&gt; location
for this rule. Business objects offer a workable solution here. If the object implements
the rule, and the object runs on the client workstation, then (without code in the
UI) the user gets immediate response and the rule is satisfied. And the rule is reusable,
because the object is reusable - in a way that UI code never can be (or at least never
has been).&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;That same object, with
that same interactive rule, can be used behind Windows Forms, Web Forms, WPF and even
a web services interface. The rule is always applied, because it is right there in
the object. And for interactive UIs it is immediate, because it is in the field's
mutator method (the property setter).&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;So in my mind the idea of changing
a value in a setter isn't counter-intuitive at all - it is the obvious design purpose
behind the property setter (mutator). Any other alternative is really just a ridiculously
complex way of implementing public fields. And worse, it leaves us where we've been
for 20+ years, with duplicate code and expensive, unreliable software.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=2508e05d-4d80-4891-b909-0df6546f7dc9" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,2508e05d-4d80-4891-b909-0df6546f7dc9.aspx</comments>
      <category>Architecture</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=89bf0c78-2bfc-4872-89b3-5499c4cbd0ae</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,89bf0c78-2bfc-4872-89b3-5499c4cbd0ae.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,89bf0c78-2bfc-4872-89b3-5499c4cbd0ae.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=89bf0c78-2bfc-4872-89b3-5499c4cbd0ae</wfw:commentRss>
      <title>Data binding issue in WPF: with solution</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,89bf0c78-2bfc-4872-89b3-5499c4cbd0ae.aspx</guid>
      <link>http://www.lhotka.net/weblog/DataBindingIssueInWPFWithSolution.aspx</link>
      <pubDate>Tue, 09 Jan 2007 21:08:23 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Here's an issue from Windows Forms
that appears to have crept into WPF as well – along with a solution (thanks to Sam
Bent and Kevin Moore from the WPF team):&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Consider a class with
a property that enforces a business rule - such as that the value must be all upper
case:&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;public
class Test : INotifyPropertyChanged&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;public
event 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;System.ComponentModel.PropertyChangedEventHandler &lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
PropertyChanged;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;//
...&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;private
string _data;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;public
string Data&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;get 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{ 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;return
_data; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;set 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;_data
= value.ToUpper();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;OnNotifyPropertyChanged("Data");&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Bind this to a TextBox
and type in a lower-case value. The user continues to see the lower-case value on
the screen, even though the object obviously has an upper-case value. The PropertyChanged
event is blissfully ignored by WPF data binding.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;I believe this is the
same "optimization" as in Windows Forms, where the assumption is that since the value
was put into the object by data binding that it &lt;i style="mso-bidi-font-style: normal"&gt;can’t&lt;/i&gt; be
different from what's on the screen - so no refresh is needed. Obviously that is a
unfortunate viewpoint, as it totally ignores the idea than an object might be used
to centralize business logic or behavior...&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;In Windows Forms the solution to
this issue is relatively simple: handle an event from the BindingSource and force
the BindingSource to refresh the value. Bill McCarthy wrapped this solution into an &lt;/font&gt;&lt;a href="http://www.lhotka.net/cslacvs/viewvc.cgi/csla20cs/Csla/Windows/BindingSourceRefresh.cs?view=markup"&gt;&lt;font face="Times New Roman" color=#800080 size=3&gt;extender
control&lt;/font&gt;&lt;/a&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt;, which I included
in CSLA .NET, making the workaround relatively painless.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;In WPF the solution is slightly
different, but also relatively painless.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;It turns out that this optimization
doesn’t occur if an IValueConverter is associated with the binding, and if the binding’s
UpdateSourceTrigger is not PropertyChanged. &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;For the TextBox control the UpdateSourceTrigger
is LostFocus, so it is good by default, but you’ll want to be aware of this property
for other control types.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;An IValueConverter object’s purpose
is to format and parse the value as it flows to and from the target control and source
data object. In my case however, I don’t want to convert the value at all, I just
want to defeat this unfortunate “optimization”. What’s needed is an &lt;i style="mso-bidi-font-style: normal"&gt;identity
converter&lt;/i&gt;: a converter that does no conversion.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;namespace
Csla.Wpf&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;public
class IdentityConverter : IValueConverter&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;#region
IValueConverter Members&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;public
object Convert(&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;object
value, Type targetType, 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;object
parameter, System.Globalization.CultureInfo culture)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;return
value;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;public
object ConvertBack(&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;object
value, Type targetType, 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;object
parameter, System.Globalization.CultureInfo culture)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;return
value;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;#endregion&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Just configure this in your XAML:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&amp;lt;Page
x:Class="PTWpf.ProjectEdit"&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;xmlns:csla="clr-namespace:Csla.Wpf" 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Title="Project
Edit"&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&amp;lt;Page.Resources&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;&amp;lt;csla:IdentityConverter
x:Key="IdentityConverter" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&amp;lt;/Page.Resources&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;...&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&amp;lt;TextBox
Text="{Binding Data&lt;b style="mso-bidi-font-weight: normal"&gt;, Converter={StaticResource
IdentityConverter&lt;/b&gt;}}"&amp;gt;&amp;lt;/TextBox&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;font color=#000000&gt;...&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Just like that, it all works as
expected and the value from the object is reflected in the UI.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=89bf0c78-2bfc-4872-89b3-5499c4cbd0ae" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,89bf0c78-2bfc-4872-89b3-5499c4cbd0ae.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=e63bdb8b-141a-4791-abd5-9823e967e438</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,e63bdb8b-141a-4791-abd5-9823e967e438.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,e63bdb8b-141a-4791-abd5-9823e967e438.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=e63bdb8b-141a-4791-abd5-9823e967e438</wfw:commentRss>
      <title>Welcome to 2007</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,e63bdb8b-141a-4791-abd5-9823e967e438.aspx</guid>
      <link>http://www.lhotka.net/weblog/WelcomeTo2007.aspx</link>
      <pubDate>Tue, 02 Jan 2007 15:52:48 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;I
you had a good holiday season and enjoyed the end of 2006!&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;For my part, I want to thank everyone
who contributed to the &lt;/font&gt;&lt;a href="http://forums.lhotka.net/"&gt;&lt;font face="Times New Roman" color=#800080 size=3&gt;CSLA
.NET forums&lt;/font&gt;&lt;/a&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt;, and to the &lt;/font&gt;&lt;a href="http://www.codeplex.com/CSLAcontrib"&gt;&lt;font face="Times New Roman" color=#800080 size=3&gt;CSLAcontrib
project&lt;/font&gt;&lt;/a&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;.
The time and energy you have all put in over the past few months has been a great
help to the CSLA .NET community, and I know there are many people out there who are
grateful for your efforts!&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Most importantly though,
I want to thank all the users of CSLA .NET and everyone who has purchased copies of
my books. At the end of the year I received numerous emails thanking me for creating
the framework (and I appreciate that), but I seriously want to thank all of you for
making this a vibrant community. CSLA .NET is one of the most widely used development
frameworks for .NET, and that is because each of you have taken the time to learn
and use the framework. Thank you!&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;For me 2006 was a year
of change. Starting with CSLA .NET 2.0 I've been viewing CSLA .NET as not just an
offshoot of my books, but as a framework in its own right. Of course many people have
been treating it that way for years now, but I hope it has been helpful to have me
treat point releases a bit more formally over the past number of months.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;This extends to version
2.1, which represents an even larger change for me. With version 2.1 I'm releasing
my first self-published ebook to cover the changes. This ebook is not a standalone
book, rather it is best thought of as a "sequel" to the 2005 book. However, it is
well over 150 pages and covers both the changes to the framework itself, as well as
how to use the changes in your application development. The ebook is undergoing technical
review. That and the editing process should take 2-3 weeks, so the ebook will be available
later this month.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Looking at the rest
of 2007 it is clear that I'll be spending a lot of time around .NET 3.0 and 3.5. 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;I'll be merging the &lt;/font&gt;&lt;a href="http://www.lhotka.net/Article.aspx?area=4&amp;amp;id=0eec56bb-2a61-47c4-a9ca-f98371db1cad"&gt;&lt;font face="Times New Roman" color=#800080 size=3&gt;WcfChannel&lt;/font&gt;&lt;/a&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt; into
CSLA .NET itself, as well as implementing support for the DataContract/DataMember
concepts. This, possibly coupled with one WPF interface implementation for collections,
will comprise CSLA .NET 3.0.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;It is not yet clear
to me what changes will occur due to .NET 3.5, but I expect them to be more extensive.
Some of the new C#/VB language features, such as extension methods and lambda expressions,
have the potential to radically change the way we think about interacting with objects
and fields. When you can add arbitrary methods to any type (even sealed types like
String) many interesting options become available.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Then there's the impact
of LINQ itself, and integration with the ADO.NET Entity Framework in one manner or
another. 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;ADO EF appears, at least
on the surface, to be YAORM (yet another ORM). If that continues to be true, then
it is a great way to get table data into data entities, but it doesn't &lt;i style="mso-bidi-font-style: normal"&gt;really&lt;/i&gt; address
mapping the data into objects designed around use cases and responsibility. If you
search this forum for discussions on nHibernate you'll quickly see how ADO EF might
fit into the CSLA .NET worldview just like nHibernate does today: as a powerful replacement
for basic ADO.NET and/or the DAAB.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;LINQ is potentially more interesting,
yet more challenging. It allows you to run select queries across collections. At first
glance you might think this eliminates the need for things like SortedBindingList
or FilteredBindingList. I’m not sure that’s true though, because the result of any
LINQ query is an IEnumerable&amp;lt;T&amp;gt;. This is &lt;i style="mso-bidi-font-style: normal"&gt;the
most basic&lt;/i&gt; type of list in .NET; so basic that the result must often be converted
to a more capable list type.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Certainly when you start thinking
about n-level undo this becomes problematic. BusinessBase (BB) and BusinessListBase
(BLB) work together to implement the undo capabilities provided by CSLA .NET. Running
a LINQ query across a BLB results in an IEnumerable&amp;lt;T&amp;gt;, where T is your BB-derived
child type. At this point you’ve lost all n-level undo support, and data binding (Windows
Forms, and any WPF grid) won’t work right either.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;So at the moment, I’m looking at
LINQ being most useful in the Data Access Layer, along with ADO EF, but time will
tell.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;The point of all this rambling is
this: I didn’t rush CSLA .NET 1.0 or 2.0. They came out when I felt I had good understanding
of the issues I wanted to address in .NET 1.0 and .20 respectively. And when I felt
I had meaningful solutions or answers to those issues. I’m treating .NET 3.5 (and
presumably CSLA .NET 3.5) the same way. I won’t rush CSLA .NET to meet an arbitrary
deadline, and certainly not to match Microsoft’s release of .NET 3.5 itself. There’s
no point coming out with version of CSLA .NET that misses the mark, or that provides
poor solutions to key issues.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;So in 2007 I’ll most certainly be
releasing the version 2.1 ebook and CSLA .NET 3.0 (probably with another small ebook).
Given that Microsoft’s vague plans are to have .NET 3.5 out near the end of 2007,
I don’t expect CSLA .NET 3.5 to be done until sometime in 2008; but you can expect
to see beta versions and/or my experiments around .NET 3.5 as the year goes on.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;Of
course I’ll be doing other things beyond CSLA .NET in 2007. I’m lined up to speak
at the SD West and VS Live San Francisco conferences in March. I’m speaking in 
&lt;st1:City w:st="on"&gt;Denver&lt;/st1:City&gt;
and 
&lt;st1:City w:st="on"&gt;
&lt;st1:place w:st="on"&gt;Boulder&lt;/st1:place&gt;
&lt;/st1:City&gt;
later in January, and I’ll be doing other speaking around the country and/or world
as the year goes on. &lt;/font&gt;&lt;a href="http://www.lhotka.net/Presentations.aspx"&gt;&lt;font face="Times New Roman" color=#800080 size=3&gt;Click
here&lt;/font&gt;&lt;/a&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt; for the page where
I maintain a list of my current speaking engagements.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;To close, thank you all for your
support of the CSLA .NET community, and for your kind words over the past many months.
I wish you all the best in 2007.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Code well, have fun!&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Rocky&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=e63bdb8b-141a-4791-abd5-9823e967e438" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,e63bdb8b-141a-4791-abd5-9823e967e438.aspx</comments>
      <category>Books</category>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=7ee96e95-a099-4031-a0f4-7fee663e64a3</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,7ee96e95-a099-4031-a0f4-7fee663e64a3.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,7ee96e95-a099-4031-a0f4-7fee663e64a3.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=7ee96e95-a099-4031-a0f4-7fee663e64a3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The long-awaited release of <a href="http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx">VS
2005 SP1</a> is finally here. 
</p>
        <p>
Perhaps most importantly, SP1 rolls up a number of hotfixes that many people have
been using for a long time to improve the stability and performance of Visual Studio
2005. I know this is one service pack I'm installing immediately!!
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=7ee96e95-a099-4031-a0f4-7fee663e64a3" />
      </body>
      <title>VS 2005 SP1 available for download</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,7ee96e95-a099-4031-a0f4-7fee663e64a3.aspx</guid>
      <link>http://www.lhotka.net/weblog/VS2005SP1AvailableForDownload.aspx</link>
      <pubDate>Fri, 15 Dec 2006 17:36:51 GMT</pubDate>
      <description>&lt;p&gt;
The long-awaited release of &lt;a href="http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx"&gt;VS
2005 SP1&lt;/a&gt; is finally here. 
&lt;/p&gt;
&lt;p&gt;
Perhaps most importantly, SP1 rolls up a number of hotfixes that many people have
been using for a long time to improve the stability and performance of Visual Studio
2005. I know this is one service pack I'm installing immediately!!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=7ee96e95-a099-4031-a0f4-7fee663e64a3" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,7ee96e95-a099-4031-a0f4-7fee663e64a3.aspx</comments>
      <category>Microsoft .NET</category>
      <category>News</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=e85dd811-195d-4eca-a3b1-15c0d37a745b</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,e85dd811-195d-4eca-a3b1-15c0d37a745b.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,e85dd811-195d-4eca-a3b1-15c0d37a745b.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=e85dd811-195d-4eca-a3b1-15c0d37a745b</wfw:commentRss>
      <title>Where Workflow Foundation really shines</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,e85dd811-195d-4eca-a3b1-15c0d37a745b.aspx</guid>
      <link>http://www.lhotka.net/weblog/WhereWorkflowFoundationReallyShines.aspx</link>
      <pubDate>Tue, 05 Sep 2006 17:24:24 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Several people have asked me about
my thoughts on the Microsoft .NET 3.0 Workflow Foundation (WF) technology.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;My views certainly don’t correspond
with Microsoft's official line. But the “official line” comes from the WF marketing
team, and they'll tell you that WF is the be-all-and-end-all, and that's obviously
silly. Microsoft product teams are always excited about their work, which is good
and makes sense. We all just need to apply an "excitement filter" to anything they
say, bring it back to reality and decide what really works for us. ;)&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Depending on who you talk to, WF
should be used to do almost anything and everything. It can drive your UI, replace
your business layer, orchestrate your processes and workflow, manage your data access
and solve world hunger…&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;My view on WF is a bit more modest: &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Most applications have
a lot of highly interactive processes - where users edit, view and otherwise interact
with the system. These applications almost always also have some non-interactive processes
- where the user initiates an action, but then a sequence of steps are followed without
the user's input, and typically without even telling the user about each step.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Think about an inventory
system. There's lots of interaction as the user adds products, updates quantities,
moves inventory around, changes cost/price data, etc. Then there's almost always a
point at which a "pick list" gets generated so someone can go into the warehouse and
actually get the stuff so it can be shipped or used or whatever. Generating a pick
list is a non-trivial task, because it requires looking at demand (orders, etc.),
evaluating what products to get, where they are and ordering the list to make the
best use of the stock floor personnel's time. This is a non-interactive process.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Today we all write these
non-interactive processes in code. Maybe with a set of objects working in concert,
but more often as a linear or procedural set of code. If a change is needed to the
process, we have to alter the code itself, possibly introducing unintended side-effects,
because there's little isolation between steps.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Personally I think this is where
WF fits in. It is really good at helping you create and manage non-interactive processes.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Yes, you have to think about those
non-interactive processes in a different way to use WF. But it is probably worth it,
because in the end you'll have divided each process into a set of discrete, autonomous
steps. WF itself will invoke each step in order, and you have the pleasure (seriously!)
of creating each step as an independent unit of code. &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;From an OO design perspective
it is almost perfect, because each step is a use case, that can be designed and implemented
in isolation - which is a rare and exciting thing!&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Note that getting to
this point really does require rethinking of the non-interactive process. You have
to break the process down into a set of discrete steps, ensuring that each step has
very clearly defined inputs and outputs, and the implementation of each step must
arbitrarily ensure any prerequisites are met, because it can't know in what order
things will eventually occur.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;The great thing (?)
about this design process is that the decomposition necessary to pull it off is exactly
the same stuff universities were teaching 25 years ago to COBOL and FORTRAN students.
This is procedural programming "done right". To me though, the cool think is that
each "procedure" now becomes a use case, and so we're finally in a position to exploit
the power of procedural AND object-oriented design and programming! (and yes, I am
totally serious)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;So in the end, I think
that most applications have a place for WF, because most applications have one or
more of these non-interactive processes. The design effort is worth it, because the
end result is a more flexible and maintainable process within your application.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=e85dd811-195d-4eca-a3b1-15c0d37a745b" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,e85dd811-195d-4eca-a3b1-15c0d37a745b.aspx</comments>
      <category>Architecture</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=fa737d6a-4e28-4ee5-9a73-f22303cf29b9</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,fa737d6a-4e28-4ee5-9a73-f22303cf29b9.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,fa737d6a-4e28-4ee5-9a73-f22303cf29b9.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=fa737d6a-4e28-4ee5-9a73-f22303cf29b9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
According to <a href="http://blogs.msdn.com/somasegar/archive/2006/06/09/624300.aspx">this
blog post by Soma</a>, WinFX is now going to be named .NET 3.0.
</p>
        <p>
Now on one hand this makes sense. There's no doubt that WinFX introduces major functionality
to .NET. Windows Presentation Foundation is the effective successor to Windows Forms
after all - how much more major can you get??
</p>
        <p>
On the other hand, the new .NET 3.0 doesn't break any .NET 2.0 code, and yet it "includes"
.NET 2.0. All .NET 3.0 does is add new stuff. Typically, when I think of a major version
number changing, I expect that I'll have to retest everything and that much of my
stuff might break or be affected. None of that is happening here.
</p>
        <p>
Even changing from .NET 1.0 to 1.1 brought tons of headaches (if you used Remoting
or Enterprise Services at least). And that was a <em>point</em> release. Yet here
we have a major version change that doesn't change any existing bits.
</p>
        <p>
I guess it just goes to show that there are no hard-and-fast rules in the software
industry ;)
</p>
        <p>
In any case, there's no doubt that Microsoft will reduce confusion overall by keeping
everything under the .NET moniker, so I think this is a wise move.
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=fa737d6a-4e28-4ee5-9a73-f22303cf29b9" />
      </body>
      <title>.NET 2.0 plus WinFX = .NET 3.0</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,fa737d6a-4e28-4ee5-9a73-f22303cf29b9.aspx</guid>
      <link>http://www.lhotka.net/weblog/NET20PlusWinFXNET30.aspx</link>
      <pubDate>Fri, 09 Jun 2006 22:54:33 GMT</pubDate>
      <description>&lt;p&gt;
According to &lt;a href="http://blogs.msdn.com/somasegar/archive/2006/06/09/624300.aspx"&gt;this
blog post by Soma&lt;/a&gt;, WinFX is now going to be&amp;nbsp;named .NET 3.0.
&lt;/p&gt;
&lt;p&gt;
Now on one hand this makes sense. There's no doubt that WinFX introduces major functionality
to .NET. Windows Presentation Foundation is the effective successor to Windows Forms
after all - how much more major can you get??
&lt;/p&gt;
&lt;p&gt;
On the other hand, the new .NET 3.0 doesn't break any .NET 2.0 code, and yet it "includes"
.NET 2.0. All .NET 3.0 does is add new stuff. Typically, when I think of a major version
number changing, I expect that I'll have to retest everything and that much of my
stuff might break or be affected. None of that is happening here.
&lt;/p&gt;
&lt;p&gt;
Even changing from .NET 1.0 to 1.1 brought tons of headaches (if you used Remoting
or Enterprise Services at least). And that was a &lt;em&gt;point&lt;/em&gt; release. Yet here
we have a major version change that doesn't change any existing bits.
&lt;/p&gt;
&lt;p&gt;
I guess it just goes to show that there are no hard-and-fast rules in the software
industry ;)
&lt;/p&gt;
&lt;p&gt;
In any case, there's no doubt that Microsoft will reduce confusion overall by keeping
everything under the .NET moniker, so I think this is a wise move.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=fa737d6a-4e28-4ee5-9a73-f22303cf29b9" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,fa737d6a-4e28-4ee5-9a73-f22303cf29b9.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=dfb83e92-c297-4fc8-9c36-27dbb33201ef</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,dfb83e92-c297-4fc8-9c36-27dbb33201ef.aspx</pingback:target>
      <dc:creator>Rockford Lhotka</dc:creator>
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,dfb83e92-c297-4fc8-9c36-27dbb33201ef.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=dfb83e92-c297-4fc8-9c36-27dbb33201ef</wfw:commentRss>
      <title>Dynamically loading assemblies from shadow directories</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,dfb83e92-c297-4fc8-9c36-27dbb33201ef.aspx</guid>
      <link>http://www.lhotka.net/weblog/DynamicallyLoadingAssembliesFromShadowDirectories.aspx</link>
      <pubDate>Sat, 13 May 2006 18:53:49 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;I’ve run into a spot where I’m stuck,
and I’m hoping someone has an idea.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;CSLA .NET 2.0 includes an ASP.NET
data source control: CslaDataSource. This works well, except for one issue, which
is that it doesn’t refresh the metadata for your business objects unless you close
VS 2005 and reopen the IDE.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;The reason for this problem is that
your business assembly gets loaded into memory so the data source control can reflect
against it to gather the metadata. That part works fine, but once an assembly is loaded
into an AppDomain it can’t be unloaded. It is possible to unload an entire AppDomain
however, and so that’s the obvious solution: load the business assembly into a temporary
AppDomain.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;So this is what I’m trying to do,
and where I’m stuck. You see VS 2005 has a very complex way of loading assemblies
into ASP.NET web projects. It actually appears to use the ASP.NET temporary file scheme
to shadow the assemblies as it loads them. Each time you rebuild your solution (or
a dependant assembly – like your business assembly), a new shadow directory is created.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;The CslaDataSource control is loaded
into the AppDomain from the first shadow directory – and from what I can tell that
AppDomain never unloads, so the control is always running from that first shadow directory.
And then – even if I use a temporary AppDomain – the business assembly is also loaded
from that same shadow directory, even if newer ones exist.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;And that’s where I’m stuck. I have
no idea how to find out the current shadow directory, and even if I do odd things
like hard-coding the directory, then I just get in trouble because the new AppDomain
thinks it has a different Csla.dll than the AppDomain hosting the Web Forms designer.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Here’s the code that loads the Type
object within the temporary AppDomain:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: teal"&gt;IDataSourceFieldSchema&lt;/span&gt;&lt;font color=#000000&gt;[]
GetFields()&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;List&lt;/span&gt;&lt;font color=#000000&gt;&amp;lt;&lt;/font&gt;&lt;span style="COLOR: teal"&gt;ObjectFieldInfo&lt;/span&gt;&lt;font color=#000000&gt;&amp;gt;
result = 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: teal"&gt;List&lt;/span&gt;&lt;font color=#000000&gt;&amp;lt;&lt;/font&gt;&lt;span style="COLOR: teal"&gt;ObjectFieldInfo&lt;/span&gt;&lt;font color=#000000&gt;&amp;gt;();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;System.Security.&lt;/font&gt;&lt;span style="COLOR: teal"&gt;NamedPermissionSet&lt;/span&gt;&lt;font color=#000000&gt; fulltrust
=&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt;&lt;font color=#000000&gt; System.Security.&lt;/font&gt;&lt;span style="COLOR: teal"&gt;NamedPermissionSet&lt;/span&gt;&lt;font color=#000000&gt;(&lt;/font&gt;&lt;span style="COLOR: maroon"&gt;"FullTrust"&lt;/span&gt;&lt;font color=#000000&gt;);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;AppDomain&lt;/span&gt;&lt;font color=#000000&gt; tempDomain
= &lt;/font&gt;&lt;span style="COLOR: teal"&gt;AppDomain&lt;/span&gt;&lt;font color=#000000&gt;.CreateDomain(&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: maroon"&gt;"__temp"&lt;/span&gt;&lt;font color=#000000&gt;,&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;AppDomain&lt;/span&gt;&lt;font color=#000000&gt;.CurrentDomain.Evidence,&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;AppDomain&lt;/span&gt;&lt;font color=#000000&gt;.CurrentDomain.SetupInformation,&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;fulltrust,&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt;&lt;font color=#000000&gt; System.Security.Policy.&lt;/font&gt;&lt;span style="COLOR: teal"&gt;StrongName&lt;/span&gt;&lt;font color=#000000&gt;[]
{ });&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;try&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;//
load the TypeLoader object in the temp AppDomain&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Assembly&lt;/span&gt;&lt;font color=#000000&gt; thisAssembly
= &lt;/font&gt;&lt;span style="COLOR: teal"&gt;Assembly&lt;/span&gt;&lt;font color=#000000&gt;.GetExecutingAssembly();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;&lt;font color=#000000&gt; id
= &lt;/font&gt;&lt;span style="COLOR: teal"&gt;AppDomain&lt;/span&gt;&lt;font color=#000000&gt;.CurrentDomain.Id;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;TypeLoader&lt;/span&gt;&lt;font color=#000000&gt; loader
=&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;(&lt;/font&gt;&lt;span style="COLOR: teal"&gt;TypeLoader&lt;/span&gt;&lt;font color=#000000&gt;)tempDomain.CreateInstanceFromAndUnwrap(&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;thisAssembly.CodeBase, &lt;/font&gt;&lt;span style="COLOR: blue"&gt;typeof&lt;/span&gt;&lt;font color=#000000&gt;(&lt;/font&gt;&lt;span style="COLOR: teal"&gt;TypeLoader&lt;/span&gt;&lt;font color=#000000&gt;).FullName);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;//
load the business type in the temp AppDomain&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Type&lt;/span&gt;&lt;font color=#000000&gt; t
= loader.GetType(&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;_typeAssemblyName,
_typeName);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;//
load the metadata from the Type object&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt;&lt;font color=#000000&gt; (&lt;/font&gt;&lt;span style="COLOR: blue"&gt;typeof&lt;/span&gt;&lt;font color=#000000&gt;(&lt;/font&gt;&lt;span style="COLOR: teal"&gt;IEnumerable&lt;/span&gt;&lt;font color=#000000&gt;).IsAssignableFrom(t))&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;//
this is a list so get the item type&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;t
= &lt;/font&gt;&lt;span style="COLOR: teal"&gt;Utilities&lt;/span&gt;&lt;font color=#000000&gt;.GetChildItemType(t);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;PropertyDescriptorCollection&lt;/span&gt;&lt;font color=#000000&gt; props
=&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;TypeDescriptor&lt;/span&gt;&lt;font color=#000000&gt;.GetProperties(t);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;foreach&lt;/span&gt;&lt;font color=#000000&gt; (&lt;/font&gt;&lt;span style="COLOR: teal"&gt;PropertyDescriptor&lt;/span&gt;&lt;font color=#000000&gt; item &lt;/font&gt;&lt;span style="COLOR: blue"&gt;in&lt;/span&gt;&lt;font color=#000000&gt; props)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt;&lt;font color=#000000&gt; (item.IsBrowsable)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;result.Add(&lt;/font&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: teal"&gt;ObjectFieldInfo&lt;/span&gt;&lt;font color=#000000&gt;(item));&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;finally&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;AppDomain&lt;/span&gt;&lt;font color=#000000&gt;.Unload(tempDomain);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt;&lt;font color=#000000&gt; result.ToArray();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;This replaces the method of the
same name from ObjectViewSchema in the book.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Notice that it creates a new AppDomain
and then invokes a TypeLoader class inside that AppDomain to create the Type object
for the business class. The TypeLoader is a new class in Csla.dll that looks like
this:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System.Collections.Generic;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System.Text;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; Csla.Web.Design&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;summary&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; Loads
a Type object into the AppDomain.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/summary&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;class&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: teal"&gt;TypeLoader&lt;/span&gt;&lt;font color=#000000&gt; : &lt;/font&gt;&lt;span style="COLOR: teal"&gt;MarshalByRefObject&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;summary&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; Returns
a &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;see cref="Type"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;Type&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/see&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt; object
based on the&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; assembly
and type information provided.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/summary&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;param
name="assemblyName"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;(Optional) Assembly name
containing the type.&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/param&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;param
name="typeName"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;Full type name of the class.&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/param&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: teal"&gt;Type&lt;/span&gt;&lt;font color=#000000&gt; GetType(&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;font color=#000000&gt; assemblyName, &lt;/font&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;font color=#000000&gt; typeName)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;&lt;font color=#000000&gt; id
= &lt;/font&gt;&lt;span style="COLOR: teal"&gt;AppDomain&lt;/span&gt;&lt;font color=#000000&gt;.CurrentDomain.Id;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt;&lt;font color=#000000&gt; Csla.Web.&lt;/font&gt;&lt;span style="COLOR: teal"&gt;CslaDataSource&lt;/span&gt;&lt;font color=#000000&gt;.GetType(&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;assemblyName,
typeName);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Since this object is created in
the temporary AppDomain, the business assembly is loaded into that AppDomain. The
Type object is [Serializable] and so is serialized back to the main AppDomain so the
data source control can get the metadata as needed.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;This actually all works – except
that it doesn’t pick up new shadow directories as they are created.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Any ideas on how to figure out the
proper shadow directory are appreciated.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Honestly, I can’t figure out how
this works in general – because obviously &lt;i style="mso-bidi-font-style: normal"&gt;some
part&lt;/i&gt; of the VS designer picks up the new shadow directory and uses it – even though
the designer apparently doesn’t. I am quite lost here.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;To make matters worse, things operate
entirely differently when a debugger is attached to VS than when not. When a debugger
is attached to VS then &lt;i style="mso-bidi-font-style: normal"&gt;nothing&lt;/i&gt; appears
to pick up the new shadow directories – so I assume the debugger is interfering somehow.
But it makes tracking down the issues really hard.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=dfb83e92-c297-4fc8-9c36-27dbb33201ef" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,dfb83e92-c297-4fc8-9c36-27dbb33201ef.aspx</comments>
      <category>CSLA .NET</category>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=44a310f7-8d7f-4e2d-b2b1-41ed11293474</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,44a310f7-8d7f-4e2d-b2b1-41ed11293474.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,44a310f7-8d7f-4e2d-b2b1-41ed11293474.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=44a310f7-8d7f-4e2d-b2b1-41ed11293474</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just got back from Norway (so my body has no idea what time it actually is right
now...), and one of the conversations I had while there was about data binding a TextBox
to an object's property that is a Nullable&lt;T&gt; - like Nullable(Of Integer) or
something.
</p>
        <p>
Somehow I had expected that Windows Forms would have anticipated this (obvious) concept
and would handle it. Not so...
</p>
        <p>
Fortunately, as a result of this conversation, one of the people at the conference
took some of the ideas we were tossing around and <a href="http://www.thejoyofcode.com/Databinding_and_Nullable_types_in_WinForms.NET.aspx">came
up with an extender control</a> to address the issue. Very nice!
</p>
        <img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=44a310f7-8d7f-4e2d-b2b1-41ed11293474" />
      </body>
      <title>Extending controls to handle Nullable types</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,44a310f7-8d7f-4e2d-b2b1-41ed11293474.aspx</guid>
      <link>http://www.lhotka.net/weblog/ExtendingControlsToHandleNullableTypes.aspx</link>
      <pubDate>Fri, 12 May 2006 13:57:52 GMT</pubDate>
      <description>&lt;p&gt;
I just got back from Norway (so my body has no idea what time it actually is right
now...), and one of the conversations I had while there was about data binding a TextBox
to an object's property that is a Nullable&amp;lt;T&amp;gt; - like Nullable(Of Integer) or
something.
&lt;/p&gt;
&lt;p&gt;
Somehow I had expected that Windows Forms would have anticipated this (obvious) concept
and would handle it. Not so...
&lt;/p&gt;
&lt;p&gt;
Fortunately, as a result of this conversation, one of the people at the conference
took some of the ideas we were tossing around and &lt;a href="http://www.thejoyofcode.com/Databinding_and_Nullable_types_in_WinForms.NET.aspx"&gt;came
up with an extender control&lt;/a&gt; to address the issue. Very nice!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=44a310f7-8d7f-4e2d-b2b1-41ed11293474" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,44a310f7-8d7f-4e2d-b2b1-41ed11293474.aspx</comments>
      <category>Microsoft .NET</category>
    </item>
    <item>
      <trackback:ping>http://www.lhotka.net/weblog/Trackback.aspx?guid=0e5f98c7-7e72-44ee-a9d0-f014adaf7587</trackback:ping>
      <pingback:server>http://www.lhotka.net/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.lhotka.net/weblog/PermaLink,guid,0e5f98c7-7e72-44ee-a9d0-f014adaf7587.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.lhotka.net/weblog/CommentView,guid,0e5f98c7-7e72-44ee-a9d0-f014adaf7587.aspx</wfw:comment>
      <wfw:commentRss>http://www.lhotka.net/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=0e5f98c7-7e72-44ee-a9d0-f014adaf7587</wfw:commentRss>
      <title>SPOIL - interesting ideas</title>
      <guid isPermaLink="false">http://www.lhotka.net/weblog/PermaLink,guid,0e5f98c7-7e72-44ee-a9d0-f014adaf7587.aspx</guid>
      <link>http://www.lhotka.net/weblog/SPOILInterestingIdeas.aspx</link>
      <pubDate>Wed, 01 Mar 2006 16:00:01 GMT</pubDate>
      <description>&lt;p&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: Verdana"&gt;This &lt;a href="http://msdn.microsoft.com/architecture/default.aspx?pull=/library/en-us/dnbda/html/SPOIL.asp"&gt;recent
MSDN article&lt;/a&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt; talks
about SPOIL: Stored Procedure Object Interface Layer.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: Verdana"&gt;This is an interesting,
and generally good idea as I see it. Unfortunately this team, like most of Microsoft,
apparently just doesn't understand the concept of data hiding in OO. SPOIL allows
you to use your object's &lt;em&gt;&lt;span style="FONT-FAMILY: Verdana"&gt;properties&lt;/span&gt;&lt;/em&gt; as
data elements for a stored procedure call, which is great as long as you only have
public read/write properties. But data hiding &lt;em&gt;&lt;span style="FONT-FAMILY: Verdana"&gt;requires&lt;/span&gt;&lt;/em&gt; that
you will have some private fields that simply aren't exposed as public read/write
properties. If SPOIL supported using &lt;em&gt;&lt;span style="FONT-FAMILY: Verdana"&gt;fields&lt;/span&gt;&lt;/em&gt; as
data elements for a stored procedure call it would be totally awesome!&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: Verdana"&gt;The same is true
for LINQ. It works against public read/write properties, which means it is totally
useless if you want to use it to load "real" objects that employ basic concepts like
encapsulation and data hiding. Oh sure, you can use LINQ (well, dlinq really) to load
a DTO (data transfer object - an object with only public read/write properties and
no business logic) and then copy the data from the DTO into your real object. Or you
could try to use the DTO as the "data container" inside your real object rather than
using private fields. But frankly those options introduce complexity that should be
simply unnecessary...&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: Verdana"&gt;While it is true
that loading private fields requires reflection - Microsoft could solve this. They &lt;em&gt;&lt;span style="FONT-FAMILY: Verdana"&gt;do&lt;/span&gt;&lt;/em&gt; own
the CLR after all... It is surely within their power to provide a truly good solution
to the problem, that supports data mapping and also allows for key OO concepts like
encapsulation and data hiding.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=0e5f98c7-7e72-44ee-a9d0-f014adaf7587" /&gt;</description>
      <comments>http://www.lhotka.net/weblog/CommentView,guid,0e5f98c7-7e72-44ee-a9d0-f014adaf7587.aspx</comments>
      <category>Architecture</category>
      <category>Distributed OO</category>
      <category>Microsoft .NET</category>
    </item>
  </channel>
</rss>