<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>.NET Ramblings - Brian Noyes' Blog</title>
  <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/" />
  <link rel="self" href="http://www.softinsight.com/bnoyes/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2009-05-30T12:35:29.3524414-04:00</updated>
  <author>
    <name>Brian Noyes</name>
  </author>
  <subtitle>Occasional mutterings on .NET architecture and development</subtitle>
  <id>http://www.softinsight.com/bnoyes/</id>
  <generator uri="http://www.dasblog.net" version="2.0.7180.0">DasBlog</generator>
  <entry>
    <title>Debuggable Self-Host Windows Service Projects</title>
    <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/2009/05/30/DebuggableSelfHostWindowsServiceProjects.aspx" />
    <id>http://www.softinsight.com/bnoyes/PermaLink,guid,ad5d7823-f59e-49b7-a35c-edc4ea626842.aspx</id>
    <published>2009-05-30T12:35:29.3524414-04:00</published>
    <updated>2009-05-30T12:35:29.3524414-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
When developing self-hosted WCF services, you really need two things:
</p>
        <ol>
          <li>
A windows service project that will be the host for the deployed environment. 
</li>
          <li>
A console self-host project for easy debugging while developing the service. 
</li>
        </ol>
        <p>
Yes, there is also the option to use a WCF Service Library project with its associated
WcfServiceHost.exe process that self hosts the service for debugging. However, I have
run into too many occasions where something is going wrong and not having direct access
to the hosting code wastes more cycles than it takes to set up my own service host,
so other than quick demos, I never use the WcfServiceHost.exe in production development.
</p>
        <p>
Having two separate projects to address 1 &amp; 2 above is not really that great either,
but if you try to run a service project in the debugger, you get an error telling
you it can only be run through the services panel in Windows. 
</p>
        <p>
However, through a quick and easy pattern, you can make your service projects so they
run as a console for development, but run as a service just fine when installed.
</p>
        <h4>Step 1: Create a Windows Service project for the self host environment.
</h4>
        <p>
This is just the standard selection in the project dialog for a Windows Service project.
Once you have your service class, rename it as appropriate and right click on the
designer surface to add an installer class for the service. Standard stuff here.
</p>
        <h4>Step 2: Implement your hosting code in a separate class from the service class
itself.
</h4>
        <p>
For example, here is a very simple hosting class that can be used for any service
in any project (with some appropriate exception handling and logging added in for
production purposes):
</p>
        <pre class="csharpcode">
          <span class="kwrd">public</span>
          <span class="kwrd">class</span> SelfHost&lt;T&gt;
{ ServiceHost m_Host; <span class="kwrd">public</span><span class="kwrd">void</span> Start()
{ m_Host = <span class="kwrd">new</span> ServiceHost(<span class="kwrd">typeof</span>(T));
m_Host.Open(); } <span class="kwrd">public</span><span class="kwrd">void</span> Stop()
{ m_Host.Close(); } }</pre>
        <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
From the service class itself, you can just instantiate an this class and call its
Start and Stop methods.
</p>
        <pre class="csharpcode">
          <span class="kwrd">public</span>
          <span class="kwrd">partial</span>
          <span class="kwrd">class</span> SimpleServiceHostService
: ServiceBase { SelfHost&lt;SomeService&gt; m_Host = <span class="kwrd">new</span> SelfHost&lt;SomeService&gt;(); <span class="kwrd">public</span> SimpleServiceHostService()
{ InitializeComponent(); } <span class="kwrd">protected</span><span class="kwrd">override</span><span class="kwrd">void</span> OnStart(<span class="kwrd">string</span>[]
args) { m_Host.Start(); } <span class="kwrd">protected</span><span class="kwrd">override</span><span class="kwrd">void</span> OnStop()
{ m_Host.Stop(); } }</pre>
        <p>
          <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
Now when you install this service, the service host will be started and stopped through
the services panel or automatically depending on the service configuration.
</p>
        <h4>Step 3: Modify the Main method to start conditionally as a Console or a service.
</h4>
        <p>
