Intent Driven Design of Web APIs & Web API Checklist

Great article describing “Intent-Driven Design” of web APIs.

http://mathieu.fenniak.net/stop-designing-fragile-web-apis/

Article also lists a link to a post for Web API Checklist.

Advertisements

Asynchronous Programming with Async and Await (links)

Found another good article covering this topic.

http://tech.pro/tutorial/1180/asynchronous-programming-in-c-using-async-and-await

This link covers many approaches for asynchronous programming.

http://www.codeproject.com/Articles/562021/Asynchronous-models-and-patterns

Understanding .NET Garbage Collection

http://blogs.telerik.com/justteam/posts/13-04-02/understanding-net-garbage-collection

Windows 8 Videos for Developers

Check out the following videos for Windows 8 development.

Introducing Windows 8: Snack-sized introductory videos – 30 videos and 2 hours of content

Build your first Windows Store app: Video versions of the step-by-step tutorials at dev.windows.com – 13 videos and 4.5 hours of content

Build a Windows Store Blog Reader app with C#: Video versions of the Blog Reader step-by-step tutorial atdev.windows.com – 9 videos with 2.5 hours of content

Windows Store app for Absolute Beginners with C#: Video versions of the Contoso Cookbook Hands-on labs, designed for Absolute Beginners – 30 videos with 7.5 hours of content

Migrating apps from Windows Phone to Windows 8: Step-by-step video tutorials of migrating a real-world app (Khan Academy) from Windows Phone to Windows 8 – 5 videos with 1.5 hours of content

 

Original post from:

http://blogs.msdn.com/b/jonbox/archive/2012/10/28/windows-8-videos-for-developers-from-ch9.aspx

Visual Studio Express 2012 Now Available for Desktop for Free

Visual Studio Express 2012 products provide free development tools for creating modern applications on the latest platforms.  Click here to download now.  Here’s more information I grabbed from the MSDN blog.

“It would be impossible to list every feature in Visual Studio Express 2012 for Windows Desktop. However, in this post I want to tell you about some of the new tools and capabilities in the product that have not been available in any other Express products in the past. I’d also like to answer some of the questions you’ve been asking about what we’re including in this edition. Unless otherwise mentioned, the features listed are supported for all languages that are included in Visual Studio Express 2012 for Windows Desktop – C++, C#, and Visual Basic.

Project Types

In Express for Windows Desktop, you’ll be able to create the same projects that you could in Visual Studio 2010 Express, for example, WinForms, WPF, Console and Class Libraries for Visual Basic and C#, and Win32 projects, class libraries, and CLR apps for C++. You can also combine C++, C#, and Visual Basic projects into a single solution, making it easy to write a single application using any of the available languages. Finally, you can round-trip your projects with Visual Studio 2010 SP1.

New Project dialog in Visual Studio Express 2012 for Windows Desktop

Unit Testing

We wanted to make it easy for you to write and run unit tests for your projects. To make that possible, Express for Windows Desktop includes our existing unit test framework for C# and Visual Basic and the new native C++ unit test framework. This lets you write, run and debug unit tests directly inside Visual Studio. Unit Test project templates are also included so you can start writing unit tests right away.

Unit Testing in Visual Studio Express 2012 for Windows Desktop

Code Analysis

We added a targeted set of code analysis rules to Express for Windows Desktop, which are the same code analysis rules that we added to Visual Studio Express 2012 for Windows 8. For C++ projects, these rules help detect common coding errors, such as buffer overflows, dereferencing null pointers, using uninitialized variables, or misusing APIs. These errors can potentially lead to security vulnerabilities or application crashes if the errors are not fixed. For managed projects we included rules that help ensure correct object disposal, comparison, and garbage collection performance.

Code Analysis in Visual Studio Express 2012 for Windows Desktop

TFS Integration

This release, we introduced Team Foundation Server Express 2012, as well as the Team Foundation Service atwww.tfspreview.com. We also included Team Explorer, which allows for integration with your TFS server into all of our Visual Studio 2012 Express products, including this one. We wanted to make it simple for you to use the source code control, work item tracking, and build automation that TFS provides.

Team Explorer in Visual Studio Express 2012 for Windows Desktop

Dependency Management with NuGet

Express for Windows Desktop includes NuGet, which makes it easier than ever to integrate libraries developed within your organization, or from 3rd parties, into your projects. To add or manage package dependencies for your projects, simply select the “Manage NuGet packages…” option from the project, or from the solution context menu in Solution Explorer.

NuGet in Visual Studio Express 2012 for Windows Desktop

Language specific features

The new VS 2012 language and library features are available in Visual Studio Express 2012 for Windows Desktop, including the async and await keywords in Visual Basic and C#, C++ AMP, and improvements to C++ 11 Standards conformance.

