<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" 
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  xmlns:admin="http://webns.net/mvcb/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<channel>
<title>Work Late with Workstate : Joe&apos;s Weblog</title>
<link>http://www.workstate.com/people/joe/</link>
<description></description>
<dc:language>en-us</dc:language>
<dc:creator>joe.madia@workstate.com</dc:creator>
<dc:date>2005-03-05T02:52:13-05:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=2.64" />
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>

<item>
<title>System.Transactions in .NET 2.0</title>
<link>http://www.workstate.com/people/joe/2005/03/05/system_transactions</link>
<description><![CDATA[<p>In .NET 2.0 Microsoft is adding support for the explicit creation and management of distributed database transactions in a new super-easy-to-use API (Application Programming Interface) called System.Transactions.  As a bit of background, here's a grossly oversimplified history of distributed transaction APIs and frameworks:</p>

<ul>
<li>In the beginning, nearly all transactional APIs are procedural in nature and require the explicit creation and destruction of transaction contexts by the caller.  This type of code is rather difficult to write and maintain, especially in the case of distributed transactions that span multiple database servers or resource managers.</li>
<li>Microsoft introduces Microsoft Transaction Server (MTS) in 1996 which is one of the first mainstream frameworks (if not the very first) to provide automatic / declarative transaction support for distributed transactions.  MTS achieves its simplicity by mapping transactional semantics directly onto COM method calls...  allowing any COM implementation language (VB, C/C++, Delphi, etc) to play along.</li>
<li>Microsoft spends the next 5 to 7 years improving this technology and finally getting things working quite well...  culminating in the present day COM+ model.</li>
<li>During this time, the Enterprise Java Beans spec imports the MTS / COM+ model of declarative transactions into the Java world.</li>
<li>Continuing the back and forth Sun / Microsoft technology borrow-a-thon of the late 20th century that has many interesting chapters...  Microsoft starts with the general architecture of Java, adds several nice additions and enhancements and creates the .NET Framework.</li>
<li>.NET 1.0 includes (via System.EnterpriseServices) the closest realization to date of the original MTS vision of simple object-oriented transactions.  In fact, the entire custom attribute system of .NET, which has many great uses totally unrelated to transactions, appears to be largely motivated by the MTS / COM+ requirements.</li>
<li>Microsoft adds Services without Components to COM+ and subsequently introduces its managed counterpart, System.Transactions, in .NET 2.0 which allows developers to explicitly create and destroy transactions manually, without relying on any MTS / COM+ object mapping.  So...  8 to 10 years and 700 billion "How to program with DTC / MTS / COM+" book orders later...  and we're back to almost exactly where we started.</li>
</ul>

<p>Not that this is a bad thing...  quite the opposite in fact.  The MTS / COM+ style and the explicit transaction style have distinct feature sets and even in the cases where those feature sets overlap, both models have their pros and cons.  Regardless, it's still pretty interesting to observe the full circle that Microsoft has completed here.</p>

<p>Although System.Transactions is, in some ways, a step backward in time, it is also an interesting and significant step forward in terms of developer productivity.  Part of the original motivation for MTS / COM+ was the fact that explicit transaction code that included proper connection management and full error handling / rollback code, was quite tedious and verbose to create and maintain in the VB / C++ world of the mid 90s.</p>

<p>Where MTS / COM+ was revolutionary, System.Transactions is evolutionary.  Highly evolutionary...  so much so that System.Transactions looks almost nothing like its primitive ancestors.  By relying on modern data access layers, a garbage collection runtime and even some of the post-Java features of .NET, new code written to System.Transactions is some of the cleanest and most readable distributed transaction code that I've ever seen:</p>

<style>
.csharpcode
{
	font-size: 10pt;
	color: black;
	font-family: Courier New , Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0px; }

.rem { color: #008000; }

.kwrd { color: #0000ff; }

.str { color: #006080; }

.op { color: #0000c0; }

.preproc { color: #cc6633; }

.asp { background-color: #ffff00; }

.html { color: #800000; }

.attr { color: #ff0000; }

.alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0px;
}

.lnum { color: #606060; }
</style>
<!-- code formatted by http://manoli.net/csharpformat/ -->
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">class</span> AccountTransactions
{
    <span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">void</span> Transfer(<span class="kwrd">int</span> IN_Amount)
    {
        <span class="kwrd">using</span> (TransactionScope scope = <span class="kwrd">new</span> TransactionScope())
        {
            <span class="kwrd">using</span> (SqlConnection connection1 = <span class="kwrd">new</span> SqlConnection(DemoData.Bank1Database))
            {
                connection1.Open();
                <span class="kwrd">using</span> (SqlConnection connection2 = <span class="kwrd">new</span> SqlConnection(DemoData.Bank2Database))
                {
                    connection2.Open();
                    DoWithdrawal(connection1, IN_Amount);
                    DoDeposit(connection2, IN_Amount);
                    scope.Complete();
                }
            }
        }
    }
}</pre>

<p>This code is based on example code from Mike Clark's recent and highly recommended MSDN Video <a href="http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20050203NETMC/manifest.xml">'Introducing System.Transactions in .NET 2.0'</a>.</p>

<p>Now before anyone jumps up and screams "That doesn't look any cleaner than the JDBC / ADO.NET / etc. code that I'm already using today" please note that this code implements a full distributed transaction across two distinct database servers.  The databases in question could be on different machines or be of completely different platform / resource manager type (two Oracle servers, or one SQL Server and one Oracle Server, or a message queue and a database server, etc.)</p>

<p>The level of effort necessary to explicitly orchestrate these types of distributed transactions has never been lower.  And if that wasn't enough...  the new framework also automatically supports promotable enlistment (when supported by the underlying resource manager) which significant improves performance in situations where only a single database is being accessed.  System.Transactions looks like it's going to be a great new addition to the .NET data access story.</p>
]]></description>
<guid isPermaLink="false">146@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2005-03-05T02:52:13-05:00</dc:date>
</item>
<item>
<title>Google Libraries</title>
<link>http://www.workstate.com/people/joe/2004/12/14/google_libraries</link>
<description><![CDATA[<p>Please excuse the mindless link propagation but Google is <a href="http://news.bbc.co.uk/2/hi/technology/4094271.stm">the gift that keeps on giving</a>.</p>]]></description>
<guid isPermaLink="false">144@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2004-12-14T20:46:19-05:00</dc:date>
</item>
<item>
<title>Apple Rendezvous SDK for Windows</title>
<link>http://www.workstate.com/people/joe/2004/06/30/rendezvous_for_windows</link>
<description><![CDATA[<p>Apple has released a tech preview of their new <a href="http://developer.apple.com/macosx/rendezvous">Rendezvous</a> SDK for Windows.  Rendezvous is Apple's implementation of the <a href="http://www.zeroconf.org">Zeroconf</a> protocol which enables auto-discovery of local network services without requiring any manual configuration by the user.</p>
<p>This is an extremely useful feature for roaming users and allows them to, for example, start their laptop in a new or unknown office and instantly see any local web sites and printers that are availble to them.  Zeroconf can also help to simplify, or even eliminate altogether, the need for the networking configuration interfaces currently required by collaborative and/or ad-hoc networking applications such as realtime document sharing software and multiplayer games.</p>

<p>I've been watching the Zeroconf space in the hope that more Windows support for the protocol would materialize.  Porchdog Software has had  a Zeroconf stack called <a href="http://www.porchdogsoft.com/products/howl/">Howl</a> available for quite some time now.  Hopefully, based on Apple's recent commitment, we'll be seeing more Zerconf enabled Windows apps in the future.</p>
]]></description>
<guid isPermaLink="false">142@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2004-06-30T21:42:27-05:00</dc:date>
</item>
<item>
<title>No Comdex in 2004</title>
<link>http://www.workstate.com/people/joe/2004/06/23/no_comdex</link>
<description><![CDATA[<p><a href="http://news.ft.com/servlet/ContentServer?pagename=FT.com/StoryFT/FullStory&c=StoryFT&cid=1087373227796">Wow</a>.</p>]]></description>
<guid isPermaLink="false">140@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2004-06-23T19:07:10-05:00</dc:date>
</item>
<item>
<title>Word and Excel Data Islands</title>
<link>http://www.workstate.com/people/joe/2004/04/24/word_excel_data_islands</link>
<description><![CDATA[<p>Two recent posts from Paul Cornell and Eric Carter show off the extremely impressive looking data island features of the upcoming Visual Studio Tools for Office 2.0.  Microsoft has taken what is probably the most common automation scenario for Word and Excel documents and crafted a nearly perfect solution.  Behold:</p>
<ul>
  <li>Word and Excel documents will be able to contain data islands that will work equally well in both connected scenarios (data is retrieved from the server at runtime) and disconnected scenarios (data is embedded in the document instance and never connects directly to any server).</li>
  <li>The data islands will be able to implement caching behavior such that the latest query results from the server can be retained within the document itself just in case the document find itself in a disconnected state (ie on an airplane) the next time it is opened.</li>
  <li>The data islands can be created or updated from .NET code running on the server <i>without requiring Office to be installed.</i>  Presumably, you'll just need to drop a small redistributable .NET DLL into your server-side bin directory and away you go.</li>
  <li>All of the above features will enable the creation of data-driven reports that can be 1) populated from a server-side web process, 2) downloaded and viewed by users that don't have any direct access to the data source and 3) have their data islands modified and re-uploaded by the user.  Any changes can then be committed back to the data store via server side code.</li>
</ul>
<p>
Although it's technically possible to implement some of these features today by autogenerating and/or manipulating the new Word and Excel XML formats directly from server-side code, these new VSTO features will enable developers to create much more robust solutions with only a fraction of the effort required today.  This is super-impressive looking stuff...  read on for the full details:
</p>
<p><a href="http://blogs.msdn.com/vsto2/archive/2004/04/23/119229.aspx">Offline and server-based Office document scenarios</a></li>
<br /><a href="http://blogs.msdn.com/eric_carter/archive/2004/04/23/119294.aspx">VSTO 2.0 and Cached Data: Goodbye Hidden Sheets, Hello Server!</a></li>
</p>]]></description>
<guid isPermaLink="false">134@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2004-04-24T02:48:44-05:00</dc:date>
</item>
<item>
<title>PINVOKE.NET</title>
<link>http://www.workstate.com/people/joe/2004/04/19/pinvvoke_net</link>
<description><![CDATA[<p><a href="http://www.pinvoke.net">PINVOKE.NET</a> is a Wiki site dedicated to P/Invoke signatures.  The fact that the site is a Wiki makes it simple for anyone to add new signatures or update existing ones...  all without requiring a login.  If enough developers play along then this site could quickly become an indispensable .NET resource.</p>]]></description>
<guid isPermaLink="false">133@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2004-04-19T21:44:55-05:00</dc:date>
</item>
<item>
<title>New DynamicMethod Class in the CLR</title>
<link>http://www.workstate.com/people/joe/2004/04/06/new_dynamic_method_class</link>
<description><![CDATA[<p>Joel Pobar has recently posted some great introductory material regarding the new DynamicMethod class being added to the CLR:</p>

<p><a href="http://blogs.msdn.com/joelpob/archive/2004/03/31/105282.aspx">Hello World, LCG Style!</a><br />
<a href="http://weblogs.asp.net/joelpob/archive/2004/04/01/105862.aspx">Late-Bound Invocation Notes</a></p>

<p>DynamicMethod will allow runtime code generation to occur at a finer level of granularity, with better performance, and presumably without the resource hogging issues that exist with dynamic assemblies today.  This is going to be a great addition to the CLR and we certainly would have made extensive use of this functionality had it been available to us during the implementation of Codify.</p>

<p>Beta documentation for DynamicMethod is available on MSDN:<br />
<a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/system.reflection.emit/c/dynamicmethod/dynamicmethod.aspx">DynamicMethod Class</a></p>]]></description>
<guid isPermaLink="false">132@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2004-04-06T16:15:00-05:00</dc:date>
</item>
<item>
<title>Software Cold War Ends</title>
<link>http://www.workstate.com/people/joe/2004/04/02/software_cold_war</link>
<description><![CDATA[<p>Wow...  Sun gets $1.6 billion to kiss and make up.  This has all the makings of a watershed moment for the tech industry.  Over time, even previously bizarre phrases like "Microsoft Certified Sun Xeon Server" will begin to sound normal.  It's a strange world.</p>
<p>It's also pretty entertaining to consider the fact that the PR handlers at both companies probably had to avoid announcing this yesterday for fear of the the April Fools factor.</p>
<p>
<a href="http://www.microsoft.com/presspass/press/2004/apr04/04-02SunAgreementPR.asp">Microsoft Press Release</a><br />
<a href="http://www.sun.com/smi/Press/sunflash/2004-04/sunflash.20040402.3.html">Sun Press Release</a>
</p>
]]></description>
<guid isPermaLink="false">131@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2004-04-02T14:56:57-05:00</dc:date>
</item>
<item>
<title>The most powerful key on the keyboard...</title>
<link>http://www.workstate.com/people/joe/2003/10/16/the-most-powerful-key</link>
<description><![CDATA[<p>One of the amazing things about software is that it's possible to use it for years and years and years without discovering major features that have been hiding in there all along:</p>

<ul>
<li>Open up any Windows application that contains a tree view control (Windows Explorer, Visual Studio, etc.)</li>
<li>Select any node in the tree view.</li>
<li>Press the * key on your numeric keypad.</li>
<li>Watch with glee as the tree node and all of its children are expanded.</li>
<li>Now press the - key on your numeric keypad.</li>
<li>Watch with slightly less glee since this one is pretty easy to anticipate once you've seen the first one.</li>
</ul>

<p>I've written and tested more than my fair share of tree view code over the years.  (In fact, Codify uses more tree views than should be legally allowed in a single application.)  In all this time I had no idea that these little gizmos were sitting there on my keyboard waiting to save me hundreds and thousands of mouse clicks.</p>

<p>Maybe some of these <i>other</i> keys are useful too...</p>]]></description>
<guid isPermaLink="false">98@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2003-10-16T01:18:55-05:00</dc:date>
</item>
<item>
<title>Codify 1.3 and our New Site</title>
<link>http://www.workstate.com/people/joe/2003/09/03/new-codify-new-site</link>
<description><![CDATA[<p>The past week has been pretty hectic.  We released Codify 1.3 and launched an entirely new version of our website.</p>

<p>Codify has several new features that we're pretty excited about.  We're hoping to put up some new tutorials soon that show these features in action.</p>

<p>As for the new site..  it was a tough decision to make.  We liked our previous site design visually but were looking for a way to reduce our update friction.  So... we decided to go with a less structured and more text centric site.</p>

<p>And being the programmers that we are... we locked on to the idea of a text-centric site and took it pretty far towards the to the <i>furthest possible extreme</i>.  There are still a few things that we don't like so you can expect to see it evolve over time.</p>

<p>Hope you like it!  If you run into any problems or have any feedback then please don't hesitate to let us know at <a href="mailto:team.website@workstate.com">team.website@workstate.com</a>.</p>]]></description>
<guid isPermaLink="false">86@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2003-09-03T06:13:58-05:00</dc:date>
</item>
<item>
<title>Jack Herrington&apos;s Code Generation in Action</title>
<link>http://www.workstate.com/people/joe/2003/08/15/code-generation-in-action</link>
<description><![CDATA[<p>Our copy of the recently released <a href="http://www.amazon.com/exec/obidos/tg/detail/-/1930110979/103-3288066-7706248">Code Generation in Action</a> just arrived.  <a href="http://www.codegeneration.net/lth/">Jack Herrington</a> has put together a great book that provides in-depth discussion of several modern code generation techniques.  Also included are many valuable examples of fully functional code generators. If you're planning on introducing code generation into your development process then you should definitely check it out.  Congrats Jack!</p>]]></description>
<guid isPermaLink="false">74@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2003-08-15T01:39:33-05:00</dc:date>
</item>
<item>
<title>Google Kicks Ass - Chapter 26</title>
<link>http://www.workstate.com/people/joe/2003/08/13/google-kicks-ass</link>
<description><![CDATA[<p>I'm sure this has made the rounds but I just heard about it today: </p>

<p><a href="http://www.google.com/search?q=256+*+256">256 * 256</a> </p>

<p><a href="http://www.google.com/search?q=sin%28pi%2F2%29">sin(pi/2) </a></p>

<p><a href="http://www.google.com/search?q=1+gallon">1 gallon </a></p>

<p><a href="http://www.google.com/search?q=%282+*+8+grams%29+in+pounds">(2 * 8 grams) in pounds </a></p>]]></description>
<guid isPermaLink="false">73@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2003-08-13T14:14:56-05:00</dc:date>
</item>
<item>
<title>Great stuff from newtelligence</title>
<link>http://www.workstate.com/people/joe/2003/07/07/great-stuff-newtelligence</link>
<description><![CDATA[<p>I've been a fan of <a href="http://radio.weblogs.com/0108971/">Clemens' Weblog</a> for a long time but it wasn't until recently that I had enough free time to check out the <a href="http://www.newtelligence.com/wsextensions/index.aspx">newtelligence Web Service Extensions</a> and the <a href="http://www.newtelligence.com/SDK/readme.htm">newtelligence SDK</a>.  If you're doing any heavy lifting with COM+ or SOAP on .NET then do yourself a favor and check these out...  there's some seriously hardcore stuff in there.</p>]]></description>
<guid isPermaLink="false">72@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2003-07-07T04:56:55-05:00</dc:date>
</item>
<item>
<title>Pie -&gt; Echo -&gt; Necho?</title>
<link>http://www.workstate.com/people/joe/2003/07/02/pie-echo-necho</link>
<description><![CDATA[<p>The <a href="http://intertwingly.net/wiki/pie/">ProjectForerlyKnownAsEcho</a> is just over two weeks old now and, so far, it has been a very positive process to particpate in.  One of the numerous outstanding issues is to decide what to actually call the thing now that Echo is not available as an option. </p>]]></description>
<guid isPermaLink="false">71@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2003-07-02T12:57:17-05:00</dc:date>
</item>
<item>
<title>Aspect Oriented Programming and Code Generation</title>
<link>http://www.workstate.com/people/joe/2003/06/09/aop-and-code-generation</link>
<description><![CDATA[<p>Is it just me or is Aspect Oriented Programming a "gateway methodology" that consistently leads innocent developers into more serious addictions like code generation or (gasp!) loosely typed languages?  </p>]]></description>
<guid isPermaLink="false">70@http://www.workstate.com/people/joe/</guid>
<dc:subject></dc:subject>
<dc:date>2003-06-09T03:52:53-05:00</dc:date>
</item>


</channel>
</rss>