Modify the default main declaration with no parameter to the signature for a main
that takes a string[] of arguments. If arguments are present, run the code as if you
are in a console app. If no arguments, call the default code for starting it as a
service. For the console host mode, just call the Start and Stop methods on an instance
of your host class just like the windows service did.
</p>
        <pre class="csharpcode">
          <span class="kwrd">static</span>
          <span class="kwrd">void</span> Main(<span class="kwrd">string</span>[]
args) { <span class="rem">// Run as console if there are command line arguments</span><span class="kwrd">if</span> (args.Length
&gt; 0) { SelfHost&lt;SomeService&gt; host = <span class="kwrd">new</span> SelfHost&lt;SomeService&gt;();
host.Start(); Console.WriteLine(<span class="str">"Press Enter to Exit..."</span>);
Console.ReadLine(); host.Stop(); } <span class="kwrd">else</span><span class="rem">//
run as service</span> { ServiceBase[] ServicesToRun; ServicesToRun = <span class="kwrd">new</span> ServiceBase[]
{ <span class="kwrd">new</span> SimpleServiceHostService() }; ServiceBase.Run(ServicesToRun);
} }</pre>
        <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
 
</p>
        <h4>Step 4: Modify the project properties to be a console application and add a debug
command line parameter.
</h4>
        <p>
          <a href="http://www.softinsight.com/bnoyes/content/binary/WindowsLiveWriter/DebuggableSelfHostWindowsServiceProjects_ACDE/ApplicationType_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ApplicationType" border="0" alt="ApplicationType" src="http://www.softinsight.com/bnoyes/content/binary/WindowsLiveWriter/DebuggableSelfHostWindowsServiceProjects_ACDE/ApplicationType_thumb.png" width="690" height="413" />
          </a>
        </p>
        <p>
          <a href="http://www.softinsight.com/bnoyes/content/binary/WindowsLiveWriter/DebuggableSelfHostWindowsServiceProjects_ACDE/DebugOptions_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DebugOptions" border="0" alt="DebugOptions" src="http://www.softinsight.com/bnoyes/content/binary/WindowsLiveWriter/DebuggableSelfHostWindowsServiceProjects_ACDE/DebugOptions_thumb.png" width="692" height="414" />
          </a>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
That is basically it. Change the code shown above to use your service type, add an
app.config with the appropriate WCF service code, and you are ready to run as a console
app in the debugger, but when you build and install your service as a service, it
will run fine as that as well.
</p>
        <p>
You can <a href="http://www.softinsight.com/downloads/Blog/DebuggableWindowsServiceHost.zip" target="_blank">download
a full sample application here</a>.
</p>
        <img width="0" height="0" src="http://www.softinsight.com/bnoyes/aggbug.ashx?id=ad5d7823-f59e-49b7-a35c-edc4ea626842" />
      </div>
    </content>
  </entry>
  <entry>
    <title>TechEd SOA401 &amp;ndash; Developing Service Oriented Workflows</title>
    <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/2009/05/13/TechEdSOA401NdashDevelopingServiceOrientedWorkflows.aspx" />
    <id>http://www.softinsight.com/bnoyes/PermaLink,guid,687061b3-53df-4abd-9590-76ff656202b2.aspx</id>
    <published>2009-05-13T10:44:43.5202727-04:00</published>
    <updated>2009-05-13T10:44:43.5202727-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
This morning I am giving the subject session at TechEd. For those of you that attended,
thanks! You can probably jump to the link at the bottom for the demos unless you want
a quick review of what we covered by reading the rest of this post.
</p>
        <p>
This session discusses .NET 3.5 Workflow Services, and I also touch on what is different
in .NET 4.0 throughout and at the end. I also have a brief discussion at the end about
cloud workflows, using workflow activities from .NET Services and running workflows
in the cloud with Windows Azure.
</p>
        <p>
In the talk, I demonstrate the use of the ReceiveActivity for exposing service operations
from a workflow. I show how to add the receive activity to a workflow, hook it up
to a service contract and the operations on that contract, how to bind the incoming
parameters to other workflow properties and how to retrieve the return result from
workflow properties through a binding. I then show how to host the workflow as a service
using the WorkflowServiceHost class, how to get a reference to the WorkflowRuntime
from the host (to hook up to workflow events), and how to configure the right bindings
(context bindings) to expose the workflow. Then I write a quick client that is able
to call the workflow to get it running and pass parameters to it.
</p>
        <p>
