<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Software Engineering on scarbrough.co.uk</title>
    <link>/tags/software-engineering/</link>
    <description>Recent content in Software Engineering on scarbrough.co.uk</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 03 May 2022 00:00:00 +0000</lastBuildDate>
    <atom:link href="/tags/software-engineering/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>.NET Core - xUnit Tests with Repository Pattern and IUNitOfWork</title>
      <link>/post/development/dotnet-core-xunit/</link>
      <pubDate>Tue, 03 May 2022 00:00:00 +0000</pubDate>
      <guid>/post/development/dotnet-core-xunit/</guid>
      <description>After some hours of frustration and asking myself whether I should have used Unit of Work in the first place (there are already layers of abstraction in the standard .NET Core template project) I managed to get a functioning xUnit test method that mocks the repositories, populates them with data and verifies the model returned by a controller method.&#xA;Setting Up a Unit Test Project Add a xUnit project to the solution, then add an assembly reference in that to the project being tested.</description>
    </item>
    <item>
      <title>.NET Core 6 - Dependency Injection, Repository Pattern and Unit of Work</title>
      <link>/post/development/repository-pattern-and-uow/</link>
      <pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate>
      <guid>/post/development/repository-pattern-and-uow/</guid>
      <description>A repository pattern exists to add another layer of abstraction between the application logic and the data layer, using dependency injection to decouple the two. It&amp;rsquo;s not my preferred way of doing things, because of the effort and complexity involved, and I&amp;rsquo;m certainly not the only person who initially struggled to understand the concepts behind it. Plus, it&amp;rsquo;s apparent that Entity Framework makes heavy use of that dependency injection already. But a Repository Pattern is widely considered - by software engineers far more experienced than I am - best practice for engineering services that deal with critical data.</description>
    </item>
    <item>
      <title>Research Code Doesn&#39;t Need to Be a Tangled Mess</title>
      <link>/post/development/research-code-standards/</link>
      <pubDate>Mon, 01 Mar 2021 00:00:00 +0000</pubDate>
      <guid>/post/development/research-code-standards/</guid>
      <description>Writing at The Shape of Code blog, Derek Jones asserted that &amp;lsquo;Structural differences between academia and industry make it likely that research software will always be a tangled mess, only usable by the person who wrote it.&amp;rsquo;&#xA;Yes, there are structural (and insurmountable) differences between academia and industry in how programming languages are used to solve problems. Professional developers more often engineer code, because there are typically real-world consequences to releasing poor-quality software, from damage to a company&amp;rsquo;s reputation to injury or death.</description>
    </item>
  </channel>
</rss>
