OData client libraries for .NET 4, Silverlight 4 and Windows Phone 7
http://odata.codeplex.com/releases/view/54698
ODataNetFx4_SL4_WinPhone7_Client.zip – contains a Visual Studio 2010 solution with the source code for the OData .NET 4, Silverlight 4 and Windows Phone 7 Client library. To use, unzip the file locally and open the solution in Visual Studio 2010.
ODataClient_BinariesAndCodeGenToolForWinPhone.zip – contains just the OData client assemblies and code generation tools for use on Windows Phone 7.
ODataClient_WinPhone7SampleApp.zip – contains a sample Windows Phone 7 application which uses the OData client library for Windows Phone 7
Parallel Framework in Action
![]()
![]()
The #1 reason, IMHO, to look at .NET 4 is the parallelism. I say this not as a Microsoft Shill, but rather as a dude who owns a 6-core (12 with hyper-threading) processor. My most favorite app in the Training Kit is ContosoAutomotive. It’s a little WPF app that loads a few hundred thousand cars into a grid. There’s an interface, ICarQuery, that a bunch of plugins implement, and the app foreach’s over the CarQueries.
This snippet here uses the new System.Threading.Task stuff and makes a background task. That’s all one line there, from StartNew() all the way to the bottom. It says, "do this chunk in the background." and it’s a wonderfully natural and fluent interface. It also keeps your UI thread painting so your app doesn’t freeze up with that "curtain of not responding" that one sees all the time.
This code says "go do this in a background thread, and while you’re there, parallelize this as you like." This loop is "embarrassingly parallel." It’s a big for loop over 2 million cars in memory.
Asynchronous Cancellation Patterns with .NET 4
For calling methods asynchronously, since .NET 1.0 the async pattern can be used. .NET 2.0 added the event-based async pattern (also known as async component pattern) that makes async calls easier with Windows applications. Before .NET 4 no standard mechanism has been available to cancel asynchronous method calls. That’s new with .NET 4.0.
In this blog series you can read about these async patterns as well as the new unified model for cancellation.
Part 1 of this series introduced the async patterns and introduced cancellation with the BackgroundWorker class as it existed since .NET 2. In part 2 of this series Christian will show how the new .NET 4 cancellation framework can be used.
Previously to .NET 4, cancellation with async method calls was implemented in different ways if it was supported at all. For example, the BackgroundWorker implements cooperative cancellation by invoking the CancelAsync method, the long-running method needs to verify if it should be canceled by checking the CancellationPending property and needs to cancel by setting the Cancel property of the DoWorkEventArgs. More about this in the previous blog entry.
.NET 4 now supports cooperative cancellation of async methods in a standard way. The heart of this new framework is the CancellationToken struct. The CancellationToken is created by a CancellationTokenSource. This token can then be passed to any activity that should be cancelled. In case of a cancellation, the async call can verify cancellation by checking the IsCancellationRequested property of the CancellationToken. This unified model is now available with several classes offering asynchronous requests.
Natural User Interface library
Blake.NUI is a new open-source library for multi-touch NUI (Natural User Interface) development. It can be found at blakenui.codeplex.com and is under a MS-PL license.
The library is still in undergoing changes but here are some of the things currently included in Blake.NUI:
- Controls
- ZoomCanvas – an infinite canvas control that is the heart of NaturalShow
- CircleText – layout text along the circumference of a circle
- Gestures
- TapGestureTrigger – a configurable Blend Trigger that fires when the user completes a tap gesture
- DoubleTapGestureTrigger – a configurable Blend Trigger that fires when the user completes a double tap gesture
- TouchDevices
- MouseTouchDevice – promotes mouse input to WPF 4 touch events
- SurfaceTouchDevice – promotes Microsoft Surface vision system input to WPF 4 touch events
- Common classes and utilities
- DisplayMatrix
- AnimateUtility and SurfaceAnimateUtility
- ScatterMatrixHelper
- MathUtility
- VisualUtility
- NaturalShow
- Common models, views, factories, and other classes
Using MEF, MVVM and WCF RIA Services in Silverlight 4
A sample Silverlight business application using MEF, MVVM Light, and WCF RIA Services.
Patterns for Parallel Programming with the .NET Framework
This document provides a detailed and in-depth tour of support in the Microsoft® .NET Framework 4 for parallel programming. This includes an examination of common parallel patterns and how they’re implemented without and with this new support in the .NET Framework, as well as covering best practices for developing parallel components utilizing parallel patterns.
This document was written by Stephen Toub from the Parallel Computing Platform team at Microsoft. It is based on the .NET Framework 4 and Visual Studio 2010. Two versions of the document are available, one with code samples in C# and one with code samples in Visual Basic.
Via Download details: Patterns for Parallel Programming with the .NET Framework
MEF Programming Guide with Silverlight-specific functionality
MEF Programming Guide
- Hosting MEF in an application
- Defining Parts and Contracts
- Declaring Exports
- Declaring Imports
- Lazy Imports
- Exports and Metadata
- Using Catalogs
- Filtered Catalogs
- Part Lifetime
- Recomposition
- Querying the Composition Container
- Composition Batch
- Debugging and Diagnostics
- FAQ
Silverlight-specific functionality
Learning MEF in Silverlight 4 and .NET 4
MEF has shipped with Silverlight 4 and with .NET Framework 4.0 and there are versions on CodePlex targeting Silverlight 3 and .NET Framework V3.5 Sp1.
If you’re looking to get started with MEF then here’s some quick resources;
- Glenn Block’s new MSDN Magazine Overview Article and Glenn’s Blog
- The Overview on CodePlex
- The Programming Guide on CodePlex
- Mike Taulty’s Channel 9 Videos
but if you’re already up and running then want to know what’s new in the latest drop for the Silverlight developer?
- Updated samples!
- Renaming and changes to PartInitializer
- Renaming and moving of PartCreator
- Renaming and changes to CompositionHost.InitializeContainer
- A new DeploymentCatalog class, suport dynamically asyn load XAP files on demand!!!
For more check this out: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2010/02/17/new-mef-drop-preview-9-on-codeplex.aspx
60+ .NET libraries every developer should know about.
- Yedda Twitter Library
- FileHelpers Library
- Elmah
- Log4Net
- Enterprise DT FTP Library
- HtmlAgilityPack
- OpenAuth Library
- Microsoft AntiXSS library
- C5 Collections – Collections for .NET
Dependency Injection/Inversion of Control
- Unity Framework – Microsoft
- StructureMap – Jeremy Miller
- Castle Windsor
- NInject
- Spring Framework
- Autofac
- Managed Extensibility Framework
Logging
- Logging Application Block – Microsoft
- NLog
Compression
- SharpZipLib
- DotNetZip
- YUI Compressor (CSS and JS compression/minification)
Ajax
- Ajax Control Toolkit – Microsoft
- AJAXNet Pro
Data Mapper
ORM
Charting/Graphics
- Microsoft Chart Controls for ASP.NET 3.5 SP1
- Microsoft Chart Controls for Winforms
- ZedGraph Charting
- NPlot – Charting for ASP.NET and WinForms
PDF Creators/Generators
Unit Testing/Mocking
Automated Web Testing
URL Rewriting
- url rewriter
- UrlRewriting.Net
- Url Rewriter and Reverse Proxy – Managed Fusion
Controls
- Krypton – Free winform controls
- Source Grid – A Grid control
- Devexpress – free controls
Unclassified
- CSLA Framework – Business Objects Framework
- AForge.net – AI, computer vision, genetic algorithms, machine learning
- Enterprise Library 4.1 – Logging, Exception Management, Validation, Policy Injection
- Quartz.NET – Enterprise Job Scheduler for .NET Platform
- MiscUtil – Utilities by Jon Skeet
- Lucene.net – Text indexing and searching
- Json.NET – Linq over JSON
- Flee – expression evaluator
- PostSharp – AOP
- IKVM – brings the extensive world of Java libraries to .NET.
- FlickrNET – Flickr library for .NET
- PowerCollections – Power Collections for .NET
- Facebook.net – Facebook API interface.

