ADR Jeff Tyree and Art Akerman

Introduction : This is a test for me to write ADR’s accordingly to https://github.com/joelparkerhenderson/architecture-decision-record . I will try those ADR and see the final result

ADR005 Logging

TITLE: ADR 005 – Logging

  • Status: accepted

  • Deciders: Andrei Ignat
  • Date: 2023-10-07

Technical Story: Must add some logging library in order to debug problems

Context and Problem Statement

Every time there is a problem, logging could solve the problems by having more details about what is wrong

So I MUST add logging

Decision Drivers

  • Making one library for logging is not so complicated , however

    • the exporters to other systems are cumbersome and difficult

    • also threading is a problem when writing to a file
  • There are already production battle tested libraries that performs the work well.

Considered Options

Decision Outcome

Choosing NLog because it is simpler to configure from a text file

Positive Consequences

Devops should be happy – the logging file for production could be also put into SourceControl without problems.

Negative Consequences

Do not support yet SAMNE logging for a class. Could be alleviated by having DebuggerDisplayAttribute for the class and logging the function

Pros and Cons of the Options

Serilog
  • Good, because Widely adopted

  • Good, because A lot of documentation
  • Good, because Great community
  • Bad, because A bit harder to learn when coming from log4net
NLOG

Advantages

  • Good, because A lot of documentation

  • Good, because Having been around a long time, there are lots of blog posts
  • Good, because Easy to get started when coming from other logging frameworks
  • Bad, because Structured logging is still a bit behind Serilog
  • Bad, because C#-based API is harder to use than Serilog’s fluent API

Links

ADR based on

https://github.com/joelparkerhenderson/architecture-decision-record/tree/main/locales/en/templates/decision-record-template-by-jeff-tyree-and-art-akerman/index.md

ADR EdgeX Foundry

Introduction : This is a test for me to write ADR’s accordingly to https://github.com/joelparkerhenderson/architecture-decision-record . I will try those ADR and see the final result

ADR003 Tests

TITLE: ADR 003 – Tests

Submitters
  • Andrei Ignat

Change Log

Referenced Use Case(s)

All use cases, e.g.

  • UseCases001 – No Authentication , upload

must be enforced via an automated Test.

Context

The tests are an important part of the software – so the framework that I am using is important.

Also , the organization of the software must allow testing business rules more than endpoints / GUI that are changing very often.

Also, the code coverage is pretty important – should be at least 80%

Proposed Design

Every GUI application ( Desktop,Console, WebAPI ) must be skinny – i.e. passing data to a business component.

Also, Business should not call static functions ( e.g. DateTime.Now, Environment.CurrentUser) but pass interfaces or functions in order to be Mocked.

Considerations

Testing GUI’s / endpoints should be make at least possible in the developing of the app, because they are changing fast.

Decision

As frameworks we will have :

XUnit ( preferable constructor over [SetUp] ) – see https://testsigma.com/blog/nunit-vs-xunit/

FluentAssertion – to improve running and debugging

LightBDD – to display tests in a good form

NSubstitute – instead of Moq – see https://github.com/moq/moq/issues/1374

Rocks – https://github.com/JasonBock/Rocks/

dotCover CLI – https://www.jetbrains.com/help/dotcover/Running_Coverage_Analysis_from_the_Command_LIne.html

Other Related ADRs

Format:

  • ADR002 – Architecture of the application

References

ADR based on

https://github.com/joelparkerhenderson/architecture-decision-record/tree/main/locales/en/templates/decision-record-template-by-edgex/index.md

ADR Alexandrian

Introduction : This is a test for me to write ADR’s accordingly to https://github.com/joelparkerhenderson/architecture-decision-record . I will try those ADR and see the final result

ADR002 Architecture of application

TITLE: ADR 002 – Type of application

Prologue (Summary)

The app will be used the people that are powershell users and wants their profile shared.

In the context of

Use Case 1 : No Authentication , upload

and

Use case 3: User can see data for a user name

the decision an WebSite. In order to achieve Use Case 1 from powershell, an WebAPI should be implemented.

Discussion (Context)

From WebAPI we can decouple the GUI(SPA) from the WebAPI – and maybe modifying / trying different GUIs ( Angular, React, MVC)

Solution

It is the common way those days to split the app in BackEnd and FrontEnd.

Consequences

We have the possibility to upgrade separately the BackEnd and FrontEnd.

However, it will be more difficult to debug the SPA.

ADR based on