Then I jump to a more complicated workflow that represents a loan application process
as a state machine workflow. The loan application is submitted through a service call,
and then approve or reject actions can be taken through service calls. I show how
calls from the same client work out automatically through the passing of the instance
ID through the context bindings, and how to allow multiple clients to interact with
the same workflow by setting and getting the instance ID out of the context.
</p>
        <p>
Then I show that the loan application workflow also needs to make service calls out
to another credit checking service. So I demonstrate how you can use a SendActivity
to act as a dynamic proxy in the workflow to call another service. Like the ReceiveActivity,
you use bindings on dynamic properties to provide values for the outgoing parameters
and to deal with any returned values.
</p>
        <p>
I also discuss the limitations of the SendActivity and how to work around it by creating
a simple custom activity to encapsulate a normal WCF proxy over which you have complete
control.
</p>
        <p>
Then I show an application that is composed of two workflows, a parent workflow and
a child workflow. The parent invokes the child workflow and gets results back from
the child. The trick with this scenario is how you need to pass the context to the
child workflow of the receive activity that the call will come back into in the parent
workflow so that the workflow runtime can reassociate the incoming call with the right
instance and right receive activity.
</p>
        <p>
If you want to take a look at the demos that do all of the above, <a href="http://www.softinsight.com/downloads/Conferences/TechEd2009/SOA401_WorkflowServicesDemos.zip" target="_blank">here
you go</a>.
</p>
        <img width="0" height="0" src="http://www.softinsight.com/bnoyes/aggbug.ashx?id=687061b3-53df-4abd-9590-76ff656202b2" />
      </div>
    </content>
  </entry>
  <entry>
    <title>NoVa Code Camp &amp;ndash; 23 May</title>
    <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/2009/05/07/NoVaCodeCampNdash23May.aspx" />
    <id>http://www.softinsight.com/bnoyes/PermaLink,guid,339eabc0-4422-43ca-b921-a7cfd6e6af9e.aspx</id>
    <published>2009-05-07T07:26:37.909-04:00</published>
    <updated>2009-05-07T12:09:59.7089357-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Update: Apparently I found a wormhole this morning and stated January instead of May.
That would be May 23!
</p>
        <p>
We have a <a href="http://novacodecamp.org/Home/tabid/36/Default.aspx">code camp</a> coming
up on Saturday 23 May in Northern Virginia at the Reston Microsoft Training Center
at <a href="http://novacodecamp.org/Home/Location/tabid/53/Default.aspx">12012 Sunset
Hills Rd, Reston, VA</a>. There is a great line up with 4 tracks and over 20 speakers.
</p>
        <p>
I’ll be giving a session on Developing Service Oriented Workflows, come out and expand
your brain!
</p>
        <img width="0" height="0" src="http://www.softinsight.com/bnoyes/aggbug.ashx?id=339eabc0-4422-43ca-b921-a7cfd6e6af9e" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Selecting the Right Client Technology Interview</title>
    <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/2009/04/30/SelectingTheRightClientTechnologyInterview.aspx" />
    <id>http://www.softinsight.com/bnoyes/PermaLink,guid,ca834e45-e8fc-4587-bb74-4dd3c70786f0.aspx</id>
    <published>2009-04-30T19:50:25.4165753-04:00</published>
    <updated>2009-04-30T19:50:25.4165753-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last year at TechEd, I was interviewed for ARCast TV about selecting the right client
technology for your application, which I also gave as a breakout session at the conference.
I don’t know why it took almost a year to produce, but that interview is now available.
You can check it out here:
</p>
        <p>
          <a href="http://channel9.msdn.com/shows/ARCast.TV/ARCastTV-Brian-Noyes-on-Selecting-the-Correct-Client-Technology/">http://channel9.msdn.com/shows/ARCast.TV/ARCastTV-Brian-Noyes-on-Selecting-the-Correct-Client-Technology/</a>
        </p>
        <p>
Some of the key points from the discussion included:
</p>
        <p>
- WPF is really your best choice for any new smart client application development
over Windows Forms if you care about building your team’s skill set where it matters
for the long term.
</p>
        <p>
- Windows Forms is still relevant for evolving existing applications, and even for
new applications that are intensive on data editing but not visualization, where you
have an existing team with deep knowledge in Windows Forms but no experience with
WPF, and where you can justify that you will never need to have enhanced graphics,
user experience, or advanced data visualizations.
</p>
        <p>
