Durable Duplex Messaging in .Net 4 Beta2

Here I talked about couple of approaches to enable durable duplex messaging in .Net 3.5. .NET 4 has added first class support for durable duplex messaging by extending Context Exchange Protocol to include a CallbackContext. So in addition to instanceId, a client application can send a callback context as part of the call. Service, upon…

0

Enforcing Unobtrusive JavaScript

Unobtrusive JavaScript is a concept that’s been around for quite a while, but it’s now finally starting to make its way into the mainstream. The basic idea is that you should separate your JavaScript from your HTML – so instead of; <a href=”Default.aspx” onclick=”alert(‘Sorry, that is unavailable’); return false;” >Click Here</a> You should have something…

2

PowerShell script to clean and zip a directory

  As part of my role I’m often sending sample code to customers. Sometimes this is a small snippet inline in an email, but often it will be a zipped up Visual Studio solution. Simply zipping up the folder as-is ends up including bin and obj directories which bloat the zip. Performing a clean in…

0

New snippets for Silverlight and WPF

A while back I posted some snippets for WPF here: WPF Snippets for Visual Studio. I’ve been wanting to update these for a while now and finally got around to it this morning. Here are the new snippets. basevmThis is a snippet that effectively replaces the inpc snippet (although that is still included for demos…

0

Loading Scripts Late

On the ASP.NET ScriptManager control there is a useful little property that very few people have heard of called “LoadScriptsBeforeUI”. What does it do? Well, simply put… ·         When “true” (the default) it will render <script> tags for each script you reference using the ScriptManager at the top of your HTML. ·         When “false” it…

0

A Suck Less Event Aggregator for Prism?

  I heard on twitter the other day (Yes, I now tweet occasionally. If you’d like to waste literally seconds of your day you can follow me at joshtwist) that some folks at an Alt.Net UK event where giving P&P and Prism a rough ride. Specifically, they had some issues with the EventAggregator – citing…

0

Monitor your ASP.NET Cache API Behaviour

Recently I was working on diagnosing a performance issue with a customer’s web site with a colleague (this is one of our favourite engagement types so if you need some help let me know J), and we found that items were being trimmed very regularly from the ASP.NET Cache, causing excessive back-end work, and in…

0

Duplex communication with .Net 3.5 Workflow Services

Workflow Services was introduced as part of .Net 3.5 and enables us to use WF workflows as implementation of our WCF services. Workflows are long running by nature so the usual WCF duplex messaging constructs (where correlation between client & server is done based on actual physical connection/socket) are not suitable for most cases. Primarily…

0

T4MVC now with multiple file support

Ok, so I’m indulging in self-publicity a little with this post, but I really want to take the opportunity to highlight some great work that David Ebbo has done. I’ve been spending a bit of time with ASP.NET MVC Framework and really like it. The combination of testability, being led towards separation of concerns, massive…

0

Flexible Enumerations

Sometimes enumerations in .NET just don’t cut it. In the end they’re just a numeric value to which a piece of string metadata is attached to some of the values. Consider the following enumerations: public enum OfficeLocationNames {     London,     Edinburgh,     Redmond } public enum OfficeLocationCodes {     LON,     EDI,    …

2