<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.deepcode.co.uk/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">DeepCodeBlog</title><subtitle type="html">if(iAmTony) beginRamble();</subtitle><id>http://www.deepcode.co.uk/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.deepcode.co.uk/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.61129.2">Community Server</generator><updated>2008-11-12T11:09:55Z</updated><entry><title>Expand a virtual PC VHD file and extend the partition</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/18/expand-a-virtual-pc-vhd-file-and-extend-the-partition.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/18/expand-a-virtual-pc-vhd-file-and-extend-the-partition.aspx</id><published>2008-11-18T21:41:55Z</published><updated>2008-11-18T21:41:55Z</updated><content type="html">&lt;p&gt;Ran into a few problems today, for one client who uses a VPN that doesn't work at all well with Vista, I have an XP development virtual PC. I needed to install visual studio sp1 (yet again) on it but my boot drive only had 4Gb of free space - the temporary installer needs more than that.&lt;/p&gt;  &lt;p&gt;After finding the excellent VHD Resizer I was able to resize by virtual disk by an additional 10Gb, however it doesn't extend the disk into this space and diskpart won't let you issue and extend command on the boot disk.&lt;/p&gt;  &lt;p&gt;The solution? Boot off another VHD with the resized disk as a second drive, then extend under this environment before shutting down and setting it back to the newly extended drive.&lt;/p&gt;  &lt;p&gt;Full answer here...&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.enusbaum.com/blog/2008/02/07/expand-a-virtual-pc-vhd-file-and-extend-the-partition/" href="http://www.enusbaum.com/blog/2008/02/07/expand-a-virtual-pc-vhd-file-and-extend-the-partition/"&gt;http://www.enusbaum.com/blog/2008/02/07/expand-a-virtual-pc-vhd-file-and-extend-the-partition/&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=237" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term="reference" scheme="http://www.deepcode.co.uk/archive/tags/reference/default.aspx" /><category term="non technical" scheme="http://www.deepcode.co.uk/archive/tags/non+technical/default.aspx" /></entry><entry><title>Using attached properties to compose new behaviour</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/16/using-attached-properties-to-compose-new-behaviour.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="514093" href="http://www.deepcode.co.uk/attachment/235.ashx" /><id>http://www.deepcode.co.uk/archive/2008/11/16/using-attached-properties-to-compose-new-behaviour.aspx</id><published>2008-11-16T21:31:00Z</published><updated>2008-11-16T21:31:00Z</updated><content type="html">&lt;P&gt;I was inspired by a posting on stackoverflow.com - "How do I drag an image around a canvas in WPF" - where the first response in most peoples heads is to work with mouse up/down/move events, track offset positions and move the UI element around in response - pretty reasonable right?&lt;/P&gt;
&lt;P&gt;Seeing as WPF's principles favours composition over inheritance and such like, what if instead we used the power of attached properties to attach new behaviour to a UIElement? Here's how to do it, first the code for the dependency property:&lt;/P&gt;
&lt;DIV&gt;&lt;PRE style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, 'Courier New', courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;BORDER-BOTTOM-STYLE:none;"&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;class&lt;/SPAN&gt; DraggableExtender : DependencyObject
{
    &lt;SPAN style="COLOR:#008000;"&gt;// This is the dependency property we're exposing - we'll &lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#008000;"&gt;// access this as DraggableExtender.CanDrag="true"/"false"&lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#0000ff;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;readonly&lt;/SPAN&gt; DependencyProperty CanDragProperty =
        DependencyProperty.RegisterAttached(&lt;SPAN style="COLOR:#006080;"&gt;"CanDrag"&lt;/SPAN&gt;,
        &lt;SPAN style="COLOR:#0000ff;"&gt;typeof&lt;/SPAN&gt;(&lt;SPAN style="COLOR:#0000ff;"&gt;bool&lt;/SPAN&gt;),
        &lt;SPAN style="COLOR:#0000ff;"&gt;typeof&lt;/SPAN&gt;(DraggableExtender),
        &lt;SPAN style="COLOR:#0000ff;"&gt;new&lt;/SPAN&gt; UIPropertyMetadata(&lt;SPAN style="COLOR:#0000ff;"&gt;false&lt;/SPAN&gt;, OnChangeCanDragProperty));

    &lt;SPAN style="COLOR:#008000;"&gt;// The expected static setter&lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#0000ff;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;void&lt;/SPAN&gt; SetCanDrag(UIElement element, &lt;SPAN style="COLOR:#0000ff;"&gt;bool&lt;/SPAN&gt; o)
    {
        element.SetValue(CanDragProperty, o);
    }

    &lt;SPAN style="COLOR:#008000;"&gt;// the expected static getter&lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#0000ff;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;bool&lt;/SPAN&gt; GetCanDrag(UIElement element)
    {
        &lt;SPAN style="COLOR:#0000ff;"&gt;return&lt;/SPAN&gt; (&lt;SPAN style="COLOR:#0000ff;"&gt;bool&lt;/SPAN&gt;) element.GetValue(CanDragProperty);
    }

    &lt;SPAN style="COLOR:#008000;"&gt;// This is triggered when the CanDrag property is set. We'll&lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#008000;"&gt;// simply check the element is a UI element and that it is&lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#008000;"&gt;// within a canvas. If it is, we'll hook into the mouse events&lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#0000ff;"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;void&lt;/SPAN&gt; OnChangeCanDragProperty(DependencyObject d, 
        DependencyPropertyChangedEventArgs e)
    {
        UIElement element = d &lt;SPAN style="COLOR:#0000ff;"&gt;as&lt;/SPAN&gt; UIElement;
        &lt;SPAN style="COLOR:#0000ff;"&gt;if&lt;/SPAN&gt; (element == &lt;SPAN style="COLOR:#0000ff;"&gt;null&lt;/SPAN&gt;) &lt;SPAN style="COLOR:#0000ff;"&gt;return&lt;/SPAN&gt;;

        &lt;SPAN style="COLOR:#0000ff;"&gt;if&lt;/SPAN&gt; (e.NewValue != e.OldValue)
        {
            &lt;SPAN style="COLOR:#0000ff;"&gt;if&lt;/SPAN&gt; ((&lt;SPAN style="COLOR:#0000ff;"&gt;bool&lt;/SPAN&gt;)e.NewValue)
            {
                element.PreviewMouseDown += element_PreviewMouseDown;
                element.PreviewMouseUp += element_PreviewMouseUp;
                element.PreviewMouseMove += element_PreviewMouseMove;
            }
            &lt;SPAN style="COLOR:#0000ff;"&gt;else&lt;/SPAN&gt;
            {
                element.PreviewMouseDown -= element_PreviewMouseDown;
                element.PreviewMouseUp -= element_PreviewMouseUp;
                element.PreviewMouseMove -= element_PreviewMouseMove;
            }
        }
    }

    &lt;SPAN style="COLOR:#008000;"&gt;// Determine if we're presently dragging&lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#0000ff;"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;bool&lt;/SPAN&gt; _isDragging = &lt;SPAN style="COLOR:#0000ff;"&gt;false&lt;/SPAN&gt;;
    &lt;SPAN style="COLOR:#008000;"&gt;// The offset from the top, left of the item being dragged &lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#008000;"&gt;// versus the original mouse down&lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#0000ff;"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;static&lt;/SPAN&gt; Point _offset;

    &lt;SPAN style="COLOR:#008000;"&gt;// This is triggered when the mouse button is pressed &lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#008000;"&gt;// on the element being hooked&lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#0000ff;"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;void&lt;/SPAN&gt; element_PreviewMouseDown(&lt;SPAN style="COLOR:#0000ff;"&gt;object&lt;/SPAN&gt; sender, MouseButtonEventArgs e)
    {
        &lt;SPAN style="COLOR:#008000;"&gt;// Ensure it's a framework element as we'll need to &lt;/SPAN&gt;
        &lt;SPAN style="COLOR:#008000;"&gt;// get access to the visual tree&lt;/SPAN&gt;
        FrameworkElement element = sender &lt;SPAN style="COLOR:#0000ff;"&gt;as&lt;/SPAN&gt; FrameworkElement;
        &lt;SPAN style="COLOR:#0000ff;"&gt;if&lt;/SPAN&gt; (element == &lt;SPAN style="COLOR:#0000ff;"&gt;null&lt;/SPAN&gt;) &lt;SPAN style="COLOR:#0000ff;"&gt;return&lt;/SPAN&gt;;

        &lt;SPAN style="COLOR:#008000;"&gt;// start dragging and get the offset of the mouse &lt;/SPAN&gt;
        &lt;SPAN style="COLOR:#008000;"&gt;// relative to the element&lt;/SPAN&gt;
        _isDragging = &lt;SPAN style="COLOR:#0000ff;"&gt;true&lt;/SPAN&gt;;
        _offset = e.GetPosition(element);
    }

    &lt;SPAN style="COLOR:#008000;"&gt;// This is triggered when the mouse is moved over the element&lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#0000ff;"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;void&lt;/SPAN&gt; element_PreviewMouseMove(&lt;SPAN style="COLOR:#0000ff;"&gt;object&lt;/SPAN&gt; sender, 
        MouseEventArgs e)
    {
        &lt;SPAN style="COLOR:#008000;"&gt;// If we're not dragging, don't bother&lt;/SPAN&gt;
        &lt;SPAN style="COLOR:#0000ff;"&gt;if&lt;/SPAN&gt; (!_isDragging) &lt;SPAN style="COLOR:#0000ff;"&gt;return&lt;/SPAN&gt;;

        FrameworkElement element = sender &lt;SPAN style="COLOR:#0000ff;"&gt;as&lt;/SPAN&gt; FrameworkElement;
        &lt;SPAN style="COLOR:#0000ff;"&gt;if&lt;/SPAN&gt; (element == &lt;SPAN style="COLOR:#0000ff;"&gt;null&lt;/SPAN&gt;) &lt;SPAN style="COLOR:#0000ff;"&gt;return&lt;/SPAN&gt;;

        Canvas canvas = element.Parent &lt;SPAN style="COLOR:#0000ff;"&gt;as&lt;/SPAN&gt; Canvas;
        &lt;SPAN style="COLOR:#0000ff;"&gt;if&lt;/SPAN&gt;( canvas == &lt;SPAN style="COLOR:#0000ff;"&gt;null&lt;/SPAN&gt; ) &lt;SPAN style="COLOR:#0000ff;"&gt;return&lt;/SPAN&gt;;
        
        &lt;SPAN style="COLOR:#008000;"&gt;// Get the position of the mouse relative to the canvas&lt;/SPAN&gt;
        Point mousePoint = e.GetPosition(canvas);

        &lt;SPAN style="COLOR:#008000;"&gt;// Offset the mouse position by the original offset position&lt;/SPAN&gt;
        mousePoint.Offset(-_offset.X, -_offset.Y);

        &lt;SPAN style="COLOR:#008000;"&gt;// Move the element on the canvas&lt;/SPAN&gt;
        element.SetValue(Canvas.LeftProperty, mousePoint.X);
        element.SetValue(Canvas.TopProperty, mousePoint.Y);
    }

    &lt;SPAN style="COLOR:#008000;"&gt;// this is triggered when the mouse is released&lt;/SPAN&gt;
    &lt;SPAN style="COLOR:#0000ff;"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR:#0000ff;"&gt;void&lt;/SPAN&gt; element_PreviewMouseUp(&lt;SPAN style="COLOR:#0000ff;"&gt;object&lt;/SPAN&gt; sender, 
        MouseButtonEventArgs e)
    {
        _isDragging = &lt;SPAN style="COLOR:#0000ff;"&gt;false&lt;/SPAN&gt;;
    }
}&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;As you can see, we hook into the events exposed from the target element whenever we detect the property being changed. This allows us to inject any logic we like!&lt;/P&gt;
&lt;P&gt;To use the behaviour, we include the namespace in XAML:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Window &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;x&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Class&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;="WPFFunWithDragging.Window1"
        &lt;/SPAN&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;&lt;SPAN style="COLOR:red;"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;local&lt;/SPAN&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;="clr-namespace:WPFFunWithDragging"