- Silverlight is the way to go for anything where you want both broad reach in the
browser and rich graphics. Particularly with the announcements of features in Silverlight
3 since this interview occurred, there are many applications that in the future with
Silverlight 3 will be just as well off as a Silverlight application as they would
be with WPF for businesses.
</p>
        <p>
- ASP.NET (using AJAX features for better user experience) can still go a long way
in delivering what you need for broad reach applications, and is certainly the way
to continue if you have a good investment in web application development with .NET. 
</p>
        <p>
- Mixing ASP.NET and Silverlight for where their strengths lay is the sweet spot for
web
</p>
        <p>
- Starting to invest in WPF knowledge now is the right choice for the future with
smart client development
</p>
        <p>
Nothing too earth shattering will cause <a href="http://en.wikipedia.org/wiki/Nostradamus">Nostradamus</a> to
rise from his grave, but hopefully helps cement some tough technology choices for
people who were not sure which direction to head.  
</p>
        <img width="0" height="0" src="http://www.softinsight.com/bnoyes/aggbug.ashx?id=ca834e45-e8fc-4587-bb74-4dd3c70786f0" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Building Composite WPF Applications at Evansville .NET Users Group</title>
    <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/2009/04/22/BuildingCompositeWPFApplicationsAtEvansvilleNETUsersGroup.aspx" />
    <id>http://www.softinsight.com/bnoyes/PermaLink,guid,6de71a0c-5091-4608-98b6-1815ac6ddad9.aspx</id>
    <published>2009-04-22T16:36:51.4871864-04:00</published>
    <updated>2009-04-22T16:36:51.4871864-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <blockquote>
          <p>
I presented a session last night at the Evansville .NET Users Group in Indiana on
building composite applications with Prism 2. It was a great little group with a lot
of really good questions.
</p>
          <p>
For those that were there, thanks!
</p>
          <p>
For those who are interested, here are the slides and demos:
</p>
          <p>
            <a href="http://www.softinsight.com/downloads/INETA/CompositeAppGuidanceforWPF.pdf" target="_blank">Slides</a>
          </p>
          <p>
            <a href="http://www.softinsight.com/downloads/INETA/CompositeWPFDemosApr2009.zip" target="_blank">Demos</a>
          </p>
        </blockquote>
        <img width="0" height="0" src="http://www.softinsight.com/bnoyes/aggbug.ashx?id=6de71a0c-5091-4608-98b6-1815ac6ddad9" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Composite Extensions for Prism 2</title>
    <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/2009/04/22/CompositeExtensionsForPrism2.aspx" />
    <id>http://www.softinsight.com/bnoyes/PermaLink,guid,939eac8f-9808-4da6-ad4f-3eed81bd8993.aspx</id>
    <published>2009-04-22T15:34:08.762532-04:00</published>
    <updated>2009-04-22T15:34:08.762532-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I figured that since I wrote my <a href="http://briannoyes.net/2008/10/13/CompositeExtensionsForWindowsForms.aspx">original
composite extensions for Prism 1</a> on an airplane, I should keep up the tradition.
On the way home from speaking in Evansville Indiana last night (not surprisingly on
Prism), I got all the code in my composite extensions updated to Prism 2.
</p>
        <p>
So if you like the modularity and pub-sub events story from Prism and would like to
be able to do those same things in a Windows Forms or other kind of .NET application,
you can easily do so now with these <a href="http://www.softinsight.com/downloads/CompositeExtensions.zip">CompositeExtensions</a>.
</p>
        <p>
These extensions allow you to use the modular loading patterns and capabilities of
Prism as well as the pub/sub events in a Windows Forms application, or any other kind
of application (even console apps, WCF services, etc.).
</p>
        <p>
The key pieces remain the same:
</p>
        <p>
A CompositeEvent class that has all the same capability as the CompositePresentationEvent
class in Prism2, but is not tied to the WPF libraries at all. For the UI thread dispatching
capability, it uses the SynchronizationContext class (which is used under the covers
by both WPF and Windows Forms, so this class will also work with WPF).
</p>
        <p>
A SimpleUnityBootstrapper class that removes the tie to WPF in the bootstrapper by
removing the creation of the shell and the region adapter stuff. 
</p>
        <p>