You can use Express for Windows Desktop with your Visual Basic and C# applications to target both .NET 4.0 and 4.5.

We also included the C++ 64-bit cross-compiler and libraries, so you can build 64-bit desktop applications without needing to install an older version of the Windows SDK.

Data Connections

In previous Express products, the ability to connect to a data source was limited to Database File. In Express for Windows Desktop, this capability has been extended to support all SQL Server data sources. For example, in Database Explorer, you can connect, navigate, query against and edit database objects through the latest SQL Server 2012 and Windows Azure SQL Databases.”

Check out the blog link below for more information.  And of course, there’s also free express editions for Web, Windows 8, & Team Foundation Server.

http://blogs.msdn.com/b/visualstudio/archive/2012/09/12/visual-studio-express-2012-for-windows-desktop-is-here.aspx

Over 80 Microsoft Ebooks for Free

 

Hit the link below to grab over 80 free Microsoft ebooks.

Large collection of Free Microsoft eBooks for you, including: SharePoint, Visual Studio, Windows Phone, Windows 8, Office 365, Office 2010, SQL Server 2012, Azure, and more.

and

Another large collection of Free Microsoft eBooks and Resource Kits for you, including: SharePoint 2013, Office 2013, Office 365, Duet 2.0, Azure, Cloud, Windows Phone, Lync, Dynamics CRM, and more.

Asynchronous Programming with Async and Await

Check out this article on MSDN for a new feature in VS 2012 which makes asynchronous programming easier.  Here’s a brief summary:

Summary

Visual Studio 2012 RC introduces an approach that relies on two keywords, the Async (Visual Basic) or async (C#) modifier and the Await (Visual Basic) or await (C#) operator. The async modifier indicates to the compiler that a method or lambda expression is asynchronous and that suspension points can be designated within it by using an await operator. Such a method is referred to as an async method.

Inside an async method, you apply an await operator to a particular task to suspend execution of the async method until the task is complete. In the meantime, control is returned to the caller of the async method while the task completes its work. The suspension is accomplished without actually exiting from the async method, and finally blocks don’t run.

The compiler does the difficult work that the developer used to do, including signing up continuations for the completion of the suspended method. As a result, asynchronous code is much easier to write, and your program retains a logical structure that is similar to synchronous code. In addition, routine processes that can be difficult in traditional asynchronous code, such as loops and exception handling, cease to be roadblocks to successful solutions. For more information about previous approaches to asynchrony in the .NET Framework, see TPL and Traditional .NET Asynchronous Programming.

The .NET 4.5 Framework contains many members that work with async and await. You can recognize these members by the “Async” suffix that’s attached to the member name and a return type of Task or Task<TResult>. For example, the System.IO.Stream class contains methods such as CopyToAsyncReadAsync, and WriteAsync alongside the synchronous methods CopyToRead, and Write.

Example

The following code example shows a method written twice. The first is a synchronous version and the second is an asynchronous version using the new keywords “async” and “await”.

// Synchronous version of a method that downloads the resource that a URL
// links to and returns its content.
private byte[] GetURLContents(string url)
{
    // The downloaded resource ends up in the variable named content.
    var content = new MemoryStream();

    // Initialize an HttpWebRequest for the current URL.
    var webReq = (HttpWebRequest)WebRequest.Create(url);

    // Send the request to the Internet resource and wait for
    // the response.
    using (var response = webReq.GetResponse())
    {
        // Get the data stream that is associated with the specified URL.
        using (Stream responseStream = response.GetResponseStream())
        {
            // Read the bytes in responseStream and copy them to content.
            responseStream.CopyTo(content);
        }
    }

    // Return the result as a byte array.
    return content.ToArray();
}

// Asynchronous version of the same method. The changed lines

are marked with **.

// **Change the method name and the return type. Add the async modifier.
private async Task<byte[]> GetURLContentsAsync(string url)
{
    // The downloaded resource ends up in the variable named content.
    var content = new MemoryStream();

    // Initialize an HttpWebRequest for the current URL.
    var webReq = (HttpWebRequest)WebRequest.Create(url);

    // **Call GetResponseAsync instead of GetResponse, and await the result.
    // GetResponseAsync returns a Task.
    using (WebResponse response = await webReq.GetResponseAsync())
    {
        // Get the data stream that is associated with the specified URL.
        using (Stream responseStream = response.GetResponseStream())
        {
            // ** Call CopyToAsync instead of CopyTo, and await the response.
            // CopyToAsync returns a Task, not a Task.
            await responseStream.CopyToAsync(content);
        }
    }
    // Return the result as a byte array.
    return content.ToArray();
}

Click here to view a video of another example.