What you will learn in this course

Guerrilla .NET provides a deep exploration of .NET design philosophy and practical advice. You learn a myriad of patterns and best practices, and you get hands-on experience developing applications using Visual Studio 2015 and Windows 10. Learn to write code using new .NET class libraries like Entity Framework 5/6, MVC 5, and The Reactive Framework.

You will learn:

  • How to pick the right async technology for the right job
  • Why Thread Safety is important and what tools are available in .NET
  • How to build well structured XAML based applications
  • What technologies are available for the back-end of modern web applications
  • How to build loosely coupled code with TDD
  • How the GC works and how you can debug memory issues in your applications
  • How to isolate your code from data access technologies
  • What the compiler does for you when you use rich language features
  • What new features are coming in C# 6

Come and learn to build robust .NET applications using the latest technologies! Register now.

The Guerrilla experience means total immersion in social coding. Multiple instructors keep you engaged throughout the entire learning process, while you work with new friends, collaborating, competing, and coding.


Course highlights

  • Async in the Language - c# 5 async and await
  • Understand what the compiler is really doing when you use advanced C# language features
  • Best practice with Entity Framework 5/6 and the repository pattern
  • Using async/await on the server side
  • Using Rx for consuming event streams
  • Using TDD to build robust maintainable applications
  • What's new in C# 6
  • Taking the REST approach with ASP.NET Web API?
  • Where is Server side .NET going with DNX
  • The principles behind XAML based applications (WPF Microsoft Store); the main building blocks and how XAML works
  • Best practice with XAML based applications: data binding and MVVM?
  • Use powerful OO design patterns and techniques to build loosely-coupled, testable, and maintainable applications including Dependency Injection (DI), Inversion of Control (IoC), and how to test these with Mocking
  • Using PFx and TPL DataFlow to parallize compute
  • Use SignalR to create asynchronous notifications in web applications

Course outline and topics

Day 1

Deep Dive Language Mechanics:

In the early days of C# there was virtually a 1-1 mapping between C# and IL. Much has changed since C# 1, the developer is encouraged to simply describe their intent and the compiler builds the appropriate code. This module will dive under the hood and show how various C# features like iterator methods, anonymous methods, extension methods,LINQ and dynamic all result in code gen by the C# compiler. These layers of abstractions initially make us more productive, but sometimes they hide those hard to find bugs, and can add a deluge of performance implications that once we understand how the mechanics of the features work we can quickly fix.

Entity Framework 6 Introduction:

The Entity Framework is an Object Relational Mapping (ORM) layer released in .NET 3.5 SP1. The module looks at the ideas behind ORM and shows how you can remove data access code from your codebase by working with objects that the ORM translates into database queries. Along the way we will look at how LINQ can be used to query and manipulate this data.

WPF Basics:

WPF is Microsoft’s UI technology for building smart client applications. In this module we look at the WPF architecture and how user interfaces are designed using a markup language called XAML. XAML is at the heart of all of Microsoft’s frameworks for building rich user interfaces: WPF, Silverlight and Windows 8 App Store applications.

Unit Testing:

Using unit testing comprehensively within software development is a growing movement. Unit testing allows refactoring and maintenance with the confidence that existing functionality is not broken. In this module we will look at techniques for writing good unit tests and integrating them into testing frameworks to automate the unit tests. We will also introduce Test Driven Development (TDD) to show how writing tests first delivers not just well tested code but also more loosely coupled code.

Day 2

Entity Framework 6 and the Repository Pattern:

Prior to Entity Framework 4.0 EF relied on generating entity classes that were tightly coupled to EF. 4.0 introduces the idea of POCO classes – bringing your own classes to EF. This module shows how POCO support works and how you can use the repository pattern to keep your application code and the data access layer cleanly separated and testable.

WPF, DataBinding and MVVM:

Moving data between the UI and underlying objects can be a laborious task. Databinding is a technology that hugely simplifies this process. But more than that, in WPF databinding is a fundamental skill for creating rich user interfaces with minimal code. Databinding is the core technology that enables the use of the Model-View-ViewModel presentation layer pattern which we also introduce in this module.

Test Doubles and Mocking:

Code is not automatically unit testable – it has to be designed to be so. We will look at how Test Driven Development leads to inherently testable code by using dependency injection and how Inversion of Control (IoC) containers can make dependency injection manageable. Once we have dependency injection we can then use mocking frameworks to simplify the job of making unit tests truly test only a single unit by supplying test doubles we control rather than the real dependencies.

Building REST-based Services:

Service Orientation and SOAP are often seen as going hand-in-hand. However, there is another architectural style for building services – that or REpresentational State Transfer, or REST. REST uses the design principles that have made the web so hugely scalable: resources are identified by URI, operations defined by HTTP verbs, links used to move to the next stage of processing. In this module we look at how we use the .NET platform to deliver REST based systems.