&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;And then just attach the behaviour to the elements we want to be able to drag like so;&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Canvas&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;gt;
       &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Image &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Source&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;="Garden.jpg" 
              &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Width&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;="50" 
              &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Canvas.Left&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;="10" &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Canvas.Top&lt;/SPAN&gt;&lt;SPAN&gt;="10" 
              &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;local&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;:&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;DraggableExtender.CanDrag="true"&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;/&amp;gt;
   &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Canvas&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Cool huh? Sample code attached....&lt;/P&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=235" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term=".net" scheme="http://www.deepcode.co.uk/archive/tags/.net/default.aspx" /><category term="c#" scheme="http://www.deepcode.co.uk/archive/tags/c_2300_/default.aspx" /><category term="WPF" scheme="http://www.deepcode.co.uk/archive/tags/WPF/default.aspx" /></entry><entry><title>The Enterprise Stack</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/16/the-enterprise-stack.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/16/the-enterprise-stack.aspx</id><published>2008-11-16T18:57:18Z</published><updated>2008-11-16T18:57:18Z</updated><content type="html">&lt;p&gt;What makes good software? Separation of concerns has got to be up there in a big way, ensuring you have relevant tiers to your application that deal with a particular set of concerns, but what does an enterprise software stack look like? I've been asked this question a number of times, so thought I would put up one of the ways in which I write software for SOA environments.&lt;/p&gt;  &lt;p&gt;To avoid being short down in flames, let me be clear, I'm not advocating any particular dogmatic approach here, just presenting one way that's worked for me in several situations in service oriented environments.&lt;/p&gt;  &lt;p&gt;So, here's the simplified picture of the stack:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="347" alt="image" src="http://www.deepcode.co.uk/blogs/deepcode/WindowsLiveWriter/TheEnterpriseStack_F939/image_14.png" width="368" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Database&lt;/strong&gt;    &lt;br /&gt;At the very top of the stack we have the database or persistence engine - the place where our application is going to store it's data. This doesn't have to be a SQL database, but is more a concept of a place to store information. To this end this box could be satisfied by XML, an object database, text files, other external services and so on - indeed there may even be multiple boxes.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The Data Abstraction Layer&lt;/strong&gt;    &lt;br /&gt;This layer is responsible for hooking repositories up to persistence. It should expose an engine flexible enough to work with a variety of types of physical repositories in a natural manner. Generally you won't write your own data abstraction layer, but will instead re-use one of many different technologies already available such as NHibernate, LINQ to Entities, LINQ to SQL and so on.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Repositories&lt;/strong&gt;    &lt;br /&gt;The repositories are responsible for fulfilling requests to obtain and modify data. This allows a further level of abstraction that describes the purpose of the code rather than the implementation. IE: A service will ask a repository to &amp;quot;SelectAllCustomers&amp;quot; rather than directly execute some LINQ query.&lt;/p&gt;  &lt;p&gt;Repositories deal in one thing and one thing only - Domain entities. Their inputs and outputs are usually one or more entity objects from the domain (see below). For example, suppose you were writing a pet shop application, you may have a repository for dealing with customers as follows;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="116" alt="image" src="http://www.deepcode.co.uk/blogs/deepcode/WindowsLiveWriter/TheEnterpriseStack_F939/image_6.png" width="324" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;As you can see we have methods for retrieving customers and for updating them. This makes working with customers extremely clear and self describing. The first method - SelectAll() will simply return all of the customers in the system (as customer Domain objects). SelectQuery will allow the description of how to get data, sort it and present it.... eg, using the CustomerQuery, one might be able to specify the sort order and direction, filters on fields, along with which rows to return for pagination.&lt;/p&gt;  &lt;p&gt;Each type of conceptual data would have it's own repository in the stack.&lt;/p&gt;  &lt;p&gt;(One alternative to using repositories is the active record pattern where entities expose methods and functions similar to those exposed from repositories)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Domain Entities&lt;/strong&gt;    &lt;br /&gt;The domain model (in this instance) is a representation of the various entities that make up the problem you are describing along with their relationships and any operational logic (business rules).&lt;/p&gt;  &lt;p&gt;The following is an example of a simple domain model, working again with the fictitious pet shop example.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="308" alt="image" src="http://www.deepcode.co.uk/blogs/deepcode/WindowsLiveWriter/TheEnterpriseStack_F939/image_9.png" width="480" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;In the diagram above we can see we have a customer entity, which has attributes describing the customer. It also contains a collection of Order entities representing the orders that this customer has made. Each order must have a customer, but a customer can have 0 or more orders.&lt;/p&gt;  &lt;p&gt;Where an order exists, this will have attributes of it's own to describe the order, along with a collection of order lines (0 or more). Each order must have one and only one customer.&lt;/p&gt;  &lt;p&gt;Moving down the graph, the order line will know which order it belongs to and also reference a product that the line of the order corresponds to. Each order line can only be within one order and it must also reference a product.&lt;/p&gt;  &lt;p&gt;As you can see, the domain model is just the object graph of the entities it represents. There may of course be more meat on the bones of your real life domain model, including operations on entities to implement business rules and such like.&lt;/p&gt;  &lt;p&gt;So, how does the repository return all of this information - where we simply invoke SelectById(10) to get the customer entity with an ID of 10? Well, the answer is actually in the DAL and repository layer.&lt;/p&gt;  &lt;p&gt;NHibernate and other OR/M technologies allow for something called Lazy loading - where the initial query loads the Customer object, but then wraps it's properties (called proxies) so that when they are invoked, it actually automatically goes back to the database to get the entities required.&lt;/p&gt;  &lt;p&gt;A second alternative is to describe how deep you want the graph to load in the repository implementation (or even make this a factor of the query parameter to allow control further down the stack). Again, most OR/M's allow you to specify what you want to load from the graph - such as specifying to load the orders and order lines for a customer at the same time as it gets the customer. This usually offers some performance gains too as only one query is executed. (And in fact is your only option if you are using LINQ to entities as of V1, which doesn't support lazy loading).&lt;/p&gt;  &lt;p&gt;Regardless, your DAL or your repositories should be able to hydrate an object graph based on a request from further down the stack, and should also ensure that when you do get an object from the database, it only get's one instance of it!! (IBATIS for example doesn't do this by default and you must implement your own Identity Mapper pattern that is used by repositories).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Service implementations&lt;/strong&gt;    &lt;br /&gt;These are the actual end-points of your service - the ASMX you call, or in the case of WCF (my preference), the endpoints you've defined and implemented through service contracts.&lt;/p&gt;  &lt;p&gt;The service is responsible for taking an in-bound request object, working out what to do next, then invoke the appropriate repository methods to get or affect data before then assembling a response back to the caller.&lt;/p&gt;  &lt;p&gt;In other words, the service is invoked using a data contract in the form of a data transfer object (see below), it then, if necessary hydrates a domain object graph ready for use by repositories before invoking them and getting back domain objects. When it does, it uses assemblers (see below) to convert the full data representation from the domain into a structure of data that the client application is actually interested in (DTOs).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Data Transfer Objects - DTOs     &lt;br /&gt;&lt;/strong&gt;The purpose of DTOs is to represent the data needed to complete an activity in it's most minimal form for transmission over the wire. For example, where a client application is interested in customers, but is only interested in the customer's name and ID, but not the other 20 fields, your DTO would only represent customers as name and ID. They are lightweight representations.&lt;/p&gt;  &lt;p&gt;Communication between client applications and the service tier is done only through the use of DTO objects.&lt;/p&gt;  &lt;p&gt;Interestingly DTO type objects may be present in your domain (but not called DTOs). You may have several different representations of customer for instance in order to optimise how much information flows across the network between the domain model and the database. The trade off is how simple you want to keep your domain versus how much control you want over database performance.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Assemblers&lt;/strong&gt;    &lt;br /&gt;The assemblers are used by the service implementations to map between the conventions of DTO and Domain. For example, if you have a DTO contract for updating a customer, an assembler would take this DTO and map it to a valid customer domain object. This would then be passed to the repositories for serialisation.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Service Proxies&lt;/strong&gt;    &lt;br /&gt;Hopefully this requires very little explanation, the service proxy is a client side implementation of the service implementation that maps to the communications channel and invokes the actual code on the service tier. Your client application works exclusively with the service proxies and the DTO's that it expects and returns.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;    &lt;br /&gt;This is just one way to build scalable N-tiered enterprise applications. Several of the concepts presented here are interchangeable with other methods - such as active record instead of domain + repository. Speaking from personal experience I have seen the above work very well on large scale implementations.&lt;/p&gt;  &lt;p&gt;It is also worth mentioning some supporting concepts. To truly realise benefit from the above implementation, one would need to use interface driven development to allow any piece of the stack to be mocked and unit tested effectively. In addition, dependency injection can make your life easier as the scale of the system grows, automatically resolving dependencies between various objects between the tiers.&lt;/p&gt;  &lt;p&gt;In the future I will post a simple example application with source code that uses all of the above techniques to demonstrate the implementation specifics. I hope this was worth writing and someone finds it useful.&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=234" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term="case study" scheme="http://www.deepcode.co.uk/archive/tags/case+study/default.aspx" /><category term="wcf" scheme="http://www.deepcode.co.uk/archive/tags/wcf/default.aspx" /><category term="reference" scheme="http://www.deepcode.co.uk/archive/tags/reference/default.aspx" /><category term="linq" scheme="http://www.deepcode.co.uk/archive/tags/linq/default.aspx" /><category term="NHibernate" scheme="http://www.deepcode.co.uk/archive/tags/NHibernate/default.aspx" /><category term="soa" scheme="http://www.deepcode.co.uk/archive/tags/soa/default.aspx" /></entry><entry><title>Microsoft Tech-Ed is over, I'm going back to work for a REST</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/14/microsoft-tech-ed-is-over-i-m-going-back-to-work-for-a-rest.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/14/microsoft-tech-ed-is-over-i-m-going-back-to-work-for-a-rest.aspx</id><published>2008-11-14T21:36:04Z</published><updated>2008-11-14T21:36:04Z</updated><content type="html">&lt;p&gt;It's a shame that it's over for another year, and its been a fantastic, if somewhat tiring, week that I've thoroughly enjoyed. They cram in as much information as they can in the 5 days of the conference and provide you with everything you need to stay comfortable during the duration.&lt;/p&gt;  &lt;p&gt;On the social front, things were also good, the country drinks event was great on Wednesday night, and Barcelona overall was a cool place to hang out and chat about the day.&lt;/p&gt;  &lt;p&gt;The inhabitants of Barcelona must think there's a geek invasion or something though as every third table in the restaurants was debating Azure, L2E, federation in the cloud or whatever - but if that didn't convince them, then watching the games at the country drinks evening would have.&lt;/p&gt;  &lt;p&gt;One of the games during the night out was a form of bowling using a tennis ball. After the person had bowled, the ball was thrown back to the bowler. You could tell we were at a geek conference though as not one person managed to catch the ball!!!&lt;/p&gt;  &lt;p&gt;If anyone is thinking about Tech-Ed 2009 (in Berlin next year), I wouldn't hesitate to recommend it.&lt;img title="" height="308" alt="Top tier of the auditorium during the keynote." src="http://farm4.static.flickr.com/3105/2820734245_1d7becfef9.jpg?v=0" width="500" /&gt;&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=233" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term="tech ed" scheme="http://www.deepcode.co.uk/archive/tags/tech+ed/default.aspx" /></entry><entry><title>Day 5 - 15:15 : The TechEd Daily Scrum</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/14/day-5-15-15-the-teched-daily-scrum.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/14/day-5-15-15-the-teched-daily-scrum.aspx</id><published>2008-11-14T21:22:08Z</published><updated>2008-11-14T21:22:08Z</updated><content type="html">&lt;p&gt;Presented by Stephen Forte again (second time inside of a single day!), this final session at Tech-Ed was a review of what SCRUM is, how it's working for people and then it turned over to mass debate.&lt;/p&gt;  &lt;p&gt;Again, we find religious arguments coming to a head in this scenario between the agile purists and the more pragmatic fixed price bid guys. &lt;/p&gt;  &lt;p&gt;Personally, I'm somewhere in between, where, given the opportunity to do a time + materials project using SCRUM, I would prefer to, but often we must be realistic and offer fixed price contracts to clients, even though doing so is difficult because up front design is always wrong and this is why SCRUM rejects this outright.&lt;/p&gt;  &lt;p&gt;(Saying this though, even in fixed price bid contracts, one can still apply and benefit from the principles of SCRUM (backlogs, sprints, daily scrums, business owner involvement etc). Doing so will just expose problems earlier, which is a positive thing.)&lt;/p&gt;  &lt;p&gt;Big design up front wise - the minute a specification is published it starts to go out of date and becomes incorrect. Never have I (nor had anyone else in the room) seen a specification written before a project and been able to go back and compare the delivery with the original specification to find an exact match.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;Ranting&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;These differences, errors and omissions add time to the project, but in relation to total project time, not just in relation to the slippage felt by the initial mistake. For example, If I have a 4 month project and during month 1, I find slippage of 1 week, does my project length get extended by 1 week only?&lt;/p&gt;    &lt;p&gt;No - it gets extended as a factor of the time so far consumed and remaining. &lt;/p&gt;    &lt;p&gt;My project was 4 months, and in the first month I found an omission that has cost me 25% of the time I've spent so far, so it's a reasonable assumption that I'll find a similar quantity of omissions in the remaining development, so my overall increase isn't 1 week, it's 1 month - this is a &lt;strong&gt;fact&lt;/strong&gt; that causes many development projects to be seen as failures that have gone drastically over time and over budget.&lt;/p&gt;    &lt;p&gt;This principle, which has been proven many times was written by &lt;a href="http://en.wikipedia.org/wiki/Fred_Brooks" target="_blank"&gt;Fred Brookes&lt;/a&gt; in an essay back in 1975 and it is as valid today as it was back then. I recommend reading the book: &lt;a href="http://www.amazon.co.uk/Mythical-Month-Essays-Software-Engineering/dp/0201835959/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1226696251&amp;amp;sr=8-1" target="_blank"&gt;mythical man month&lt;/a&gt; for more information on this and many other principles - including the famous Brookes Law - adding more manpower to a late project makes it later.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;/Ranting&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Anyway, back to the session - it was highly enjoyable and despite the presence of significant dogma - I think everyone was able to learn something new from each other and from the presenter.&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=232" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term="rants" scheme="http://www.deepcode.co.uk/archive/tags/rants/default.aspx" /><category term=".net" scheme="http://www.deepcode.co.uk/archive/tags/.net/default.aspx" /><category term="tech ed" scheme="http://www.deepcode.co.uk/archive/tags/tech+ed/default.aspx" /><category term="SCRUM" scheme="http://www.deepcode.co.uk/archive/tags/SCRUM/default.aspx" /></entry><entry><title>Day 5 - 13:30 : An introduction to Oslo (mostly M)</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/14/day-5-13-30-an-introduction-to-oslo-mostly-m.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/14/day-5-13-30-an-introduction-to-oslo-mostly-m.aspx</id><published>2008-11-14T20:52:17Z</published><updated>2008-11-14T20:52:17Z</updated><content type="html">&lt;p&gt;This session, run by Jon Flanders focused on the new M modelling language - specifically MSchema and MGrammar. To be honest the entire session concentrated on using MSchema to generate T-SQL to create a database which I didn't feel was a great example and certainly wasn't real world.&lt;/p&gt;  &lt;p&gt;We already have a perfectly good textual DSL for building databases - it's called T-SQL, and just like the DSL, it can be split across multiple files, can generate data, and can be stored in source control for versioning.&lt;/p&gt;  &lt;p&gt;I really like Jon Flanders, he's a great guy, and he did a much better job of presenting M that I ever could, but I honestly didn't enjoy this session one bit.&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=231" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term="tech ed" scheme="http://www.deepcode.co.uk/archive/tags/tech+ed/default.aspx" /><category term="oslo" scheme="http://www.deepcode.co.uk/archive/tags/oslo/default.aspx" /><category term="M" scheme="http://www.deepcode.co.uk/archive/tags/M/default.aspx" /></entry><entry><title>Day 5 - 10:45 : Data access smackdown! Making sense of Microsoft's new data access strategy (DAT02-IS)</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/14/day-5-10-45-data-access-smackdown-making-sense-of-microsoft-s-new-data-access-strategy-dat02-is.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/14/day-5-10-45-data-access-smackdown-making-sense-of-microsoft-s-new-data-access-strategy-dat02-is.aspx</id><published>2008-11-14T20:41:02Z</published><updated>2008-11-14T20:41:02Z</updated><content type="html">&lt;p&gt;&lt;a href="http://www.stephenforte.net/" target="_blank"&gt;Stephen Forte&lt;/a&gt;, Chief Strategy Officer from Telerik, started this interactive session reviewing the history of Microsoft's data access offerings and then discussing the latest multitude of choices. As this was an interactive session, there were lots of questions, comments and debates going on throughout.&lt;/p&gt;  &lt;p&gt;A quick history - Microsoft gave us ODBC, then DAO with JET was sat on top of this, RDO wrapped DAO and ODBC, and then there was ODBCDirect. I can remember working with all of these technologies, so I must be getting on a bit now! (not really, I'm 35, technology just changes quickly). Anyway, from this they gave us ADO and with the release of .NET, we got ADO.NET.&lt;/p&gt;  &lt;p&gt;Today we have a bunch of options available and moving forward into the future, we're going to have even more choice. Sat atop of ADO.NET we have the conceptual model LINQ technologies (LINQ to SQL, XML, Entities, REST) along with cloud services (Azure) and SSDS (now SDS). That's without even thinking about 3rd party solutions like NHibernate, SubSonic etc - although these were also discussed.&lt;/p&gt;  &lt;p&gt;The debate was on-going concerning which technology should be used in which context, and as ever - there is &amp;quot;No Silver Bullet&amp;quot; - the stock answer to such a question is, and should be, it depends.&lt;/p&gt;  &lt;p&gt;Choosing which data access strategy you use should be one that gives the highest return for least complexity - not just the one that seems the most technically pure as this is purely subjective - eg: &amp;quot;objects first&amp;quot; people are going to look for OR/M, &amp;quot;data first&amp;quot; guys are looking for T-SQL and so on....&lt;/p&gt;  &lt;p&gt;If this means you want OR/M and are using TDD or you need facilities like lazy loading (and you don't always!), then avoid the entity framework - which doesn't cope well with either. In that scenario, perhaps you'd stick to NHibernate. On the other hand if you want highly optimised database queries and you want full control over them for whatever reason, use plain old ADO.NET. Maybe if you're writing a system that doesn't need lazy loading or you're not using TDD, then perhaps the entity framework is a great way to very quickly get started using entities with very little code.&lt;/p&gt;  &lt;p&gt;I get frustrated by dogma and elitists saying there's only one way to do things - the way they do it! We all have our preferred way of working, and I'm the first to promote various strategies and techniques as being good options, and sure, I'm occasionally guilty of being dogmatic, but dogma hurts objectivity - we should always consider the project in question and what is best for it rather than fly flags and banners.&lt;/p&gt;  &lt;p&gt;Stephen was questioned about, and acknowledged the vote of no-confidence and it's validity - and he made a very, very good point - this is V1 of the framework. The guys involved in EF are aware of it's limitations and are working to resolve them, but are heading in the right direction at least. Personally, I feel I came out of this session a little less dogmatic and a little more objective.&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=230" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term="rants" scheme="http://www.deepcode.co.uk/archive/tags/rants/default.aspx" /><category term=".net" scheme="http://www.deepcode.co.uk/archive/tags/.net/default.aspx" /><category term="linq" scheme="http://www.deepcode.co.uk/archive/tags/linq/default.aspx" /><category term="NHibernate" scheme="http://www.deepcode.co.uk/archive/tags/NHibernate/default.aspx" /><category term="tech ed" scheme="http://www.deepcode.co.uk/archive/tags/tech+ed/default.aspx" /></entry><entry><title>Day 5 - 09:00 : Identity and cloud services (ARC302)</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/14/day-5-09-00-identity-and-cloud-services-arc302.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/14/day-5-09-00-identity-and-cloud-services-arc302.aspx</id><published>2008-11-14T08:51:26Z</published><updated>2008-11-14T08:51:26Z</updated><content type="html">&lt;p&gt;Vittorio Bertocci presented this session on how to work with identity across services and environments using the cloud.&lt;/p&gt;  &lt;p&gt;Traditionally in enterprise we have a set of users and a set of resources that they can access. Each time the user accesses a resource, the user is validated against this source and granted or denied access etc. This scenario starts to become more complex when you wish to allow other environments to access your resources or for your users to access resources in other environments.&lt;/p&gt;  &lt;p&gt;The solution is to outsource aspects of identity management to the cloud, allowing relationships and credentials to be managed across technologies, services and environments. Where two systems, organisations or environments have no trust between them, we can use a claims transformer or resource security token system (R-STS) in the cloud that is trusted by both. &lt;/p&gt;  &lt;p&gt;This provides a natural point of trust brokering with customers and partners along with a natural point of authorisation evaluation and enforcement. &lt;/p&gt;  &lt;p&gt;Azure provides this type of service through the .NET services access control service. In this service, every solution gets a dedicated R-STS instance. The application has it's own policy which remains the same, whilst rules are created for how to transform between your various customers or partners tokens (or windows live credentials etc) to your own through the R-STS.&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=229" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author></entry><entry><title>Day 4 - 17:30 : Building and consuming REST based data services for the web. (WUX313)</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/13/day-4-17-30-building-and-consuming-rest-based-data-services-for-the-web-wux313.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/13/day-4-17-30-building-and-consuming-rest-based-data-services-for-the-web-wux313.aspx</id><published>2008-11-13T21:35:03Z</published><updated>2008-11-13T21:35:03Z</updated><content type="html">&lt;p&gt;In this session, Mike Flasko demonstrated the new ADO.NET data services framework that enables developers to create services that expose data over a REST interface using industry standard formats and semantics such as JSON and AtomPub.&lt;/p&gt;  &lt;p&gt;The reason I attended this session was to find out what this was all about because on the face of it, the idea of a data services framework worries me for a variety of reasons, including;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Why would I ever expose my &lt;strong&gt;entire&lt;/strong&gt; data model over a REST interface?&lt;/li&gt;    &lt;li&gt;Surely doing so breaks separation of concerns? My clients should be invoking a service or REST interface that returns targeted and focused results based on a strict request/response model.&lt;/li&gt;    &lt;li&gt;Isn't the data services framework tied to LINQ to Entities?&lt;/li&gt;    &lt;li&gt;Opening up an interface direct to my data sounds extremely dangerous and opens it to all manner of abuses!&lt;/li&gt;    &lt;li&gt;What if I have business logic executed when I manipulate data within my service - using data services this can't be expressed!&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Taking each in turn;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Why would I ever expose my &lt;strong&gt;&lt;em&gt;entire&lt;/em&gt;&lt;/strong&gt; data model over REST?      &lt;br /&gt;&lt;/u&gt;Quite simply, data is what drives much of web 2.0 - it drives mash-ups and makes data driven AJAX, flash and Silverlight applications possible. &lt;/p&gt;  &lt;p&gt;Normally we may expose this data through a bunch of services (possibly REST) with tightly defined semantics such as GetCustomers, GetCustomer(1) and so on. The data services team suggest however that as the application complexity and size increases, managing these interfaces can become cumbersome and tedious and may be serviced better by interfacing directly to the data via a specific data service.&lt;/p&gt;  &lt;p&gt;These data services are exposed as REST, allowing access to your data model by navigable URL. For example, lets say you have a data model of People with Contact telephone numbers, you could access this data with the following HTTP conventions;&lt;/p&gt;  &lt;p&gt;To get a list of people you would execute a standard GET verb request against the resource URL which might be something like: http://yourdomain.com/yourservice.svc/data/people&lt;/p&gt;  &lt;p&gt;To filter people, you would pass over parameters to the URL, perhaps like this: http://yourdomain.com/yourservice.svc/data/people?$filter=A$field=Name&lt;/p&gt;  &lt;p&gt;Whilst to get a specific person with an ID of 12, you might look at http://yourdomain.com/yourservice.svc/data/people(12)&lt;/p&gt;  &lt;p&gt;From here you can get a list of that persons contact details: http://yourdomain.com/yourservice.svc/data/people(12)/contacts&lt;/p&gt;  &lt;p&gt;To make changes to the data, you simply change the HTTP verb. Eg: to update a record, you would POST it, to insert, you would PUT and to remove you would DELETE (standard rest interface), and the results would be returned back in the format requested in the header (ie: you can set the accept type header value to specify that you want atom or JSON etc) - the outcome of any given action would also have a status response, which again map to the standard HTTP status codes - (eg: people(12) where no person exists with ID 12 would generate a 404 not found status error).&lt;/p&gt;  &lt;p&gt;When data is returned it also has relative navigable references to other parts of the data model. Again this is a common REST feature which describes not only the data that is being returned, but also how to navigate it by invoking the service with more specific information.&lt;/p&gt;  &lt;p&gt;On the client side, you are able to query against your data service using a LINQ query, offering a powerful and intelligent way to request the data you want from the web service, but this is also one of my concerns. &lt;/p&gt;  &lt;p&gt;&lt;u&gt;Isn't this breaking the principle of separation of concerns?&lt;/u&gt;     &lt;br /&gt;I believe it is because your calling code is tightly coupled to the semantics of your entity model, rather than being coupled only to the DTO that it is expecting to be returned. This might be a problem in some situations, but in others it may be perfectly fine, so there isn't a hard and fast rule here.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Isn't the data services framework tied to LINQ to Entities?     &lt;br /&gt;&lt;/u&gt;My next concern was the reliance of the data services framework on LINQ to entities, of which I'm not a big fan. I'm led to believe however that this isn't true. Apparently, your data service is able to expose any object model in any way you see fit, but in a limited 75 minute session, this wasn't covered in any detail. I'm assuming though that this will at least require that the context of your data (eg, an NHibernate session) implement the IQueryable interface to allow LINQ queries to run against it. Again, I'll reserve judgement on this until I've seen an implementation of a data service that isn't exposing a LINQ to entities model.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Opening up an interface direct to my data sounds extremely dangerous and opens it to all manner of abuses!     &lt;br /&gt;&lt;/u&gt;In terms of security however, my concerns were unfounded. One of the things I really liked about data services was the ability to lock down your data with any rule you can code. You use standard authentication and authorization mechanisms (this is just HTTP after all) to govern, with fine granularity, access permissions at entity level, row level and field level - this will please SPROC aficionado's who often argue they don't use OR/M technologies because they lose row level security on their data.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Business rules     &lt;br /&gt;&lt;/u&gt;Finally, the business rules and logic issue is still perfectly valid. If you need to carry out rules processing during invokation of operations on your model, then a conventional approach would be more suitable as you don't get this opportunity under data services. When a request arrives to manipulate data - it is surfaced straight into the data services framework and executes against your data.&lt;/p&gt;  &lt;p&gt;Overall I thought the technology was interesting and could see uses for it in numerous areas. In enterprise applications with distinct layers and business rules however I'm not sure it's that applicable, and I'd also like to see it surface a non-L2E model.&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=228" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term="wcf" scheme="http://www.deepcode.co.uk/archive/tags/wcf/default.aspx" /><category term=".net" scheme="http://www.deepcode.co.uk/archive/tags/.net/default.aspx" /><category term="ADO.NET" scheme="http://www.deepcode.co.uk/archive/tags/ADO.NET/default.aspx" /><category term="linq" scheme="http://www.deepcode.co.uk/archive/tags/linq/default.aspx" /><category term="tech ed" scheme="http://www.deepcode.co.uk/archive/tags/tech+ed/default.aspx" /></entry><entry><title>Day 4 - 15:45 : An overview of the Azure services platform (ARC201)</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/13/day-4-15-45-an-overview-of-the-azure-services-platform-arc201.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/13/day-4-15-45-an-overview-of-the-azure-services-platform-arc201.aspx</id><published>2008-11-13T20:20:09Z</published><updated>2008-11-13T20:20:09Z</updated><content type="html">&lt;p&gt;David Chappell is perhaps one of my favourite speakers from the conference. He tackled an objective look at Microsoft's new Azure platform in this session and gave what I thought was the clearest overview of the vision.&lt;/p&gt;  &lt;p&gt;Azure is Microsoft's new distributed platform that they define as &amp;quot;Windows in the cloud&amp;quot; and &amp;quot;Infrastructure in the cloud&amp;quot;. It's like having a huge data centre available on-tap, without having to invest heavily in capital expenditure, you simply rent the size of cloud you want, and scale up/down as needed.&lt;/p&gt;  &lt;p&gt;It offers not only the ability to deploy your applications to a scalable platform but also provides the ability to consume standard Azure service offerings including (amongst several others);&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;.NET Services&lt;/li&gt;    &lt;li&gt;SQL Data services&lt;/li&gt;    &lt;li&gt;Live services&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The fabric of Azure essentially provides a layer on top of thousands of virtual machines, all running windows server 2008, 64bit. Each virtual machine has a 1:1 relationship with a physical processor core. The fabric layer provides an abstraction on top of this virtualised hardware, so we can't access the virtual machines directly (eg: RDP to them), but we can build .NET applications in certain roles and deploy out to them.&lt;/p&gt;  &lt;p&gt;This is an extremely beneficial deployment model for whomever is building the next facebook, myspace or amazon out there - being able to build for the cloud and deploy incrementally to a scalable off-premises infrastructure allows new killer applications to fail fast or scale fast without huge capital outlay.&lt;/p&gt;  &lt;p&gt;This of course is not actually new - Amazon's elastic compute cloud, storage solutions, google's app engine, gears etc all offer the same sorts of cloud infrastructure and utility computing. In fact, for existing apps that can't be ported to use Azure functionality like storage, Amazon's EC2 platform provides a good alternative as this allows you to supply virtual machine images into the infrastructure, whereas Azure abstracts this away.&lt;/p&gt;  &lt;p&gt;The roles initially available are the web role and worker role. These correlate directly to an IIS hosted web application and standard .NET executable applications respectively, but deployed and hosted through the Azure fabric and the core services that this provides.&lt;/p&gt;  &lt;p&gt;These core services include the storage service which allows us to store;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Blobs&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Storing a simple hierarchy of any binary representation of data directly into the Azure storage services.&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Tables&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Storing structured data into hierarchical tables (not RDBMS tables).&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Queues&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Storing data into queues that allow communication between web and worker role instances. &lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;Data in storage is exposed to applications via a RESTful interface with a query language based on the LINQ C# syntax. Data can be accessed by Applications or from other on-premises or cloud based applications.&lt;/p&gt;  &lt;p&gt;In addition to the core Azure components of the web / worker roles and storage, it also offers a suite of pre-built ancillary services that can be consumed as mentioned above - presumably we'll pay extra for these, but the only comment Microsoft would make on pricing during the conference was that they will be competitive. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Azure .NET services     &lt;br /&gt;&lt;/strong&gt;This provides;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Access control services&lt;/li&gt;    &lt;li&gt;Service bus&lt;/li&gt;    &lt;li&gt;Workflow&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;em&gt;Access control services&lt;/em&gt;    &lt;br /&gt;Different organisations identify users with tokens that contain different claims. Each organisation might have different semantics and applications, especially across organisations, can be presented with a confusing mess.&lt;/p&gt;  &lt;p&gt;Azure's solution to this problem is to have an access control service that implements a security token service (STS) in the cloud. It accepts an incoming token (of various types if necessary) and issues out another one that may or may not differ from the incoming one. This allows for scenarios of single sign on across enterprises and organisations etc, from multiple sign on sources.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Service Bus&lt;/em&gt;    &lt;br /&gt;Exposing internal applications out onto the internet isn't easy. Network address translation and firewalls get in the way of efficiently and securely exposing your on-premises application to other users.&lt;/p&gt;  &lt;p&gt;In Azure, the service bus provides a cloud-based intermediary between clients and internal applications. Organisation X may expose application A by connecting it to the service bus - it initiates the connection, over standard ports, and keeps the connection open, thereby ensuring NAT doesn't interfere. Meanwhile, Organisation Y opens their connection to the service bus and connects to these intermediary end-points that map back to the actual organisation's end points.&lt;/p&gt;  &lt;p&gt;Of course all of this is controlled and secured with integration to the access control service.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Workflow&lt;/em&gt;    &lt;br /&gt;Where should workflow logic that co-ordinates cross organisation composite applications be run?&lt;/p&gt;  &lt;p&gt;Azure helps to make this clear by having the workflow service run WF based workflows in the cloud. There are some limits on what activities can be used (eg: no code activities), but having the workflow run in the cloud overcomes the problem it is meant to address.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SQL Data Services&lt;/strong&gt;    &lt;br /&gt;Formerly known as SSDS - this is now just SDS - is built on SQL server and provides a mechanism for working with a fixed hierarchy of data tied to a data sync service based on the sync framework. Whilst this sounds much like the storage service, the ultimate aim of SDS is to provide more database relevant facilities like reporting, analysis, ETL and more.&lt;/p&gt;  &lt;p&gt;It's important to distinguish that SDS is built on SQL server, but it is not SQL Server. It's a hierarchy storage solution. Each data centre has authorities and each of these has data containers, which in turn consist of entities and entities have properties. Each property has a name, a type and a value. &lt;/p&gt;  &lt;p&gt;This may seem a little limiting, but one key advantage is never having to worry about managing SQL servers or SDS itself. You just see data, not the database - all scalability and management etc is taken care of, on behalf of your application by the Azure platform.&lt;/p&gt;  &lt;p&gt;SDS data is accessed via SOAP and REST (including ADO.NET Data services) and, just like with the storage service, it provides a query language based on the LINQ syntax with queries returning entities. Unlike storage services however, SDS supports database type functionality with order by and join operations.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Live services&lt;/strong&gt;    &lt;br /&gt;Live services and the live framework offers something called a live operating environment (LOE) that allows for;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Accessing live services data, and personal data&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Contacts&lt;/li&gt;      &lt;li&gt;Hotmail&lt;/li&gt;      &lt;li&gt;Calendar&lt;/li&gt;      &lt;li&gt;Search&lt;/li&gt;      &lt;li&gt;Maps&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Creating a mesh of devices&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;My vista desktop&lt;/li&gt;      &lt;li&gt;My MAC OSX desktop&lt;/li&gt;      &lt;li&gt;My windows mobile device&lt;/li&gt;      &lt;li&gt;All running the live operating environment, with data synchronised across all devices and into the cloud.&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Creating mesh enabled web applications that can run through your browser, on your desktop or on any device within your live mesh.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Applications that are built to run within the mesh, on all of the LOE devices - create and consume both cloud and local data by using the live framework to access live services data via it's exposed REST interface (data is presented in the AtomPub format).&lt;/p&gt;  &lt;p&gt;Applications are rich internet applications (RIAs) built using silverlight, javascript, flash etc and run from the desktop or from the cloud on the devices within the mesh. A user can add devices into their mesh and can then select to install mesh applications (from a catalog) to the LOE in the cloud that are then also presented via the LOE on the mesh devices.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;    &lt;br /&gt;Microsoft are investing heavily in Azure and there's no doubt that cloud computing and more specifically utility computing will be a significant factor in the future and the Azure platform overall offers some exciting opportunities to exploit and monetise ideas with much lower commitment and risk.&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=227" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term=".net" scheme="http://www.deepcode.co.uk/archive/tags/.net/default.aspx" /><category term="tech ed" scheme="http://www.deepcode.co.uk/archive/tags/tech+ed/default.aspx" /><category term="azure" scheme="http://www.deepcode.co.uk/archive/tags/azure/default.aspx" /></entry><entry><title>Day 4 - 13:30 : Building WCF services with WF in .NET 4.0 (SOA302)</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/13/day-4-13-30-building-wcf-services-with-wf-in-net-4-0-soa302.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/13/day-4-13-30-building-wcf-services-with-wf-in-net-4-0-soa302.aspx</id><published>2008-11-13T13:05:47Z</published><updated>2008-11-13T13:05:47Z</updated><content type="html">&lt;p&gt;Jon Flanders from plural sight took this session looking at how you can expose WCF services from windows workflow on the .NET 4.0 stack, continuing from yesterdays first looks session.&lt;/p&gt;  &lt;p&gt;A cool feature being introduced is the ability to generate xaml only workflows in the form of .XAMLX files. These, when hosted in IIS or another host, allow an entire WCF endpoint along with all of the WF logic to be defined in a single xaml file. This file can be hand cranked or you can utilise the new WPF enabled WF designer surface.&lt;/p&gt;  &lt;p&gt;Guidance suggests benefits can be achieved using WF to define WCF services if the service;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Calls a database, calls another service, or uses the file system.&lt;/li&gt;    &lt;li&gt;Coordinates parallel work&lt;/li&gt;    &lt;li&gt;Enforces ordering between messages&lt;/li&gt;    &lt;li&gt;Coordinates messages with application state&lt;/li&gt;    &lt;li&gt;Is long running&lt;/li&gt;    &lt;li&gt;Requires rich tracking information&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=225" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term="wcf" scheme="http://www.deepcode.co.uk/archive/tags/wcf/default.aspx" /><category term=".net" scheme="http://www.deepcode.co.uk/archive/tags/.net/default.aspx" /><category term="tech ed" scheme="http://www.deepcode.co.uk/archive/tags/tech+ed/default.aspx" /><category term="wf" scheme="http://www.deepcode.co.uk/archive/tags/wf/default.aspx" /></entry><entry><title>Day 3 - 17:30 : Develop with the visual studio 2008 extensions for sharepoint</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/12/day-3-17-30-develop-with-the-visual-studio-2008-extensions-for-sharepoint.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/12/day-3-17-30-develop-with-the-visual-studio-2008-extensions-for-sharepoint.aspx</id><published>2008-11-12T17:27:00Z</published><updated>2008-11-12T17:27:00Z</updated><content type="html">&lt;p&gt;I went to this presentation to learn about the new visual studio extensions for sharepoint, unfortunately the presentation was an exact repeat of a PDC video I had already watched.