The  <a href="http://www.softinsight.com/downloads/CompositeExtensions.zip">code</a> also
include a sample Windows Forms application that uses the extensions to load a module
and fire and handle pub-sub events. As mentioned in the <a href="http://briannoyes.net/2008/10/13/CompositeExtensionsForWindowsForms.aspx">original
post</a>, I also demonstrate a simple way of using the DI container (Unity in this
case) to achieve a Region-Manager like UI composition ability in Windows Forms.
</p>
        <p>
Check it out and let me know if you have any feedback.
</p>
        <img width="0" height="0" src="http://www.softinsight.com/bnoyes/aggbug.ashx?id=939eac8f-9808-4da6-ad4f-3eed81bd8993" />
      </div>
    </content>
  </entry>
  <entry>
    <title>TFS Build Node Problem Fix</title>
    <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/2009/03/05/TFSBuildNodeProblemFix.aspx" />
    <id>http://www.softinsight.com/bnoyes/PermaLink,guid,3d2055e9-7477-4f6c-8e42-970290da8f06.aspx</id>
    <published>2009-03-05T09:37:31.2076064-05:00</published>
    <updated>2009-03-05T09:37:31.2076064-05:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday (in the midst of trying to get some builds done to get to a release), the
Build node of my Team Explorer window for all Team Projects under my main user account
went stupid and was displaying a red X for unavailable. Very frustrated, I did some
searching and found very little other than one post suggesting that killing my user
account and recreating it from scratch would clear the problem. That would also have
cost me hours of reconfiguring other programs and settings that are customized under
my account, so I dismissed that.
</p>
        <p>
Based on that though, I went and created a separate user account and was able to run
builds from there and switch back and forth with Switch User to get through the day.
</p>
        <p>
The sweet thing was that when I fired up VS 2008 this morning and went to Team Explorer
with no project loaded, I noticed a bunch of stuff get spit into my output window.
Looking closely, it was a nice little error message from Team System telling me the
BuildPackage was not being loaded due to previous errors, and if I wanted to have
it try again, just launch VS from the command prompt with the following line:
</p>
        <p>
devenv /resetskippkgs
</p>
        <p>
Worked like a charm and my environment is totally happy again.
</p>
        <p>
You gotta love software that detects its own problems and suggests simple things that
actually work to fix it.
</p>
        <p>
Well done VSTS team!
</p>
        <img width="0" height="0" src="http://www.softinsight.com/bnoyes/aggbug.ashx?id=3d2055e9-7477-4f6c-8e42-970290da8f06" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Prism 2 Bits Refresh</title>
    <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/2009/02/26/Prism2BitsRefresh.aspx" />
    <id>http://www.softinsight.com/bnoyes/PermaLink,guid,73875925-e9a3-4bfc-9c4f-9d3482e290dd.aspx</id>
    <published>2009-02-26T17:53:40.1309162-05:00</published>
    <updated>2009-02-27T20:32:25.9217177-05:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font color="#ff0000">Update: Great post by Julian Dominguez from the Prism team here
that tells exactly what files changed in case you just want to update those in your
source control: </font>
          <a title="http://blogs.southworks.net/jdominguez/2009/02/prism-20-download-bits-refreshed-whats-changed/" href="http://blogs.southworks.net/jdominguez/2009/02/prism-20-download-bits-refreshed-whats-changed/">
            <font color="#ff0000">http://blogs.southworks.net/jdominguez/2009/02/prism-20-download-bits-refreshed-whats-changed/</font>
          </a>
        </p>
        <p>
In case you have already jumped on downloading Prism 2 (Composite Application Guidance
for WPF and Silverlight) when it released about a week ago, time for you to go get
some fresh bits. There were a couple of minor issues that have been fixed and the
download links now have the updated code behind them.
</p>
        <p>
So remove what you have for Prism 2, go to the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fa07e1ce-ca3f-4b9b-a21b-e3fa10d013dd&amp;DisplayLang=en#filelist">download
links</a> and get the latest.
</p>
        <p>
In WPF the main thing affected was that certain containers, TabControl in particular,
did not bring their View to the foreground with an Activate call on the region. There
was also a build issue for Silverlight projects that was fixed.
</p>
        <p>