Day 3:

Task - a Unified Threading API:

When the Parallel Framework Extensions (PFx) were first announced it looked as though it was going to target a narrow set of requirements around parallelizing processor intensive code. However, over time the scope of the library has grown significantly such that it will become the main model for building asynchronous code. The pivotal type enabling this transition is the Task class. This is a functionally very rich type allowing the creation of both short and long lived asynchronous work, Tasks can have dependencies on one another and support cancellation. In this, the first of the PFx modules we look specifically how this class gives us a unified framework for building multithreaded code.

Thread Safety:

Asynchronous programming requires careful attention to detail since most objects are not designed with multithreaded access in mind. This module introduces the importance of Interlocked and Monitor-based synchronization. However, on their own these primitives do not provide support for more complex synchronization situations and so people have had to use them as building blocks to build things like efficient Semaphores.

Simplifying Thread Safe Code:

When developing multi-threaded applications that share state, we need to consider thread safety when sharing state across multiple threads. These techniques require the developer to understand the possible race conditions and select the cheapest synchronisation technique to satisfy thread safety. But, while essential, they can often become tedious and make the simplest of algorithms seem overly complicated and hard to maintain. In this session, we’ll explore the use of built-in concurrent data structures shipped with TPL that will simplify multi-threaded code while maximising concurrency and efficiency.

C#5 Async/Await:

C# 5 builds on the Task API introducing async and await keywords which bring asynchronous execution as a first class concept in the C# language. These new keywords create a very elegant model for all sorts of async work and this module explains not only how to use them but also how they work under the covers.

Day 4:

Inside the Garbage Collector:

The garbage collector has been part of .NET since its inception. However, exactly how the GC works is often shrouded in mystery. Also the fact that memory management is automated doesn’t release the developer from caring about memory issues – it’s just those memory issues appear in a different guise. In this module we take the lid of the GC, look at how it works and is optimized and then assess what this means for you when you are writing your code: things you do that can help the GC and things that cause it problems.

Power Debugging with WinDBG:

For many developers debugging tools start and end with Visual Studio. However, there are a large number of problems that Visual Studio provides very little support – particularly threading and memory management issues. WinDBG and the plugin SOS.DLL bring a new set of tools to .NET developers that can provide insights that help you solve bugs that you see during testing but also allow you to diagnose issues occurring in production systems where the only data you can get is a crash dump file.

Introducing the Reactive Framework (Rx)

Reactive Framework is a new library that uses the .NET 4.0 IObservable interface and LINQ to create a compelling new programming model that allows you to build "event" based code with declarative LINQ statements. This module introduces the Reactive Framework and shows how it can greatly simplify your code.

Building Asynchronous Web Applications With SignalR:

SignalR is a framework for building asynchronous web applications. SignalR consists of two parts, server and client that work together to allow the server to push data to the client. The server code is built around Microsoft's ASP.Net MVC framework while the client will use the best technology available to do it's work, that could be Web Sockets, Long polling, forever frame or some other technique. Anywhere that you need to use asynchronous updates to multiple clients SignalR can help. We will cover how to set up and initialise SignalR and how to use it to call into the browser and get the browser to show updates.

Day 5

Parallel Frameworks for Scalable Compute:

Herb Sutter famously coined the phrase “the free lunch is over” back in 2005, when it became clear that processor clock speeds were no longer obeying Moore’s law. If developers wanted applications to go faster they could no longer rely on greater clock speeds, they would need to think differently and restructure their code to take advantage of multiple cores in order to get better and better performance. It turns out parallelising all but the most trivial piece of code is challenging. .NET 4.5 attempts to assist the developer by providing support in the framework to assist parallelising algorithms through the use of parallel constructs like Parallel.For, and Parallel LINQ and Dataflow library. The framework vendors would like you to believe that the free lunch is now back, but whilst they can deliver a moderate free lunch, if you truly want a gut-busting free lunch you will have to deploy a range of tricks for your algorithm to take full advantage of those multiple cores.

C# 6:

The next evolution of C# is coming this year. This module will take you on a tour of the new features: features that will simplify your code; features that remove constraints that were previously there; and some features that will leave you scratching your head wondering why you would ever need them.

DNX (the artist formally known as ASP.NET vNext):

Server side programming in .NET is about to change radically. Some frameworks are updated – MVC and WebAPI are unified, SignalR is moved to version 3; others are put out to pasture – WCF is not part of the platform. But the most radical changes are in the form of platform and deployment. Server side .Net is going to be cross platform: it will run on Windows, Linux and OS X. The framework is no longer a monolith but split into a myriad of smaller packages – you only need to deploy the parts of the framework that you are using. In fact the entire runtime gets XCopy deployed with your application so new platform version will no longer break your code. This module shows you the new server side platform in action.