Ryan O'NeillProfessional software developer
← Case studies

CLIENT.NETAzureC#SQLTypeScript

Cohesion Retail Group

Online retailer with multiple websites, stores and backend systems

to present, website, back office, warehouse and store systems

  1. 102009

    Codebase brought under source control

  2. 202012

    Despatch and carrier integration

  3. 302021

    Site rebuilt as a multi-tenant ASP.NET Core platform

  4. 402023

    WCF retired in favour of REST

  5. 502026

    WinForms back office replaced with a browser app

Overview

Working with the client over nearly two decades, I have upgraded their original Visual Basic (VB.NET), WebForms and WinForms codebase and rewritten it, backed by thousands of unit tests.

Once everything was under source control, the legacy platforms were all replaced with modern .NET and C#. Since the move off .NET Framework, every major release has been adopted within months.

All dependencies have been kept up to date and the systems are now stable, fast and secure with telemetry and logging built in.

Multiple brands are supported throughout the API, management UI, databases and warehouse.

All systems needed to stay operational throughout while being modernised and replaced incrementally.

Switching out the legacy systems

Moving on from WebForms and VB.NET

Visual Basic and WebForms had become increasingly difficult to maintain and support as most new developers focus on MVC and C#. Neither technology is being developed further, so to move to modern .NET they needed replacing.

Front-end WebForms pages were replaced with MVC pages one at a time, each switchable by a config setting and checked with a page-diff tool. The site was rebuilt as a multi-tenant ASP.NET Core platform.

API migrated through ASMX, WCF and finally REST

An original ASMX API was replaced with SOAP-based WCF, secured by client certificates.

WCF was retired as it was very difficult for non-.NET callers to integrate with, and Microsoft no longer develops it. Left in place, this would have led to security issues with old dependencies and cryptography libraries.

REST was then implemented so the API was no longer locked to a specific tech stack and could be called from any language or platform. Existing WinForms clients were migrated to REST along with other internal systems.

Replacing WinForms clients with browser-based apps

Implementing REST enabled access from any platform and allowed the replacement of the legacy WinForms back office with modern, mobile-friendly HTML.

By using standardised open-source front-end frameworks, the new browser-based management app was able to replace nearly 70 WinForms screens.

This also meant the remaining logic in the WinForms client was bypassed and did not need to be rewritten from VB.NET to C#.

Rewriting the pricing engine with parity tests

A core part of the system that had grown organically over many years was the order-pricing engine. As this was such a complex component, tests had been added to handle hundreds of different scenarios and edge cases. Due to the complexity of handling discounts, sale pricing, taxes, shipping and cross-border trade, it was becoming increasingly difficult to adapt.

The pricing engine was split into a set of interfaces enabling a pluggable architecture. A new engine was placed alongside it in shadow mode.

Every pricing decision passed through both engines and the results were then compared. Any differences were logged and investigated until the two engines agreed exactly.

Every code branch written for the new engine was covered by unit tests.

Building new systems

Warehouse software

New warehouse systems were created to handle picking, packing and shipping of orders. New warehouse clients were built that initially targeted handheld scanners running Windows Mobile.

Algorithms were created for routing multiple pickers across floors and around the warehouse. Picking routes were optimised to reduce the distance travelled and the time taken to pick an order.

The handheld scanners have since been replaced with browser-based apps accessible from industry-standard Zebra hardware running Android.

Other major areas of development include multiple courier integrations, labelling, manifests, goods-in and goods-out handling and status screens for warehouse staff.

Payments, channels and international trading

The system integrates with multiple payment providers (PayPal, Adyen) and channels (phone, web, mobile, card payment terminals).

Mobile wallet payments (Apple Pay and Google Pay) plus Klarna and direct pay-by-bank have been added to the system.

VAT territory rules, post-Brexit customs data, multi-currency pricing, locale-specific URLs and EU duty handling were also added for international trading.

Ongoing development

A good relationship with the client has meant that I continue to work with them, developing and supporting their systems. New features are added, bugs fixed and security updates applied regularly.

Have a similar system or challenge?

Contact me to talk through your options.

Contact meENTER