Solid .NET Architecture

5 Days
C#, Testing, .Net, Data, Async, Web


This class will introduce delegates to the key technologies available on the .Net platform to design and build an end to end solution.  The class will probably raise as many questions about your future architecture as it provides answers.  The course will open your eyes to a variety of different technologies to solve your architectural needs discussing the pros and conss for each.  This class is not intended to be a recipe card but a critical look at various technologies and how you may construct your own recipe for your next project.

Modules in Solid .NET Architecture:

Introduction to 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 tests. We will see that using the tests to drive the development guides you to produce flexible, loosely-coupled code with high test coverage. 

Design for testing

Code is not inherently testable; it must be designed that way. In this module we look at common issues in code that make it hard to test and how we resolve them. Along the way we will look at Dependency Injection and Inversion of Control containers.

Essential Design Patterns

Learning how to construct loosely coupled Object Orientated systems is a skill all software developers should have.  The Gang of Four Design patterns make a great starting point.  In this module we will look at the principles behind the patterns, understand why pattern terminology is so important, and put to use some of the most commonly used patterns.  The result of which will mean greater communication, cleaner designs, and enable effective unit testing.


Understanding and utilising an ORM with Entity Framework

Relational database continue to provide the persistence store for most application’s data.  As OO developers we would like to model our data in objects.  This creates an impedance mismatch between the two worlds.  For many years developers have hand rolled their data access layers to provide the necessary translation, while not complex is tedious.  Object relational mapper library have been developed to remove this tedium.  During this chapter we will introduce Microsofts ORM Entity Framework and demonstrate how to use it effectively so you never have to write tedium data access code again.


  • Understanding of Entity Framework Code First
  • Loading Strategies to reduce round trips


Relational databases have been the dominant player in the data store space for many years.  They continue to play an important role for data best represented with relationships.  The emergence of highly distributed web sites such as Facebook and Twitter, and their need to store large amounts of non relational data distributed and cheaply scaleable, has led to the adoption of NoSQL data stores.  In this chapter we will discuss various forms NoSQL databases can take - using MongoDB as a detailed case study.


  • Understand when to use a NoSQL data store over a relational data store
  • How to choose your NoSQL technology

Repository Pattern and Unit Of Work

Data access technologies have their own specific APIs. Writing application logic directly against these APIs is a form of corruption as you are now wedded to that data access technology. Testing the application logic in isolation from a data store also becomes increasingly hard as the application logic is bound to the data access technology.  The Repository and Unit of Work Patterns introduce an anti corruption layer - isolating your application code from the data access API and implementation of the underlying store.


  • How to separate application logic from data access technology
  • Increase scope for unit testing


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. Over time the scope of the library has grown significantly such that it has 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 multi-threaded code.

Simplifying Thread Safety

When developing multi­‐threaded, we need to consider  thread safety when sharing state across multiple threads. These techniques require the developer to understand possible race conditions and select the cheapest  synchronisation technique to satisfy thread safety. However, while this process is essential, it can often become tedious and can make even simple algorithms seem overly complex and hard to maintain. In this module, we will explore the use of framework provided concurrent data structures shipped with the Task Parallel Library that will simplify multi‐threaded code while maximising concurrency and efficiency.

Parallel Patterns with Pfx

The initial goal of PFx was to simplify the parallelization of processor intensive tasks - and this remains a key feature. In this module we will look at a variety of parallel programming patterns to solve various compute intensive tasks that use multiple CPUs using Parallel.For, Parallel.ForEach and PLinq.   

Understanding Distributed Systems

Most applications need some form of distributed processing – how you structure and secure that distributed processing is critical to the success of the application.  This module looks at the options and trade-offs that come with different approaches. We start off looking at core networking concepts such as protocols, firewalls, load balancing and caching. We then move on to look at security concepts in distributed system. Along the way we’ll discuss how on-premise and cloud impact these options and decisions.

Building RESTful systems with WebAPI

Sites and applications often want to publish an network based API for their functionality. An approach that is increasingly popular is to use HTTP not just as an network protocol but also as an application protocol - an approach often termed RESTful. WebAPI is the API from Microsoft that can be used to deliver RESTful systems.  

Course Builder

Pick and choose from specific modules to put together your dream course! Complete with time estimations, get a quote today.

Design Your Custom Course