https://github.com/joelparkerhenderson/architecture-decision-record/tree/main/locales/en/templates/decision-record-template-for-alexandrian-pattern

ADR Michael Nygard

Introduction : This is a test for me to write ADR’s accordingly to https://github.com/joelparkerhenderson/architecture-decision-record . I will try those ADR and see the final result

ADR001 Engine for documentation

TITLE: ADR 001 – Engine for documentation

Status : accepted
Context

Need to have a static documentation site with blog also .

In those days there are many engines on the market. And I can built one 😉 .

Read https://docusaurus.io/docs#comparison-with-other-tools . The only that seems to fit the bill are REACT based – I cannot afford learning VUE after Angular and React.

The problem with REACT is that he is going also to server side …

Decision

Docusaurus it is because

  1. Apparently is it the best on REACT

  2. I know REACT
  3. It has BLOG and Documentation
Consequences

The build process will be somehow different.

Could be hard to transfer what I have written to another engine

ADR based on

https://github.com/joelparkerhenderson/architecture-decision-record/tree/main/locales/en/templates/decision-record-template-by-michael-nygard

NetPackageAnalyzer and CleanArchitecture

I have analyzed  https://github.com/jasontaylordev/CleanArchitecture  with https://nuget.org/packages/netpackageanalyzerconsole . It seems pretty simplistic .

Number projects : 9 (tests : 5, no tests : 4 )

Number packages : 231 (Outdated: 24, Deprecated: 0, Major version differs 14)

Total Commits: 239 ( last commit : this year,2024)

4 Projects

diagram

239 commits

diagram

Generated by https://www.nuget.org/packages/NetPackageAnalyzerConsole

NetPackageAnalyzer and ContosoUniversity

I have analyzed   https://github.com/jbogard/ContosoUniversityDotNetCore-Pages with https://nuget.org/packages/netpackageanalyzerconsole . If you open the solution , even if it is a single project, it is well organized , even if not maintained anymore ( no commits this year)

Number projects : 2 (tests : 1, no tests : 1 )

Number packages : 304 (Outdated: 25, Deprecated: 1, Major version differs 9 )

Total Commits: 83 ( last commit : 2023)

1 Projects

diagram

83 commits

diagram

Generated by https://www.nuget.org/packages/NetPackageAnalyzerConsole

NetPackageAnalyzer and Clean-Architecture-Manga

I have analyzed https://github.com/ivanpaulovich/clean-architecture-manga    with https://nuget.org/packages/netpackageanalyzerconsole . It seems to be one simplistic , but better than a monolith

Number projects : 9 (tests : 4, no tests : 5 )

Number packages : 213 (Outdated: 26, Deprecated: 4, Major version differs 29 )

Total Commits: 103 ( last commit : 2023)

5 Projects

diagram

103 commits

diagram

Generated by https://www.nuget.org/packages/NetPackageAnalyzerConsole

NetPackageAnalyzer and Fitnet

I have analyzed  https://github.com/evolutionary-architecture/evolutionary-architecture-by-example    with https://nuget.org/packages/netpackageanalyzerconsole . It seems one of the good projects to be analyzed from an architecture summary. It shows how the architecture evolved from a monolith to microservcices.

Chapter 1

summary

Number projects : 4 (tests : 3, no tests : 1 )

Number packages : 175 (Outdated: 20, Deprecated: 0, Major version differs 8 )

Total Commits: 71 ( last commit : this year,2024)

1 Projects

diagram

71 commits

diagram

Chapter 2

summary

Number projects : 24 (tests : 9, no tests : 15 )

Number packages : 100 (Outdated: 16, Deprecated: 1, Major version differs 2 )

Total Commits: 164 ( last commit : this year,2024)

15 Projects

diagram

164 commits

diagram

Chapter 3

summary

Number projects : 10 (tests : 0, no tests : 10 )

Number packages : 27 (Outdated: 1, Deprecated: 1, Major version differs 0 )

Total Commits: 81 ( last commit : this year,2024)

10 Projects

diagram

81 commits

diagram

Chapter 4

summary

Number projects : 10 (tests : 0, no tests : 10 )

Number packages : 27 (Outdated: 1, Deprecated: 1, Major version differs 0 )

Total Commits: 39 ( last commit : this year,2024)

10 Projects

diagram

39 commits

diagram

Generated by https://www.nuget.org/packages/NetPackageAnalyzerConsole

Andrei Ignat weekly software news(mostly .NET)

* indicates required

Please select all the ways you would like to hear from me:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.