Welcome to blogs.conchango.com Sign in | Join | Help

Welcome to blogs.conchango.com

Howard van Rooijen's Blog

  • Speeding up your Desktop Build [Part 1]

    On my current project I wanted to do a little pit stop after our 1st sprint to ensure that the solution was running as optimally as possible. We’ve fleshed out the solution structure and have pulled together all the core pieces of technology – so within Visual Studio, the solution looks like:

    Solution ‘MyApp’
    +---Data
    |   +---Visual Studio 2008 Database GDR Project files (do not build in debug mode)
    +---Deployment
    |   +---WiX Installer Projects for deploying “Presentation” projects (do not build in debug mode)
    +---Domain
    |   +---MyApp.Domain Project (contains core contracts + domain entities + specifications)
    +---Framework
    |   +---MyApp.Core.* (any projects with cross cutting concerns, caching, logging, utils, or reusable libraries etc)
    +---Infrastructure
    |   +---MyApp.Infrastructure (external infrastructure - databases, search engines, email gateways etc)
    +---Presentation
    |   +--- MyApp.Web, MyApp.Web.Controllers, MyApp.WCFEndpoints
    \---Services
        +--- MyApp.Services, MyApp.Management.Services

    The solution structure is based around trying to solidify some of the notions in Domain Driven Design and some of the ideas mentioned in Jeffery Palermo’s Onion Architecture (which owes a lot to Alistair Cockburn’s notion of a Hexagonal Architecture). We’ve created solution folders called “Data”, “Deployment”, “Domain”, “Framework”, “Infrastructure”, “Presentation” and “Services” so that when the team come to work on a new sprint backlog item and start to decompose the feature that they are going to be creating it becomes pretty obvious where the code should go if you ask yourself the question “is this a domain entity? Is this code generic and could be reused throughout the solution? Is this code going to be integrating with external / 3rd party systems?”.

    I raised this solution structure on the Sharp Architecture Forum, Kyle Baley responded that he had moved to a single project solution containing all the the different architectural layers – as this offered the best build performance. Patrick Smacchia often posts advice on partitioning code through .NET Assemblies and Jeremy Miller has also blogged that Separate Assemblies != Loose Coupling but there is a big difference in running a project as a solo dev and running a project with a team, amongst multiple teams, especially when you are trying to reuse IP and cross fertilise ideas and practices. It’s also often forgotten that Visual Studio Solutions and Projects are development constructs not deployment constructs. With tools like PostSharp and ILMerge more behaviours can be added post build and multiple assemblies (and their dependencies) can be packaged into a single deployable unit.

    The Problem

    Doing a build after running “Clean Solution” takes 18 seconds and doing a “Rebuild Solution” takes 15 seconds. Not exactly huge, but it definitely feels sluggish for the number of projects in the solution. (If you want to measure build times within Visual Studio – you need to change the Build Output verbosity via Tools > Options > Projects and Solutions > Build and Run > “MSBuild project build output verbosity” and change it to normal).

    Admittedly all the projects under the “Framework” folder should be included as assembly references, but we’re early on in the project and we’re constantly making changes – once the code churn level reduces, we can factor those out. We’re using a lot of 3rd party frameworks which means each project has lots of assembly references which by default are set to be CopyLocal = true. Hopefully you are aware that CopyLocal = true is EVIL.

    A Solution

    To speed up the build – set CopyLocal = false on all 3rd Party Assemblies, but ensure that Project References are still set to CopyLocal = true (otherwise you’ll stop seeing your changes!).  There is one exception; you need to ensure that CopyLocal = true on your “Presentation” projects i.e. your web application – otherwise when you load the site you will see ReflectionTypeLoadException errors.

    There’s one further problem in our solution – we’ve adopted embedding our BDD specs within our projects and we’re using TDD.NET / ReSharper Gallio Unit Test Runner inside VS to execute them. This means that the majority of our projects actually require local copies of the referenced assemblies in order to execute the test, but we don’t want to pay the performance tax of Visual Studio copying those assemblies every time we do a build. So I created a MSBuild target that we can run once to configure the solution (if you don’t want to run tests inside your projects skip to The Result):

    <Target Name="ImportReferencedAssemblies"> 
      <!--Process the given VS SLN file and return all CS Projects – this task is in HvR.MSBuild.Tasks.dll-->
      <GetCSProjectsForSolution Solution="@(SolutionToBuild)">
        <Output TaskParameter="Output" ItemName="SolutionProjects" />
      </GetCSProjectsForSolution>

      <PropertyGroup>
        <ConfigFolder>$(BuildPath)\..\ReferencedAssemblies\</ConfigFolder>
      </PropertyGroup>

      <!--Delete any pre-existing ReferencedAssemblies—>
      <RemoveDir Directories="%(SolutionProjects.Location)\bin\$(Configuration)\ReferencedAssemblies\" />

      <!--Get all Files within the master ReferencedAssemblies folder and prepare them to be copies to each project bin\(Debug | Release) folder—> 
     
    <CreateItem Include="$(ConfigFolder)\**\*.dll"
                  AdditionalMetadata="ToDir=%(SolutionProjects.Location)\bin\$(Configuration)\ReferencedAssemblies\">
        <Output TaskParameter="Include"
                ItemName="ConfigFilesToDeploy" />
      </CreateItem>

      <!--Now copy all of the files to the appropriate folders-->
      <Copy SourceFiles="@(ConfigFilesToDeploy)"
            DestinationFolder="%(ToDir)\\" />
    </Target>

    Essentially this script processes the Visual Studio .SLN file, returns all the CS Project file locations, then copies the contents of the ReferencedAssemblies folder to the bin\Debug\ReferencedAssemblies folder of each project.

    Next you have to create a App.Config file that you can share across all your projects, add this as a “Linked File” in any projects where you want to run unit tests. The App.Config file should contain the following configuration section:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <probing privatePath="Debug;ReferencedAssemblies" />
        </assemblyBinding>
      </runtime>
    </configuration>

    This tells the .NET Framework Fusion Assembly Loading Engine at runtime to look in the Debug and Debug\ReferencedAssemblies folders for any assemblies referenced by the project. Hey presto, unit tests will now execute successfully without throwing an ReflectionTypeLoadException 

    The Result

    After making those small changes; doing build after running “Clean Solution” takes 9 seconds (saves 9 seconds) and doing a “Rebuild Solution” takes 5 seconds (saves 10 seconds) – which means we can now do a build and run an ad hoc unit test in the time it used to take to just do a build.

    If you would like the custom MSBuild Task so you can try this on your own solution, you can download it from my CodePlex project.

  • StyleCop for ReSharper v4.5.0.000 (R# 4.5 RTM Compatible) Released

    We’ve just pushed the latest build of StyleCop for ReSharper live. This brings it up to date with ReSharper 4.5 RTM and fixes a few bugs. We’ve also change the build number to align it with ReSharper to avoid confusion. Release notes below:

    Feature Complete Build of StyleCop for ReSharper.

    Compatible with:

    • ReSharper 4.5 (RTM)
    • StyleCop 4.3.1.3

    There are 148 StyleCop rules.

    • 38 of these must be fixed manually (normally because you have to type descriptive text or rename variables).
    • Of the remaining 110 rules 58 are fixed by R# Code Cleanup (silent mode).
    • Of the 52 now remaining we have Code Cleanup rules that fix all of them.

    We also provide 106 Quick Fixes that provide in place context menu fixes for violations for the 110 rules that can be fixed automatically.

    Fixes:

    • Remove paranthesis on bitwise operations
    • AutoUpdater will now display a message if there is one in the version.txt.
    • Fixing error condition when looknig for an Item and not a property
    • Wasn't detecting a Boolean property correctly since 4.5

     

    [UPDATE] If you are having problems installing SCfR# 4.5 ("ReSharper 4.1 required for uninstall") - please see the CodePlex discussions site for resolutions.
  • StyleCop for ReSharper 1.5.0.000 (ReSharper 4.5 Beta Compatible) Released

    Within a few hours of releasing StyleCop for ReSharper 1.0, we've managed to create a ReSharper 4.5 Beta compatible version. The changes JetBrains have made to ReSharper 4.5 are vast, which is not surprising when you see the stats for the performance increases they've managed to achieve. Luckily JetBrains have created a document on their wiki to aid with the migration of plugins from 4.1 to 4.5; this doc shows the scale of the changes they've made.

    StyleCop for ReSharper 1.5 is available from the project CodePlex site. Please report any issues you find.

    Once again, thanks to Andy for all the hard work.

  • StyleCop for ReSharper goes v1.0.0.000

    Feature Complete Build of StyleCop for ReSharper.

    Compatible with ReSharper 4.1
    Compatible with StyleCop 4.3.1.3

    There are 148 StyleCop rules.

    • 38 of these must be fixed manually (normally because you have to type descriptive text or rename variables).
    • Of the remaining 110 rules 58 are fixed by R# Code Cleanup (silent mode).
    • Of the 52 now remaining we have Code Cleanup rules that fix all of them.

    We also provide 106 Quick Fixes that provide in place context menu fixes for violations for the 110 rules that can be fixed automatically.

    New Features:

    • AutoUpdater functionality - you will now automatically be notified when a new version is available.

    scfr_auto_update

    Fixes:

    • Removed launch conditions from uninstall process
    • Added 'support' and detection of R# 4.5
    • Changed minimum supported StyleCop version to 4.3.1
    • Always highlight the full line we have for violations to avoid missing any or selecting the wrong item on the line.
    • Spacing around + and - and exclude additive expressions.
    • New functions for returning all the tokens on the line that a text control is on.
    • Generics on a base type were not swapped to built in types.

    I wanted to say a massive thank-you to the StyleCop for ReSharper Development Team for all their effort over the last 6 months (with a special call-out to Andy Reeves and the jaw dropping amount of effort he's put into the project). I also wanted to say a huge thank-you to all the people who downloaded, tried and provided feedback.

    As usual you can get the release from the CodePlex Project.

    We're now working on a 1.5 build to support ReSharper 4.5 Beta.

  • Hobby Projects find a new home

    Just a short post to say that I've created a CodePlex Project for all my blog code samples and hobby projects. So if you're looking for TFS Notification Web Services - 1.2, Visual Studio 2005 Xml Debugger Visualizer, MonkeyWrangler, Conchango.Build.TaskBuilder or AssemblyReflector, head over to CodePlex.

  • CMS in the .NET World

    If anyone follows me on Twitter, you'll have seen my early morning rant a few weeks ago about the woeful state of CMS on the .NET platform, with particular reference to Open Source offerings. This was sparked off by the current depressing thread on the Telligent GraffitiCMS forum about the future of the product.

    If you look in the non-Microsoft world there are some quite well established (Open Source), mature systems, each with their own rich eco-systems; Plone, Joomla, Drupal are just three examples. James Saull sent me a link to CMS Watch's "CMS vendor tube map" - a quite impressive distillation of the entire CMS universe:

    CMS Watch Subway Map 2009

    Source - CMS Watch.

    If you delve into the non-Open Source CMS market on the Microsoft Platform, there are some very strong contenders:

    But these were a tad difficult to find as the Open Source Microsoft Platform, doesn't suffer from a drought of Blogging Platforms:

    After doing a bit of digging, the top Open Source .NET CMS Platforms are:

    Umbraco seems to be the most popular and is gaining the most momentum (version 4 has ~30,000 downloads on CodePlex) and offers a paid for version that comes with support and some extra tooling, there is even a yearly conference. Cuyahoga is a bit of an unknown entity, although Oren (Ayende) seems to rate it highly.

    N2 is an impressive entry - in that it takes a different approach to CMS; with Umbraco, you are forced to code within the Umbraco framework and thus create a CMS System with bespoke application functionality, whereas, N2 allows you to integrate CMS at the API Level, and thus allows you to create rich applications with CMS functionality. A subtle difference, but very powerful.

  • CodePlex Feature Request - "Releases RSS Feed should contain release artefacts as enclosures"

    We want to add an auto-update feature to StyleCop for ReSharper, the most obvious way of creating such a feature would be to use the project's Releases RSS Feed, but unfortunately the feed doesn't contain the release files, simply a link to the release page. So I've created a feature request for CodePlex called "Releases RSS Feed should contain release artefacts as enclosures". If you would like to see this feature, please vote for it and hopefully we can have a simple system for automatically notifying users of (and automatically applying) updates to applications hosted on CodePlex.
  • New release of StyleCop, new release of StyleCop for ReSharper

    Microsoft released a new version of StyleCop - v4.3.1.3 last week and so we've just released a new compatible version of StyleCop for ReSharper

  • Reduce PropertyGrid development pain by using LINQ Dynamic Expressions

    As I mentioned in my last post I've been working with Microsoft Blueprints, one of the problems I encountered was trying to come up with a generic, reusable way of working with T4 Templates (T4 is the used by Blueprints for all code generation as T4  is now integrated into Visual Studio 2008) to generate the code fragments.

    I created a T4TemplateBuilder object that exposes a fluent interface to take the pain out of manipulating T4 Templates:

    T4Template template = T4TemplateBuilder
                            .Initialise(context)
                                .SetTemplateFileName("MyT4Template.tt")
                                .SetTargetFileName(@"C:\Temp", "MyFolder\MyGeneratedFile.cs")
                                .SetProperty("MyProperty", "MyValue")
                                .Transform()
                                .SaveToFile()
                            .Finish();

    The T4TemplateBuilder parses (using a simple RegExp) any T4 template to dynamically retrieve a list of properties that need to be passed in. I wanted to provide a simple GUI to allow the user to enter values for the T4 Template properties as part of the Blueprint “unfolding” process. Rather than re-inventing the wheel I decided to try and use the PropertyGrid Control.

    The data structure used to hold the T4 Template data within the Blueprints Framework is a generic Dictionary: Dictionary<string, Pair<string, Type>>() and unfortunately if you bind this to the PropertyGrid Control, you get the following:

    clip_image002[4]

    After doing a bit of research it became quite apparent that although incredibly adaptable, the PropertyGrid control is an absolute pain to work with as you have to create lots of glue code (TypeConverters) to make your objects display correctly.

    I started wondering if there was a way to create some dynamic anonymous types using LINQ (after a conversation with Rob Blackwell of AWS on how he implemented LSharp with LINQ Expression Trees). After reading a few articles about Code Generation with LINQ and while waiting for the nose bleed to stop, I stumbled across this article from the mighty ScottGu which talks about Dynamic LINQ. After downloading the sample I realised that I had found the solution to my problem – the Dynamic LINQ Library. This allows you to create dynamic properties and attach them to dynamic classes (which are essentially anonymous types) and then instantiate them.

    The dictionary contains entries for the following values:  InstallerType, WixProductId, WiXProductName. In the code below we iterate the dictionary and create DynamicProperties based on the values in the dictionary, attach them to a dynamic class and then instantiate it.

    var dynamicProperties = new List<DynamicProperty>();

    // Iterate our dictionary and create dynamic properties that match our values.
    foreach (KeyValuePair<string, Pair<string, Type>> pair in this.templateProperties)
    {
        // i.e. we are creating a new Dynamic Property called "InstallerType"
        // which is of type string.
        dynamicProperties.Add(new DynamicProperty(pair.Key, pair.Value.Second));
    }

    // Create a dynamic, anonymous type which contains those properties
    this.dynamicType = DynamicExpression.CreateClass(dynamicProperties);

    // Create an instance of the anonymous type. W00t!
    this.dynamicObject = Activator.CreateInstance(this.dynamicType);

    This new dynamicObject can now be attached to the PropertyGrid to give the desired experience:

    Fill in the values:

    Next we have to pull the values back out of the dynamicObject and put them back into the Dictionary so that it can be passed into the T4 Transformation Engine:

    var updatedTemplateProperties = new Dictionary<string, Pair<string, Type>>();

    foreach (KeyValuePair<string, Pair<string, Type>> pair in this.templateProperties)
    {
        string value = (string)this.dynamicType.GetProperty(pair.Key).GetValue(this.propertyGrid.SelectedObject, null);

        updatedTemplateProperties.Add(pair.Key, new Pair<string, Type>(value, pair.Value.Second));
    }

    this.templateProperties = updatedTemplateProperties;

    Then we can display the dictionary object to prove we have the updated values:

    clip_image002[10]

    I've uploaded a sample application to my CodePlex project.

  • Announcing Microsoft.Blueprints.Contrib on CodePlex

    I've been working with Microsoft Blueprints for the last couple of weeks, to see if it's a suitable deployment vector for some of our reusable IP and Engineering Practices. Blueprints is part of the Software Factories vision, it evolves and includes the great work already done with the Guidance Automation Toolkit, the DSL Tools and Visual Studio Extensibility and creates a more cohesive vision that is easier to develop and deploy. Below is a great diagram that shows the Blueprints lineage and it's future direction:

    Although still a little rough around the edges (it's still only CTP) it's value is clear. I won't go into great details about what Blueprints are as there are already a great number of blog posts on the subject that not only show the interesting things people are doing with the framework, but also the customisations and tricks they are learning as they are using Blueprints to solve their own problems.

    I've taken the learnings from the last couple of weeks and distilled them into a new CodePlex project: Microsoft.Blueprints.Contrib. At the moment the project contains three areas of help for developing Blueprints:

    • Dialogs - some common dialogs for selecting projects, selecting files and editing T4 Template Properties
    • Environment - helper class to enable you to easily manipulate the current Visual Studio Solution / Projects
    • T4 - some nice helper files which create a facade over the T4 Templating engine and give you a simple, discoverable fluent interface for implementation which leads to cleaner code.

    Hopefully as Blueprints pick up some momentum more people will contribute to the CodePlex project; if you're interested in contributing to the project, please contact me or send me a tweet: @HowardvRooijen.

  • StyleCop for ReSharper is Feature Complete. RC (refresh) Released.

    [Start update 26.02.2009]

    I've pushed up another release (0.0.14301.000) that contains fixes for all RC Refresh (0.0.14293.004) reported bugs:

    Fixes:

    • Fixed: reported RC bugs
    • Fixed: add customer repro around inserting documentation (SA1503)
    • Fixed: adding option for 1500. Fixing bracket on same line issue for split line object initializers
    • Fixed: adding QF for 1001 - thats checks for the dodgy extra space rule in [2,2] declarations
    • Fixed: adding the NDoc element names for layout of xmldoc comments.
    • Fixed: bug where Multiple declaration types were not being swapped correctly unless they had an initial value.
    • Fixed: change highlights to not highlight the whitespace at the beginning of a line.
    • Fixed: closing curly bracket new line action properly. Sorted for object initializers now too.
    • Fixed: compare using aliases with an OrdinalIgnoreCase StringComparison.
    • Fixed: for blank lines after single line comments and C Style comment blocks
    • Fixed: for QF 1611 if inside a param dec when opening the QF.
    • Fixed: new Utils code to support the fix for this. Constants (and maybe others) dont return an IDeclaration for their containing element.
    • Fixed: null ref exception.
    • Fixed: remove call to CSharpCodeFormatterImpl().Format in case the defaults aren't correct.
    • Fixed: remove extra parans from around Lamdba Expressions if not required.
    • Fixed: replace the functions that figured out a TextRange for a linenumber using the StyleCop model to use the R# model which is much simpler.
    • Fixed: update spacing rule after a comma. So unless its a > ] ) or comma it should be a space. 

    [End update 26.02.2009]

    StyleCop for ReSharper is now feature complete in that is has reached feature parity with StyleCop 4.3.

    There are 148 StyleCop (4.3) rules.

    • 38 of these must be fixed manually (normally because you have to type descriptive text or rename variables).
    • Of the remaining 110 rules 58 are fixed by R# Code Cleanup (silent mode).
    • Of the 52 now remaining we have Code Cleanup rules that fix all of them.

    We also provide 106 Quick Fixes that provide in place context menu fixes for violations for the 110 rules that can be fixed automatically. Download the latest release from the Codeplex site.

    This will be the final release before v1.0 at which point we will branch the code and focus on supporting ReSharper 4.5

    Quick Fixes:

    SA1100: DoNotPrefixCallsWithBaseUnlessLocalImplementationExists
    SA1108: BlockStatementsMustNotContainEmbeddedComments
    SA1109: BlockStatementsMustNotContainEmbeddedRegions
    SA1119: StatementMustNotUseUnnecessaryParenthesis
    SA1609: PropertyDocumentationMustHaveValue
    SA1636: FileHeaderMustContainFileName
    SA1641: FileHeaderCompanyNameTextMustMatch

    Code Clean Up Modules:

    SA1100: DoNotPrefixCallsWithBaseUnlessLocalImplementationExists
    SA1108: BlockStatementsMustNotContainEmbeddedComments
    SA1109: BlockStatementsMustNotContainEmbeddedRegions
    SA1119: StatementMustNotUseUnnecessaryParenthesis
    SA1023: DereferenceAndAccessOfSymbolsMustBeSpacedCorrectly
    SA1609: PropertyDocumentationMustHaveValue

    Fixes:

    Fixed: Special case for <para> elements. If it contains -or- then it doesn't force InnerXml onto a new line.
    Fixed: Updated to 'VersionNumberIncrement.target' to resolve build issue where it doesn't have the latest version config file.
    Fixed: Add a missing default of MaintainabilityOptions.
    Fixed: Ensure that our performance setting defaults to 9 on a new installation. Renamed many of our xml config entries to ensure they are setup correctly.
    Fixed: Dont swap "" for string.Empty if its inside an Attribute or a case statement label. Do swap it if its @""
    Fixed: Removing redundant methods.
    Fixed: If static constructor has default text for an instance constructor then replace it completely. Update tests.
    Fixed: Read StyleCop settings for whether rules are enabled and only clean up code if they are.
    Fixed: All method invocations were being swapped to this.
    Fixed: Inserted doc comments weren't being formatted being being inserted so you had to do CTRL E,F again
    Fixed: Fixing the parameter documentation on constructors for code cleanup.
    Fixed: Updated to 'VersionNumberIncrement.target' to resolve build issue where it doesn't have the latest version config file.
    Fixed: Update Documentation

  • StyleCop for ReSharper Release Candidate

    Update: StyleCop for ReSharper is now feature complete.

    We're almost at the finish line - we’ve added 19 new fixes (both Quick-Fixes and Code Clean Up Modules in addition to the 92 already implemented) and fixed a whole slew of reported issues. Please try this version of the plug-in and tell us about any issues you find, or any new features you would like. As always we're more than happy to accept patches from the community; for this release many thanks go to digitaldrummerj for their patch. Pretty much all the work done this release was by Andy Reeves - so big thanks again to his powerhouse effort!

    If you would like to see all the Quick-Fixes and Code Clean-Up Modules see the Overview of Currently Supported Fixes page.

    The new release is available on the StyleCop for ReSharper CodePlex site.

    This will be the final release before v1.0 at which point we will branch the code and focus on supporting ReSharper 4.5

    Quick Fixes:

    SA1102: QueryClauseMustFollowPreviousClause
    SA1103: QueryClausesMustBeOnSeparateLinesOrAllOnOneLine
    SA1104: QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines
    SA1105: QueryClausesSpanningMultipleLinesMustBeginOnOwnLine
    SA1106: CodeMustNotContainEmptyStatements
    SA1110: OpeningParenthesisMustBeOnDeclarationLine
    SA1111: ClosingParenthesisMustBeOnLineOfOpeningParenthesis
    SA1112: ClosingParenthesisMustBeOnLineOfOpeningParenthesis
    SA1113: CommaMustBeOnSameLineAsPreviousParameter
    SA1114: ParameterListMustFollowDeclaration
    SA1115: ParameterMustFollowComma
    SA1116: SplitParametersMustStartOnLineAfterDeclaration
    SA1117: ParametersMustBeOnSameLineOrSeparateLines
    SA1118: ParameterMustNotSpanMultipleLines
    SA1120: CommentsMustContainText

    Code Cleanup Modules:

    SA1106: CodeMustNotContainEmptyStatements
    SA1120: CommentsMustContainText
    SA1121: UseBuiltInTypeAlias
    SA1122: UseStringEmptyForEmptyStrings

    Fixes:

    Fixed: Should fix plugin version number issue
    Fixed: Non-compiling tests.
    Fixed: UpdateFileHeader default is now to replace the copyright element. This leaves the summary alone. CDATA sections in doc comments handled correctly. //// handled correctly.
    Fixed: Bug where preprocessor directive was removing the wrong space. Updating some tests.
    Fixed: Trim the created doc xml to remove whitespace at the end of an empty xml fragment.
    Fixed: Change Build to Configuration Manager to prevent Test project from being built in "Release Mode"
    Fixed: Improve our auto documentation to put descriptions of the parameters in. 
    Fixed: Ensure our Code Cleanup modules run after ReSharpers.
    Fixed: Don't insert new lines at the beginning of code blocks.
    Fixed: Code the Csharp code reformatter after we insert lines as we now run after the Std reformatter.
    Fixed: Remove new lines that ReSharper inserted before [assembly] entries.
    Fixed: Don't insert '.' inside <c> elements.
    Fixed: Don't capitalise text inside <c> or <code> elements.
    Fixed: Don't replace inheritdoc comments with empty comments.
    Fixed: Don't replace a comment that has no summary but some other text in it with an empty comment.
    Fixed: Removing the commonassemblyinfo.cs from the TestProject as we don't ship it.
    Fixed: Remove empty old folder.

    Updates:

    Update: Documentation.
    Update: Test data.
    Update: Member access order in Settings File.
    Update: Completed rules.
    Update: Tracking of work completed.
    Update: Remove tests that we've replaced with new ones.

  • Windows Azure – Hazy Terminology

    As I mentioned in my previous post, I spent 3 days last week on a Windows Azure Training Course, unfortunately this meant that I missed out on all the fun that was had on #comday.

    One of the most common questions I heard at PDC 08 after Windows Azure was unveiled was around the overlap of functionality between Windows Azure Storage and SQL Data Services (SDS) – why are Microsoft offering two different data base solutions in the cloud, that have so many overlapping features? Which one should I use? What are the benefits of the two different systems? I know I was asking these questions – especially as I was quite familiar with SDS – thanks to our very own Jamie Thomson.

    I couldn’t really give these questions too much thought at the time as one of the main problems of PDC is the shear volume of information that’s thrown at you (well, it’s also the reason you attend). This course gave me the breathing room to really start thinking about ramifications of what was presented at PDC.

    The reason there is a lack of clarity of the differences between the two systems is simply the use of language to describe the Azure Storage Platform; Microsoft have tried to use terminology that existing developers will understand in order to reduce the fear of the complexities of dealing with Cloud-scale architecture and development.

    The Azure Storage Platform is simply and elegantly designed to allow new massively scalable Web Applications and Web Services to be produced. SQL Data Services allows your to run more traditional relational databases (that are essentially not cloud scalable, due to the intrinsic relational behaviour) and in the future more standard SQL Server features such as Reporting, BI etc will be available. SDS will allow companies to migrate existing applications on to this platform (although it is very unlikely this would be a trivial migration).

    Hopefully this distinction is quite apparent, but the terminology of the Azure Storage Platform still muddies the water. Microsoft are using familiar terms in order to keep developers in their comfort zones, but unfortunately this is doing the underlying platform a disservice as it does not correctly convey, the scope, grandeur or reason for it’s overall Architecture.

    The Azure Storage Platform consists of 3 services – Tables, Blobs and Queues. These are familiar enough concepts for most developers. The problems arise when these services are compared either to the services in SDS or more importantly, when they are compared to the artefacts that most developers know.

    Azure Tables are not tables as we know them. Blobs are not blobs as we understand them and Queues, well they are not strictly Queues at all. I’ve always been slightly obsessive about the use of language to accurately describe concepts in code – I constantly have Wittgenstein’s quote “The limits of my language means the limits of my world” going through my head and most people know to steer well clear of mentioning the C# keyword var near me (it should be named infer btw).

    If these artefacts were renamed as follows, it might make the Azure Storage Platform picture a little less hazy and reduce collisions with SDS:

    Tables = Entity Repository
    Blobs = Binary Entity Repository
    Queues = Dispatcher

  • LSharp in the Cloud

    Last week I attended a Windows Azure Services Platform Training Workshop, held by QA in London. Our trainer, the excellent Mr Adrian Jakeman, took myself and 12 other Microsoft Partners on a journey through the Azure Service Platform and its constituent parts:

    Windows Azure Platform

    I was fortunate enough to be sat next to Rob Blackwell, from AWS for the duration of the course. I met Rob a few years ago when AWS had just launched the amazing Mob Guardian system for the RNLI, (during the event Rob told me that AWS have recently been working on updating the system to run on Windows Azure) then in 2007, Conchango and AWS collaborated on the Contoso Bicycle Club Windows Live Quick App.

    During the course Rob and I talked about running Open Source projects - I talked about StyleCop for ReSharper and he told me about his pet project - LSharp.NET - a LISP implementation for the CLR. I've always been intrigued by LISP, even thought I started studying Intelligent Systems (Computer Science, Cybernetics and Psychology) at university, the course never actually covered LISP. I was quite blown away when Rob told me that he implemented the language using LINQ Expression trees to take the LISP syntax and compile it into IL. I mentioned something about web based interactive Ruby consoles and about an hour later Rob had knocked up a Windows Azure solution equivalent for LSharp.

    I asked Rob if he'd be interested in recording a video interview about LSharp and how he put it into the Cloud using Windows Azure. Below is the result (thanks for Adrian Jakeman for acting as Quiz Master):

     

    See Rob's blog for more info on LSharp and hosting it in Azure.

    If you would like to try out Rob's app - it's available at http://lsharp.cloudapp.net/

  • Implementation Patterns of User-Centered Design, Development and Agile

    Last Friday Malcolm Beaton started a thread on our internal User Experience and Agile Community mailing lists - on how User-Centered Design and Agile can work together and any friction that may occur. Simon Bennett, one of our Agile Coaches, made a point that resonated - any problem may be "related to *how* we’re doing UX and/or Agile, and not inherent in either Agile or UX itself".

    I started thinking about all the Agile projects I've worked on in the last 5 years - from short innovation-centric projects to full blown year long e-commerce projects and I managed to distill them into 4 different patterns:

    Balanced Delivery

    The Designer, UX and Developer work hand in hand; all strategy, features and decisions are discussed and decided as a whole. If there were technical issues, workarounds and compromises will be made. All team members pushed each other to do the best they can. In short, a beautiful working relationship that is geared towards creating something rather special. I've experienced this pattern on small to medium sized innovative projects where the end goal is known, but the journey to get there is unknown and the client is fully engaged and supportive. I've experienced this pattern twice and those projects are still a personal career highlight.

    Unbalanced Delivery

    image

    Due to delivery commitments / being late to the engagement, the Developer is not so involved in the Design / UX process which slants the strategy, features and decisions, causes drift and less room for workarounds and compromises as issues are not generally found until implementation occurs.

    Creative Led Delivery

    image

    Being late to the engagement, either by commitment or project set-up, the Developer arrives too late to input on strategy, features, decisions on what’s possible and achievable. From a team gelling perspective - the Developer can feel slightly left out because all the fun work has already happened and feels like they are just an agent of implementation rather than delivery.

    Buffered Creative Led Delivery

     image

    Designers & UX have to run an iteration ahead of the development in order to keep the queue of work full. There may be Developer input into the process, but unless iteration capacity is adjusted to allow for collaboration, Developer input may be limited or insufficient, this is not ideal; decisions may be made in isolation as Development team are too busy developing to feedback into the Design / UX process. This pattern keeps the team running optimally, but may lead to long term problems.

    Matt Roadnight pointed out that the following diagrams are missing "the customer" - so I'll leave it to you to add them (they should be central to each pattern).

This Blog

Syndication

Powered by Community Server (Personal Edition), by Telligent Systems