Mike Taulty's Blog
Bits and Bytes from Microsoft UK

April 2007 - Mike Taulty's Blog

Blogs

Mike Taulty's Blog

Elsewhere

  • Fx 3.5, Workflow, WCF and "Durable Services"

    I came across this idea of "Durable Services" in Workflow V3.5 and I thought I'd have a stab at explaining what I saw here. "Durable Services" look to be a set of extensions to WCF that ship in System.WorkflowServices.dll . From what I can see, "Durable Services" provide a mechanism for automatically persisting the state that your service needs to maintain during a conversation with a particular client until that client is "done" with the service. That state can survive both service re-starts and client re-starts (as long as the client persists enough information to get back to it). In some ways, that sounds a bit like "session" to me. My understanding of session in WCF being; We attribute up our contract to mark operations that begin or complete a session. New client calls service. Infrastructure checks session token and because there's none present it ensures that the call is to a begin method. Service returns some additional header to client with session token in it. Client calls service again. Infrastructure...
  • LINQ and the Entity Framework - Announcement

    There's an announcement over on the Data Access Team's blog about the ADO.NET Entity Framework . In a nutshell, Entity Framework and LINQ to Entities will ship in the first half of 2008, not with "Orcas". "Microsoft is defining a migration plan for customers that start with LINQ to SQL and require additional functionality, such as richer mapping capabilities or access to other stores, to migrate to the ADO.NET Entity Framework" I quoted the second point as I'm not exactly sure at the time of writing what form that'll take so don't want to add some wording of my own to it that gives the wrong impression.
  • LINQ to Video #11

    For the initial post, see here . Today's Video Title When Do Queries Execute? Topic LINQ to SQL Publication Date 30th April, 2007 Download Link (best to save, not stream) http://mtaulty.com/videos/nuggets/l2s/11_mt_l2s_whenqueriesexecute.wmv Description With LINQ to SQL there is a marked difference between defining a query and executing a query and it's important to know when your queries are going to execute in order that you remain in control of the number and frequency of your round-trips to the database. In this session we take a look at how you do that. VS Version Used Visual Studio "Orcas" March CTP Download Size 6MB Running Time 8 minutes Previous Videos Dealing with NULLs 27th April, 2007 Joins 26th April, 2007 Concurrency 25th April, 2007 Updating Data 24th April, 2007 Deleting Data 23rd April, 2007 Inserting Data 20th April, 2007 Tools for Generating Mapping Information 19th April, 2007 Mapping .NET Types to Relational Schema 18th April, 2007 A Tour Around the DataContext 17th April, 2007 Introduction...
  • "Orcas" Workflow: wsHttpContextBinding and netTcpContextBinding

    I was thinking about the two bindings that look to be present with the WF bits in Fx 3.5 "Orcas" Beta 1 which are wsHttpContextBinding and netTcpContextBinding. This is purely me experimenting with the bits so apply a large(r) pinch of salt. These are interesting to me in that (from the name) one of them is built on a duplex transport and one of them isn't. This prompted me to take me previous workflow and alter it to do; i.e. introduce a serious delay in between receiving the request message and returning the reply and this causes problems for the wsHttpContextBinding because the HTTP response doesnt' come back in time so the client times out. It causes no trouble to the netTcpContextBinding which doesn't have the notion of a "response" as such. It's funny to me that HTTP and it's request-response pattern still surfaces all over the place and causes pain (I remember reading this a long time ago and it still rings in my ears) and this seems to be an example of it. In some ways it's more noticeable in Workflow...
  • RadControls for Silverlight

    Blimey ! http://www.telerik.com/demos/aspnet/silverlight/Cube/Examples/RoomDesigner/DefaultCS.aspx Very nice demos and very easy syntax. I guess this is just the beginning? :-)
  • "Orcas" Beta 1. Workflow Changes. WorkflowServiceHost.

    I spent my first few minutes trying to understand the Workflow changes in Beta 1 of "Orcas" today. So far, what I'm aware of is that there are a couple of new activities called Send and Receive which couple Workflow to WCF rather than just ASMX web services which is what we had in V3.0 (although it's not too hard to use external communication services to make it work with WCF) and there's also a new class called WorkflowServiceHost which (at least logically) seems to do something like; Derive from ServiceHostBase and, therefore, "is" a ServiceHost for WCF Aggregate at least one (maybe more? not sure!) instances of the WorkflowRuntime for us. Provides a whole bunch of WCF infrastructure around what seems to be called a ContextToken which looks like a bunch of state used to identity a particular Receive activity inside a particular Workflow instance. It looks like a ContextToken can be passed around either as an HTTP Cookie (which is what got done for ASMX web services if I remember correctly) or as a SOAP header...
  • LINQ to Video #10

    For the initial post, see here . Today's Video Title Dealing with Nulls Topic LINQ to SQL Publication Date 27th April, 2007 Download Link (best to save, not stream) http://mtaulty.com/videos/nuggets/l2s/10_mt_l2s_nullability.wmv Description With the .NET Framework prior to V2.0 there was always a certain "gap" between the way in which the database allowed NULL as a possible value for every data type and the way in which the .NET type system did not. With .NET V2.0 this gap got closed and LINQ to SQL makes use of that in order to offer a natural way of dealing with DB NULLs from our .NET code. Here we take a very quick look. VS Version Used Visual Studio "Orcas" March CTP Download Size 6MB Running Time 9 minutes Previous Videos Joins 26th April, 2007 Concurrency 25th April, 2007 Updating Data 24th April, 2007 Deleting Data 23rd April, 2007 Inserting Data 20th April, 2007 Tools for Generating Mapping Information 19th April, 2007 Mapping .NET Types to Relational Schema 18th April, 2007 A Tour Around the DataContext...
  • Silverlight

    I'm saying nothing because, as always, I know nothing but I agree that this is an interesting question; http://blogs.zdnet.com/Stewart/?p=351 I guess it's TBD at this point.
  • LINQ to Video #8

    For the initial post, see here . Today's Video Title Concurrency Topic LINQ to SQL Publication Date 25th April, 2007 Download Link (best to save, not stream) http://mtaulty.com/videos/nuggets/l2s/08_mt_l2s_concurrency.wmv Description The LINQ to SQL framework operates an optimistic concurrency model to detect when the data that you're updating has been changed since you selected it from the database. In this video, we'll look at how this works and how you can take control as to which columns take part in concurrency checking.. VS Version Used Visual Studio "Orcas" March CTP Download Size 13MB Running Time 19 minutes Previous Videos Updating Data 24th April, 2007 Deleting Data 23rd April, 2007 Inserting Data 20th April, 2007 Tools for Generating Mapping Information 19th April, 2007 Mapping .NET Types to Relational Schema 18th April, 2007 A Tour Around the DataContext 17th April, 2007 Introduction to LINQ to SQL 16th April, 2007 Next Video Joins [LINQ to SQL], Publish Date: 26th April, 2007.
  • System.Linq.Expressions

    One of the parts of the "story" that I attempted to tell here that underpins the flexibility we get here is the ability of the compiler+framework to take a Lambda and represent it as a piece of data. I used this bit of code to try and highlight where the "differences" between Lambda and Anonymous Methods starts to show; class Program { delegate string IntToStringConverter( int i); static string ConvertIntToString( int i) { return (i.ToString()); } delegate R GenericConverter<R, P>(P p); static R ConvertGenerically<R, P>( GenericConverter<R, P> converter, P p) { return (converter(p)); } static void Main( string [] args) { IntToStringConverter fn = new IntToStringConverter(ConvertIntToString); // We can also short-cut to fn = ConvertIntToString; // We can also use an anonymous method fn = delegate ( int i) { return (i.ToString()); }; // Lambdas initially look like anonymous methods fn = ( int i) => { return (i.ToString()); }; // Simplified fn = ( int i) => i.ToString(); // Type taken away...
  • .NET Developer Network

    Last night, I spoke at the newly formed .NET Developer Network in Bristol, as below; The group has been brought together by Guy Smith-Ferrier who's done a great job of getting the group up and running, setting up the website, finding a venue (although he's looking for another one) and I really liked the intro that he did to the group as it had a whole bunch of great ideas for how user groups should/could run. I spent some time talking about LINQ in terms of trying to introduce what I think is the rationale behind it, how the pattern works in terms of new language features and how the pattern is open to being re-implemented using a little bit of LINQ to XML and LINQ to SQL as examples of what we can do with it. If you're in the Bristol area then this is a great resource and I know Guy's already got a few meetings lined up so I'd encourage you not to miss out. For attendees that were there last night, Guy has the powerpoint and demo files that I used and Visual Studio "Orcas" Beta 1 is available from here
  • LINQ to SQL - Dynamically Constructing Queries

    Update - I annotated the last code fragment here which puts the pieces together because I don't think it was very clear (especially if you've not played with LINQ to SQL yet) exactly what goes on. Hopefully it's now a bit clearer. Someone dropped me a mail and asked me about whether it's possible using something like LINQ to dynamically construct queries. A common example of a LINQ to SQL query (assuming that we have the Northwind database and the Customers,Orders tables from it) would be something like; NorthwindDataContext ctx = new NorthwindDataContext( "server=.;database=northwind" ); var query = from c in ctx.Customers where c.Country == "Germany" select c; One of the "nice" things about the way in which this stuff works is that this is not executing any queries at this point but, rather, it's simply capturing the definition of the query as an expression. I often seem to end up trying to describe this as "capturing the intention of the query" and, once captured, it's up to the implementation of the thing...
  • LINQ to Video #7

    For the initial post, see here . Today's Video Title Updating Data Topic LINQ to SQL Publication Date 24th April, 2007 Download Link (best to save, not stream) http://mtaulty.com/videos/nuggets/l2s/07_mt_l2s_updates.wmv Description We've covered off inserts, done some deletes and so it's time to look at modifying data in the database whether you originally queried for it or not. One of the topics that crops up in updating data is how to manage concurrent modifications which we'll look at in the following session. VS Version Used Visual Studio "Orcas" March CTP Download Size 12MB Running Time 20 minutes Previous Videos Deleting Data 23rd April, 2007 Inserting Data 20th April, 2007 Tools for Generating Mapping Information 19th April, 2007 Mapping .NET Types to Relational Schema 18th April, 2007 A Tour Around the DataContext 17th April, 2007 Introduction to LINQ to SQL 16th April, 2007 Next Video Concurrency [LINQ to SQL], Publish Date: 25th April, 2007.
  • Exceptional LINQ

    I hit a bit of a strange scenario the other day where I was trying to construct some XML using LINQ to XML so I thought that I'd share. I was trying to take a process list from my machine and turn it into XML (just for demo purposes) and I ended up with something like; XElement doc = new XElement( "processes" , from p in Process.GetProcesses() select new XElement( "process" , from ProcessModule m in p.Modules select new XElement( "modules" ))); Now, the odd thing about this innocuous looking piece of code is that you can't call the Modules property on every Process instance that gets returned from Process.GetProcesses() . For some of those processes (particularly the Idle process and a few other system processes) you'll get an exception when you call that Modules property. Or, at least, I do. Now, this is probably a rare scenario where a collection access like this throws an exception rather than (for instance) either offering a property that you can check before using the property (e.g. HasModules although I...
  • (C) 1982 Sinclair Research

    http://en.wikipedia.org/wiki/Sinclair_Spectrum I remember reading the brochure at the kitchen table and then waiting an eternity for them to ship it (and then the endless cycles of sending it back to get it fixed and/or upgraded :-)). According to Slashdot it was 25 years ago today which makes me feel a little bit old :-)
1 2 3 Next >