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...

    Crash when trying to open VS2010 Beta 2 Help: MSHelpListener.exe has stopped working

    Update: There is a Microsoft Connect bug logged for this here.
    Update 2: “R0b0tz” has got the workaround for this on his blog. As always it pays to RTFM :) It’s still definitely a bug though…

    One big change in Visual Studio 2010 is Microsoft Help version 3. It’s all based on HTML, and when you install the help locally it does a smart trick and installs its own web server (MSHelpListener.exe), allowing the pages to be accessed via the url http://127.0.0.1:80/help.

    The problem was the first time I ran the help after installing VS2010 I was getting the following crash…

    MSHelpListener.exe has stopped working dialog

    If you check the Windows Application event logs you will see the following error:

    The port is already in use please select a different port

    For some reason, MSHelpListener is unable to bind to port 80 (even though I believe HTTP.sys does allow multiple applications to bind to the same port).

    If you go to the command line and run

    netsh http show urlacl

    You can see that it has also reserved the following url, although it appears this does not help at all in guaranteeing access to the port…

    netsh showing urlacl reservation for MS Help 3

    I had a quick look in Resource Monitor and this is what I saw:

    Resource Monitor showing Skype listening on port 80

    You can see Skype was listening on port 80.

    It turns out the solution was as simple as quitting Skype!

    After I quit Skype I was able to load up the help…

    HelpListener.exe successfully running

    Once HelpListener.exe is running it is safe to start Skype up again. I have yet to work out why Skype is using port 80, or what circumstances cause one process to block another’s use of a port, given the fact HTTP.sys is supposed to let multiple process share the same port. If you know please leave a comment.

    If you find yourself having problems getting the local help working after installing it using “Find content on disk”, the trick that worked for me is to switch to online help and then back to local help.

    Help Library Manager screen in VS2010 Beta 2

    MS Help 3 Find Content Online

    Overall, MS Help v3 looks very nice and works as we probably wished it always had! What is very cool is you can “Find” content either online, or from your installation media. Best of all it just works – getting content from the web is straight forward, and so is installing it from media. Either way the help files can be kept up-to-date easily using “Check for updates online”. Nice

    Tags: