Peter Vogel continues his exploration of WCF 4.5's support for WebSockets by writing the code to accept data from the client and then return data to the client whenever that data becomes available.
Peter introduces WCF 4.5's support for WebSockets first by describing why you care and then by setting up to build a bi-directional service using Windows Server 8, and Visual Studio 11.
While Windows Communication Foundation 4.5 has lots of little improvements, the ASP.NET Web API is a very big change. You'll probably end up taking advantage of both, so here's what's in the pipeline for you.
By having your Data Annotations implement the IClientValidatable interface, you can make it easy for developers to integrate your client-side validation into your Views.
Validation should begin as close to your database as possible: in your Entity Framework entities. Here's how you can integrate validation code into both the entities the Entity Framework generates and the ones you write.
While you can create classes that contain their own validation code, there are scenarios where it makes sense to separate validation code from the properties it validates using DataAnnotations.
WPF provides the richest environment for developers to incorporate standalone validation classes into their user interfaces—and for business object developers to support an application's user interface.
Implementing one of three interfaces can turn your business classes into self-validating components that seamlessly integrate into WPF, Silverlight and ASP.NET MVC applications -- and can be easily extended to other environments.
WPF makes it very easy to load non-executable resources at run time -- including a complete UI in XAML. Here's how to leverage that functionality to create applications that you can customize without recompiling.
You can use your Master Pages just to structure your pages. Or you can integrate them into your application with custom code that your content pages can access.
Web Parts and User Controls let you easily build customizable UIs with the same tools you use to create inflexible user interfaces -- and implement an MVC-like pattern in ASP.NET.
With a little bit of code (along with a .NET interface and collection), you can integrate the properties on your classes with the .NET user interface controls to simplify your presentation layer.
In WPF and Silverlight,you can separate your UI logic into a set of Command classes that facilitate loose coupling, testable designs, and reusability.
Use Test-Driven Development, generate from usage and a free Visual Studio add-in to let you spend more time doing what programmers want to do: writing code that works.