So go get yer fresh hot bits!
</p>
        <img width="0" height="0" src="http://www.softinsight.com/bnoyes/aggbug.ashx?id=73875925-e9a3-4bfc-9c4f-9d3482e290dd" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Avoiding Login Dialogs with TFS Remote Access</title>
    <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/2009/02/08/AvoidingLoginDialogsWithTFSRemoteAccess.aspx" />
    <id>http://www.softinsight.com/bnoyes/PermaLink,guid,c216a94b-39b3-464e-a054-b1354233babf.aspx</id>
    <published>2009-02-08T16:42:23.5492421-05:00</published>
    <updated>2009-02-08T16:42:23.5492421-05:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’ve been working on a project for a remote customer for a number of months and something
that constantly bugged me is the way TFS wants you to log in every time you open your
solution or fire up Team Explorer. Unlike other login dialogs in Windows and Internet
Explorer, the one presented by TFS does not have the magic checkbox to “Remember my
password”. But at some point I did something on one machine and it stopped asking
and was logging me in automatically if I was online. Excellent! Now how to get it
to behave the same on my other two dev machines?
</p>
        <p>
I did a little thinking and realized that TFS just uses HTTP Web Services for it remote
access. The team project I was working on was using SSL and a particular port, lets
say it was 8089.
</p>
        <p>
So I just fired up the browser, hit <a href="http://tfs.somecompany.com:8089">http://tfs.somecompany.com:8089</a> and
I got the standard IE login dialog which does have the Save password checkbox. Checked
that box, got and error of course because the web service is not designed to be used
from the browser, but now whenever I hit the team project in VS through opening the
source controlled solution or opening Team Explorer, viola it logs me automatically
now. 
</p>
        <p>
10 seconds of effort on any machine to avoid the repeated hassles of logins. Nice.
</p>
        <img width="0" height="0" src="http://www.softinsight.com/bnoyes/aggbug.ashx?id=c216a94b-39b3-464e-a054-b1354233babf" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Arabic-English Encyclopedia of Computer and Internet Terms</title>
    <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/2009/01/04/ArabicEnglishEncyclopediaOfComputerAndInternetTerms.aspx" />
    <id>http://www.softinsight.com/bnoyes/PermaLink,guid,6108d50a-83d2-4602-849d-1d7820a3cc7c.aspx</id>
    <published>2009-01-04T16:17:07.786582-05:00</published>
    <updated>2009-01-04T16:17:07.786582-05:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you work with any colleagues who read and speak Arabic but are still getting up
to speed on technical terms in English, you should have them check out a book written
by a friend and neighbor of mine:
</p>
        <p>
          <a href="http://www.arabicomputnet.com">Encyclopedia of Computer and Internet Terms</a>,
by Dr. Alam E. Hammad.
</p>
        <p>
It has the technical terms in English and the explanation in Arabic.
</p>
        <p>
Should be a great reference for Arabic speakers to have handy.
</p>
        <img width="0" height="0" src="http://www.softinsight.com/bnoyes/aggbug.ashx?id=6108d50a-83d2-4602-849d-1d7820a3cc7c" />
      </div>
    </content>
  </entry>
  <entry>
    <title>.NET Technical Forecast 2009</title>
    <link rel="alternate" type="text/html" href="http://www.softinsight.com/bnoyes/2009/01/02/NETTechnicalForecast2009.aspx" />
    <id>http://www.softinsight.com/bnoyes/PermaLink,guid,5b8d2bc7-d0c1-4f28-8818-f86d302b276c.aspx</id>
    <published>2009-01-02T10:32:24.312599-05:00</published>
    <updated>2009-01-02T10:32:24.312599-05:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Beginning of the year is always a good time for reflection and speculation on what
is to come, so I thought I would put a few thoughts out there on what the technical
forecast for 2009 looks like to me. I'll do it in the context of some of the key technologies
I work with on a regular basis.
</p>
        <p>
WCF: Because this got great adoption from the outset, I don't see a huge change in
the rate of adoption of WCF. What I do see is more and more use of the REST programming
model that came available in .NET 3.5. Unfortunately, I predict that more people will
end up using that model instead of SOAP-based messages than probably should, just
because it has the hype right now. REST makes a lot of sense for externally exposed,
resource-oriented services to put a minimum bar for consumption of data out there.
For secure, reliable enterprise services though, you need the additional protocols
that the WS-* stack gives you. Consumption of a SOAP based service is also still far
easier due to simple code generation of the proxy. So internal services should still
be using SOAP in my opinion, but REST makes perfect sense for public exposure of data,
whether read only or read-write.
</p>
        <p>