&lt;/p&gt;
&lt;p&gt;
The sharepoint extensions for visual studio 2008 make building sharepoint applications much easier than before and allow simple packaging of sharepoint solutions for deployment.
&lt;/p&gt;
&lt;p&gt;
For more information, (and in fact to watch the exact same presentation as I've just seen again) see the following PDC video:
&lt;a href="http://channel9.msdn.com/pdc2008/BB13/"&gt;http://channel9.msdn.com/pdc2008/BB13/&lt;/a&gt;
&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=224" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term="sharepoint" scheme="http://www.deepcode.co.uk/archive/tags/sharepoint/default.aspx" /><category term=".net" scheme="http://www.deepcode.co.uk/archive/tags/.net/default.aspx" /><category term="c#" scheme="http://www.deepcode.co.uk/archive/tags/c_2300_/default.aspx" /><category term="tech ed" scheme="http://www.deepcode.co.uk/archive/tags/tech+ed/default.aspx" /></entry><entry><title>Day 3 - 13:30 : An in-depth look at the ADO.NET Entity framework (DAT307)</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/12/day-3-13-30-an-in-depth-look-at-the-ado-net-entity-framework-dat307.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/12/day-3-13-30-an-in-depth-look-at-the-ado-net-entity-framework-dat307.aspx</id><published>2008-11-12T13:37:53Z</published><updated>2008-11-12T13:37:53Z</updated><content type="html">&lt;p&gt;This presentation, with Elisa Flasko, was covering an introduction to the entity framework and how it fits with common application patterns - client server, web applications and distributed N-Tier apps etc. &lt;/p&gt;  &lt;p&gt;The ADO.NET Entity framework is the next layer up in the ADO.NET technology stack that allows us to describe data using a conceptual model mapped to the database using a declarative mapping and queries using LINQ to entities.&lt;/p&gt;  &lt;p&gt;The demonstration started with replacing the data access layer of a client server application by importing an existing database structure. This pulled in the table structures and stored procedures of an existing database to an entity model, automatically resolving 1:n, 1:1 and n:n relationships to properties and collections etc.&lt;/p&gt;  &lt;p&gt;The result of this was a graphical view of the entity model. This is where my first concern is with the entity framework. Visual tools simply do not scale in large scale applications - imagine having hundreds or thousands of entities - a graphical tool simply doesn't cut it. Once the number of entities increases to any significant number the visual model becomes cumbersome. &lt;/p&gt;  &lt;p&gt;That aside, the demonstration then moved to consuming data. Rather than programming against the physical data model, you write code against the conceptual entity model. If you're at all familiar with OR/M solutions such as NHibernate or SubSonic, none of these concepts will be alien to you.&lt;/p&gt;  &lt;p&gt;One nice facility was the seamless integration between EF and LINQ, allowing elegant, strongly typed and intellisense enabled queries to be defined. (This isn't unique to EF however, there is LINQ for NHibernate for example)&lt;/p&gt;  &lt;p&gt;As you would hope, when queries execute, EF has a built in identity mapper pattern to ensure that only one instance of the same entity exists within the same context at any one time - this is an incredibly important feature to ensure you're always working with the correct and same unique object.&lt;/p&gt;  &lt;p&gt;The presentation moved on to using EF in a web application and using object data sources within ASP.NET, with two way binding etc. As far as EF goes, the usage wasn't particularly different from using it in the client server environment.&lt;/p&gt;  &lt;p&gt;Moving to N-Tier applications, as you might expect, the service layers utilise EF but then expose out from this data transfer objects (DTOs), although the speaker did mention that passing entities directly across the wire is &lt;em&gt;possible&lt;/em&gt;. Personally I would always go for the DTO pattern as this represents best practice to send out only the data your clients need to consume.&lt;/p&gt;  &lt;p&gt;Next, we looked at using ADO.NET data services (project Astoria) to expose an entity model directly over HTTP. This was reasonably cool, allowing the client to still query against the entity model using LINQ, but have this then executed remotely via your data service. Whilst this is a cool feature, it moves the responsibility for query to the wrong tier - the client should ask the service for data, the service should get it and return it appropriately - having the client issue any query it likes via the service breaks this separation, but is a cool feature non-the-less.&lt;/p&gt;  &lt;p&gt;Whilst the EF is a very positive step forward in the OR/M space for Microsoft, the fact is that there are more mature, open and proven technologies already in existence (such as NHibernate), and that several other persons in the field have issued &lt;a href="http://efvote.wufoo.com/forms/ado-net-entity-framework-vote-of-no-confidence/" target="_blank"&gt;a vote of no-confidence for the framework&lt;/a&gt; which must all be considered before proceeding with an EF implementation.&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=223" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term=".net" scheme="http://www.deepcode.co.uk/archive/tags/.net/default.aspx" /><category term="c#" scheme="http://www.deepcode.co.uk/archive/tags/c_2300_/default.aspx" /><category term="ADO.NET" scheme="http://www.deepcode.co.uk/archive/tags/ADO.NET/default.aspx" /><category term="linq" scheme="http://www.deepcode.co.uk/archive/tags/linq/default.aspx" /><category term="vs.net 2008" scheme="http://www.deepcode.co.uk/archive/tags/vs.net+2008/default.aspx" /><category term="NHibernate" scheme="http://www.deepcode.co.uk/archive/tags/NHibernate/default.aspx" /><category term="tech ed" scheme="http://www.deepcode.co.uk/archive/tags/tech+ed/default.aspx" /></entry><entry><title>Tech-Ed - Free TShirt of the week.</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/12/tech-ed-free-tshirt-of-the-week.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/12/tech-ed-free-tshirt-of-the-week.aspx</id><published>2008-11-12T12:06:11Z</published><updated>2008-11-12T12:06:11Z</updated><content type="html">&lt;p&gt;Just got a free t-shirt from the guys that produce dotfuscator. On the front the slogan is;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;&amp;quot;I can see you, I'm instrumenting&amp;quot;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;and on the rear;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;&amp;quot;You can't see me, I'm obfuscating&amp;quot;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Definite geek t-shirt, but I find this hilarious.&lt;/p&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=226" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term="tech ed" scheme="http://www.deepcode.co.uk/archive/tags/tech+ed/default.aspx" /></entry><entry><title>Day 3 - 10:45 : Windows Workflow Foundation 4.0: A first look (SOA207)</title><link rel="alternate" type="text/html" href="http://www.deepcode.co.uk/archive/2008/11/12/day-3-10-45-windows-workflow-foundation-4-0-a-first-look-soa207.aspx" /><id>http://www.deepcode.co.uk/archive/2008/11/12/day-3-10-45-windows-workflow-foundation-4-0-a-first-look-soa207.aspx</id><published>2008-11-12T10:09:55Z</published><updated>2008-11-12T10:09:55Z</updated><content type="html">&lt;p&gt;Presented by Aaron Skonnard, co-founder Pluralsight, this session looked at the up-coming release of windows workflow foundation 4.0.&lt;/p&gt;  &lt;p&gt;Firstly, my definition of workflow is slightly different to how MS define workflow. I think of workflow as the definition of a process - usually some form of state machine type process which involves activities consisting of system and human interaction. MS define workflow the same in most ways, but consider workflow to additionally be a new way to write software overall. &lt;/p&gt;  &lt;p&gt;In this guise, WF helps to move traditional sequential processing (get input, store state, with control flow logic) into a loose coupled distributed world (SOA). However, the current implementation of WF has challenges for adoption including;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Limited support for XAML only workflows.&lt;/li&gt;    &lt;li&gt;Versioning is problematic&lt;/li&gt;    &lt;li&gt;Limited base activity library&lt;/li&gt;    &lt;li&gt;Writing custom activities and managing data flow is not easy enough today&lt;/li&gt;    &lt;li&gt;Limited WCF integration and activity support&lt;/li&gt;    &lt;li&gt;No generic server host environment&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;WF 4.0 aims to address these issues in .NET 4.0 by introducing:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;XAML only workflows are the new default, with a unified model between WF, WCF and WPF. (Set breakpoints in XAML, designer writes XAML etc)&lt;/li&gt;    &lt;li&gt;Extended base activity library&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Flow Control&lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;Flowchart&lt;/li&gt;        &lt;li&gt;ForEach&lt;/li&gt;        &lt;li&gt;DoWhile&lt;/li&gt;        &lt;li&gt;Break&lt;/li&gt;     &lt;/ul&gt;      &lt;li&gt;WCF&lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;SendMessage&lt;/li&gt;        &lt;li&gt;ReceiveMessage&lt;/li&gt;        &lt;li&gt;ClientOperation&lt;/li&gt;        &lt;li&gt;ServiceOperation&lt;/li&gt;        &lt;li&gt;CorrelationScope&lt;/li&gt;        &lt;li&gt;InitializeCorrelation&lt;/li&gt;     &lt;/ul&gt;      &lt;li&gt;Others&lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;Assign&lt;/li&gt;        &lt;li&gt;MethodInvoke&lt;/li&gt;        &lt;li&gt;Persist&lt;/li&gt;        &lt;li&gt;Interop&lt;/li&gt;        &lt;li&gt;PowerShellCommand&lt;/li&gt;     &lt;/ul&gt;      &lt;li&gt;+ MS are planning to ship additional activities via codeplex.&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Simplified WF programming model&lt;/li&gt;    &lt;li&gt;Support for arguments, variables, expressions&lt;/li&gt;    &lt;li&gt;Major improvements to WCF integration&lt;/li&gt;    &lt;li&gt;Runtime and designer improvements (designer is WPF based)&lt;/li&gt;    &lt;li&gt;Hosting and management via &amp;quot;Dublin&amp;quot;&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://www.deepcode.co.uk/aggbug.aspx?PostID=222" width="1" height="1"&gt;</content><author><name>tonyj</name><uri>http://www.deepcode.co.uk/members/tonyj.aspx</uri></author><category term=".net" scheme="http://www.deepcode.co.uk/archive/tags/.net/default.aspx" /><category term="c#" scheme="http://www.deepcode.co.uk/archive/tags/c_2300_/default.aspx" /><category term="tech ed" scheme="http://www.deepcode.co.uk/archive/tags/tech+ed/default.aspx" /><category term="wf" scheme="http://www.deepcode.co.uk/archive/tags/wf/default.aspx" /></entry></feed>