Archive for category Uncategorized

Microsoft Surface development goes public

At PDC this year Microsoft announced that Surface development resources were going to be made publicly available. (Up until now it had been an “invitation only” system).

This is great news and means anyone can build or prototype Surface applications. The Surface SDK comes with a very good simulator. A table is still needed to evaluate performance and usability, but you can go a long way with just the simulator.

Microsoft Surface Simulator

Here is a copy & paste from a recent mail-out:

  • Surface Web site (http://www.surface.com)
  • MSDN (http://msdn.microsoft.com)
  • TechNet (http://technet.microsoft.com)
  • Microsoft Download center (http://www.microsoft.com/downloads)
    • A new product category for all Surface downloads, including the Surface SDK Workstation Edition, applications, documentation, and any software fixes.
  • Microsoft Support (http://support.microsoft.com)
  • WCF Data Services vs WCF RIA Services

    I’ve been having trouble finding a straight forward comparison of these two technologies. On the surface they appear to be solving similar, if not the same problems.

    Make no mistake – the message coming from Microsoft is not clear or consistent – which probably explains the confusion. I suspect the relationship between these two products is still being “discovered” by MS.

    Anyway, in this bliki I will try to sum up my findings as to the differences between them as I figure them out.

    WCF (ADO.NET) Data Services

    WCF (.NET) RIA Services

    Expose data model as RESTful web service Prescriptive approach to n-tier app development
    Cross platform interoperation as a goal
    - “Unlock data silos”
    - Out-of-box support from future MS products such as SQL2008 R2, Azure, Excel 2010, SharePoint 2010
    Designed specifically for end-to-end Silverlight & ASP.NET solutions
    - Some technology proprietary to Silverlight (no WPF support)
    - Use ASP.NET Authentication/Roles across SL and ASP.NET
    - ASP.NET/AJAX can also access service layer
    Loosely coupled clients and servers Client & server are designed and deployed together
    Service layer exposes “raw” data sources Opportunity to easily add business logic into service layer
    - Encourage “domain” concepts
    - Strong validation framework
    - Offline / Sync enabled
    Service can be consumed from .NET, Silverlight, AJAX, PHP and Java (libraries available) Service can be consumed easily from SL, AJAX, WebForms
    Service’s data source must:
    - Expose at least one IQueryable property
    - Implement IUpdateable if you desire updates
    Service exposes domain objects via convention:
    - IQueryable GetX
    - UpdateX/InsertX/DeleteX
    No design time experience yet (??) Design time experience with data sources, drag drop etc
    - OData for all clients
    - Within OData, multiple formats supported (JSON, XML etc)
    - SOAP (binary) for SL clients
    - JSON for AJAX clients
    - SOAP (XML) for other clients
    Discoverable (?) Non-discoverable
    Hosted as WCF Service (.svc) Old version hosted in custom web handler (.axd).
    New version is WCF service.
    Standardized on OData protocol Will “support” OData
    More mature – public for at least 2 years, formerly “Project Astoria” Less mature – public for 6 months

    Common features

    • Based on WCF
    • Use a RESTful architecture
    • Can be used to expose any data source (sql, xml, poco/objects etc.)
    • Client side libraries provide ability to query using LINQ

    General

    • Currently they do not share much (any?) technology / code
    • RIA Services is not based on top of Data Services
    • RIA Services & Data Services will “align”
    • OData eventually pushed down into WCF stack

    Your opinions are welcome!

    References

    http://blogs.msdn.com/brada/archive/2009/03/19/what-is-net-ria-services.aspx

    http://mschannel9.vo.msecnd.net/o9/mix/09/pptx/t36f.pptx

    http://blogs.msdn.com/endpoint/archive/2009/11/18/the-wcf-services-ecosystem.aspx

    http://www.douglaspurdy.com/2009/11/20/on-odata-open-data-protocol/

    http://msdn.microsoft.com/en-us/data/ee844254.aspx

    http://blogs.msdn.com/saurabh/archive/2009/11/23/understanding-the-wcf-in-wcf-ria-services.aspx

    Expression Blend 3 Help: The missing DelegateCommand class

    Some tutorials from the Expression Blend 3 help docs (e.g. “Try it: Display data from a sample SQL database”, which is based on these two articles) require a class that is present in the ColorSwatch WPF sample. The problem is that someone appears to have forgotten to bundle the ColorSwatch sample with the Blend 3!

    To save you the hassle of trying to track down the DelegateCommand class here it is:

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Windows.Input; 
    
    namespace ColorSwatch
    {
        public sealed class DelegateCommand : ICommand
        {
            public delegate void SimpleEventHandler(); 
    
            private SimpleEventHandler handler; 
    
            private bool isEnabled = true; 
    
            public DelegateCommand(SimpleEventHandler handler)
            {
                this.handler = handler;
            } 
    
            #region ICommand implementation 
    
            void ICommand.Execute(object arg)
            {
                this.handler();
            } 
    
            bool ICommand.CanExecute(object arg)
            {
                return this.IsEnabled;
            } 
    
            public event EventHandler CanExecuteChanged; 
    
            #endregion 
    
            public bool IsEnabled
            {
                get { return this.isEnabled; }
                set
                {
                    this.isEnabled = value;
                    this.OnCanExecuteChanged();
                }
            } 
    
            private void OnCanExecuteChanged()
            {
                if (this.CanExecuteChanged != null)
                {
                    this.CanExecuteChanged(this, EventArgs.Empty);
                }
            }
        }
    } 

    The Promise of Windows 7 Device Stage … Realized!

    This is what I was greeted with today when I plugged my Patriot Xplorer XT USB stick into my Windows 7 HTPC:

    They must have different design guidelines for Device Stage in Asia...

    Nursing Diagnosis is NOT Software Engineering: Amazon’s crazy book categorization

    I’ve actually noticed this for a few years, but there is something crazy going on with how Amazon.com categorizes its Computer Science/Software books.

    One of my favourite ways to find new books is to use the “wisdom of the crowds” and browse through Amazon’s bestseller lists. If I find a book I like I always check the bestsellers in it’s categories in the hope that I can find some other gems.

    The problem is I always end up getting frustrated because there is so much garbage in the lists: I would say at least 40% of the books are miscategorized.

    Is this some sort of ruse by publishers to get their books featured in more places? If so its bloody annoying and doesn’t do anyone any favours.

    Let me show you the bestsellers for the Software Engineering category:

    Software Engineering Bestsellers List on Amazon.com

    How can we fix it?

    Instead of just whining about it I spent 30 minutes going through the top 20 and using the feedback form to contact Amazon about the problem. As you can imagine this got boring quickly.

    Then I figured the easier way might be just to go through and tag all the books as miscategorized (spelt with a ‘z’ to make it easier for our American friends) and not software engineering.

    One very handy tip is that you can tag Amazon books quickly just by pressing typing ‘TT’ on your keyboard. It bring up this window so you can instantly tag a product:

    Fast Tagging on Amazon.com

    The end result is something that looks like this:

    Miscategoized  Tags on Amazon.com

    If enough people (i.e. YOU dear reader) tag these products, it should be pretty straight forward just to email amazon and say:

    Oi! Amazon!

    Please find all your books tagged as miscategorized and fix them. In particular please remove all the books tagged not software engineering from the Software Engineering category.

    Thanks!

    So here’s the call to action: Visit the bestsellers for the Software Engineering category and tag at least the top ten books!