Cloud Services: With the Azure platform announced and PDC, the .NET Services piece
of that which has been available for a while in CTP form in its previous incarnation
as "BizTalk Services", third party vendors building lots of cloud-like services, expansion
of the mobile application market with the explosion of iPhone and the chasing touch
devices out there, cloud services will certainly grow in importance and early adopter
attention, but since a released Microsoft variant will not come until possibly the
very end of 2009 or early 2010, most production projects will probably not accept
the risk of building against the platform for at least 6-9 months.
</p>
        <p>
WF: One word: hesitation. WF has had very low adoption as it is because it requires
a pretty significant shift in the way you think about designing your systems as well
as how you go about that. Couple that with a number of rough edges in the programming
model and the fact that you have to build a fair amount of infrastructure around your
solution to run it effectively in production, and you can understand the slow adoption.
It is still a vary rich platform for building complex business applications, but certainly
can use some improvement. The good news is, that improvement is coming in .NET 4.0,
in a big way. At an SDR I attended in the Spring of 2008, I commented to one of the
product team members that I was very pleased because they were fixing or improving
every single aspect of the WF model that causes difficulty for me or my customers
with the current version. The bad news is that to do that, they are making some pretty
sweeping changes in the programming and even hosting model of WF. That doesn't mean
that you will have to rewrite anything you build today, there is an easy interop story
to run 3.5 workflows and activities in the 4.0 model. But it does mean that if you
start building on 3.5 now, you will have to learn a set of skills that you will then
have to relearn in about a year to start building things the new way. It is not 100%
relearning of course, but the changes are sweeping enough that I would guess that
60-70% of the time you spend on the workflow part of your application will be done
at least slightly differently in 4.0 than in 3.5.
</p>
        <p>
WPF: Adoption should start to take off more than it has in 2008 due to a combination
of factors. One of the impediments are the tools, and those are not going to change
substantially until VS 2010 comes out (don't know if that will be its name, but it
is reasonable speculation to guess that). However, a bigger impediment has been the
learning curve, and having companies willing to bite the bullet to acquire those skills.
Competitive pressure, both for the companies and the developers themselves, will continue
to mount quickly though as more companies ship nice looking WPF apps that demonstrate
the ways you can substantially alter the user experience by using WPF. That will help
force people to learn the WPF way of doing things to stay competitive. The other factor
is Silverlight adoption. With rapidly growing interest and adoption of Silverlight,
companies will quickly realize that the skills investment in either WPF or Silverlight
cascades to a large degree into the other technology, so that will allow them to build
the best kind of app for their users without needing to master two completely different
UI skill sets. And finally of course, the closer we get to better tools, the shorter
the period of productivity hits you will have to endure by being on WPF, so that barrier
becomes less as well.
</p>
        <p>
Silverlight: Although there have been some media hits with a public announcement of
dropping Silverlight, there have been many more success stories out there due to Silverlight
2, and I think people are really seeing the light there. Some stuff still belongs
in web pages and web forms. But for rich interactive applications that are web delivered,
you can't beat Silverlight as a platform when you are a .NET developer. Add to that
all the cool new stuff coming to enhance Silverlight development in .NET 4 and VS
10, and you have even more reason to make this a first consideration for any interactive
web application. The only caution is similar to what I said about REST services. Don't
overuse Silverlight just because it is the shiniest new toy. WPF or Windows Forms
smart client apps still make sense for a broad assortment of internal corporate type
applications.
</p>
        <p>
Economic impacts: OK, the market sucks and we are all feeling the impacts in one way
or another. But the fact is that the world already runs on software. And short of
a total global economic collapse, we can't stop making or at least maintaining software.
So I think there is room for plenty of work in our sector even if things get bad.
And if you can align yourself with markets that are doing well, then you should be
able to weather the storm.
</p>
        <p>
So that is about it. Nothing too startling or earth shaking there. But a view through
my eyes based on what I see from working with lots of customers around the globe.
</p>
        <img width="0" height="0" src="http://www.softinsight.com/bnoyes/aggbug.ashx?id=5b8d2bc7-d0c1-4f28-8818-f86d302b276c" />
      </div>
    </content>
  </entry>
</feed>