Software Design and Architecture in .NET

Home » Software Architecture and Design » Software Design and Architecture in .NET
Photograph of columns in old building

The reason for me producing this blog in the first place is that I wanted to share and develop my knowledge of object orientated design, including layered and tiered software and software architecture in general.

To do proper justice to these subjects could take more time than I have had available in the past few months, with a house move and lots of work commitments. Hence it has not yet been attempted.

I am intending to put the effort in though especially with having some time available over the christmas break. This post is the first of hopefully many on these two subject areas.

Just to define Design and Architecture for the purpose of this blog.

In this blog, design is the effort you put into designing an individual application or database to meet your user requirements.

Architecture is relating to the relationship between different components, in particular the relationship between different applications in a system that is made up of well, different applications.

So for example, talking about layered architecture is really design if these are layers (i.e. classes in the same app) or architecture if there are multiple tiers (e.g. part of the app in a WCF service, the other part in MVC or WPF).

In coming posts I am going to explore both angles.

Software Design

I see too many systems that just kind of expand outwards, into what are called “Thick Client” type of applications. That is, all code goes into a single code behind class (or possibly stored procedures and views in the database – resulting in a Thick Database, which is just as bad). Also systems I have worked on are both “Thick Client” and “Thick Database” with nothing much in-between!

These systems are common in my experience and are very easily done when your DBA says he/she always wants stored procedures, it might be difficult to make changes to the database, and the software itself expands out in the code behind as new features are added without time (or tests) to allow easy refactoring of the client side code.

While there are plenty of ways to design a system correctly, there are also plenty of ways to get it wrong also (what’s the definition of right or wrong – well you decide that – if you are happy with your system, if its reliable, meets your users needs, easy to maintain and enhance, then there is nothing “wrong” with it – most systems can usually improved in one way or another though, because nothing is perfect). We are going to journey from examples of such a system in various directions that undoubtedly improve matters, giving the reader the information and tools to be able to make better decisions about where to put the code.

Software Architecture

Software Architecture is a different subject. How should components and systems talk to each other? In the case of components where to put the breaks in tiers, what classes go in what tier. How to change if you get it wrong, etc. In the case of systems often it is a case of finding out what the published interface is if any and using that, or if not, making a WCF service that uses SSL transport that can access the database and at least make a start at making it secure over the internet. But how to design these services? How to make them resilient? Talking of resilient, how to handle one system, one database, or one component being down and unavailable? Showing users the error page isn’t always acceptable.

Also the methods used to integrate different systems together have changed over the years. Years ago it was “Best of Breed” and “Enterprise Integration” that were the buzzwords. Then SOA (Service Orientated Architecture). You cannot say you are using SOA just because you are using WCF! There is a lot more to it than that. What I am looking for is a low cost way that just allows developers to concentrate on business logic rather than plumbing code, so we will look at brokers like Microsoft Biztalk and its more developer friendly alternative Windows Workflow Foundation (WF) and also products like NServiceBus (to be fair Biztalk can act like a Bus as well as a broker).

During my career I have been lucky enough to be able to work on lots of different systems I can add some really valuable posts. Watch this space!

About Phil

I have been working as a software developer since 1983. This blog could have been called "From Fortran 77, C and Cobol to C# in 20 (not so) easy years", but it doesn't sound quite right somehow. Besides I'm talking about what's happened since 2003, not before!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Top Posts & Pages


Recent Posts

Recent Comments



  • Mike Cohn's Blog
  • Scott Hanselman's Blog
Be a Great Product Owner: Six Things Teams and Scrum Masters Need

Learn six ways effective product owners ensure their teams’ success. [...]

What Happens When During a Sprint

Succeeding with Scrum is easier when you know when and why to conduct each of the Scrum events during the sprint. [...]

What Are Agile Story Points?

Story points are perhaps the most misunderstood topic in agile. Story points are not based on just one factor--such as complexity, as is often mistakenly claimed. Instead, story points are based on a combination of factors. [...]

Don’t Equate Story Points to Hours

I’ve been quite adamant lately that story points are about time, specifically effort. But that does not mean you should say something like, “One story point = eight hours.” Doing this obviates the main reason to use story points in the... [...]

Epics, Features and User Stories

I've been getting more and more emails lately from people confused about the difference between "user stories", "epics" and "features." So I thought this month we'd return and cover some basic--but very helpful--territory by explaining those terms. First, the terms don't matter that much. These are not terms with important specific meanings like "pointer" to a programmer or "collateralized debt obligation" to whomever it is that's important. [...]

- Scott Hanselman
Use your own user @ domain for Mastodon discoverability with the WebFinger Protocol without hosting a server

Mastodon is a free, open-source social networking service that is decentralized and distributed. It was created in 2016 as an alternative to centralized social media platforms such as Twitter and Facebook. One of the key features of Mastodon is the use of the WebFinger protocol, which allows users to discover and access information about other users on the Mastodon network. WebFinger is a simple HTTP-based protocol that enables a user to discover information about other users or resources on the internet by using their email address or other identifying information. The WebFinger protocol is important for Mastodon because it enables… [...]

- Scott Hanselman
I got tired

I have been blogging here for the last 20 years. Every Tuesday and Thursday, quite consistently, for two decades. But last year, without planning it, I got tired and stopped. Not sure why. It didn't correspond with any life events. Nothing interesting or notable happened. I just stopped. I did find joy on TikTok and amassed a small group of like-minded followers there. I enjoy my YouTube as well, and my weekly podcast is going strong with nearly 900 (!) episodes of interviews with cool people. I've also recently started posting on Mastodon (a fediverse (federated universe)) Twitter alternative that… [...]

- Scott Hanselman
Using Home Assistant to integrate a Unifi Protect G4 Doorbell and Amazon Alexa to announce visitors

I am not a Home Assistant expert, but it's clearly a massive and powerful ecosystem. I've interviewed the creator of Home Assistant on my podcast and I encourage you to check out that chat. Home Assistant can quickly become a hobby that overwhelms you. Every object (entity) in your house that is even remotely connected can become programmable. Everything. Even people! You can declare that any name:value pair that (for example) your phone can expose can be consumable by Home Assistant. Questions like "is Scott home" or "what's Scott's phone battery" can be associated with Scott the Entity in the… [...]

- Scott Hanselman
JavaScript and TypeScript Projects with React, Angular, or Vue in Visual Studio 2022 with or without .NET

I was reading Gabby's blog post about the new TypeScript/JavaScript project experience in Visual Studio 2022. You should read the docs on JavaScript and TypeScript in Visual Studio 2022. If you're used to ASP.NET apps when you think about apps that are JavaScript heavy, "front end apps" or TypeScript focused, it can be confusing as to "where does .NET fit in?" You need to consider the responsibilities of your various projects or subsystems and the multiple totally valid ways you can build a web site or web app. Let's consider just a few: An ASP.NET Web app that renders HTML… [...]

- Scott Hanselman
A Nightscout Segment for OhMyPosh shows my realtime Blood Sugar readings in my Git Prompt

I've talked about how I love a nice pretty prompt in my Windows Terminal and made videos showing in detail how to do it. I've also worked with my buddy TooTallNate to put my real-time blood sugar into a bash or PowerShell prompt, but this was back in 2017. Now that I'm "Team OhMyPosh" I have been meaning to write a Nightscout "segment" for my prompt. Nightscout is an open source self-hosted (there are commercial hosts also like T1Pal) website and API for remote display of real-time and near-real-time glucose readings for Diabetics like myself. Since my body has an… [...]