What’s middleware? And what difference does it make?

Published Dec 1, 2022, 7:00 AM
Written by Mansi Sheth-Parmar

Middleware is clever code that links complicated backend databases and systems and frontends, so websites run quickly, efficiently and securely. When the hard work of creating middleware is done well, no-one should even know it's there.

I am a developer who works with middleware.

Middleware can mean different things at different tiers of the software stack, but in the broader architectural level, middleware is software that creates links between complicated backend databases and systems, and the frontend that a customer sees in the browser, app or kiosk. 

I’ve seen middleware described as a hidden translation layer or even as plumbing, providing pipes for information to flow between systems. My job is both creative and requires a great deal of patience and logic. I need to track all the inputs and outputs of a given system as well as work out ways to handle that information securely and efficiently. 

Middleware can be used in a range of ways. It plays a key role in creating ways for organisations to collect and use information from different databases or data sources that aren’t connected to each other. 

In my work on Public Transport Victoria’s myki project we use middleware to consolidate ticketing information, address information, user profiles, and payment mechanisms from various sources, simplify it and deliver it to the website and mobile app so a customer can make decisions and pay for their travel without jumping between multiple systems. 

If you’re typing a phone number into a web form, middleware will test whether that number fits the criteria for a mobile phone number. 

If you’re typing a username into a registration form, our middleware layer can perform checks to see whether that username is available. If you’re entering a multifactor authentication code, the middleware can perform a verification that it is valid, as well as update my authenticated user profile. 

Middleware also plays an important role in making websites load quickly, sometimes by consolidating multiple pieces of information from different sources at once, and other times by stripping away unnecessary information. It uses some basic criteria to check and accept or reject data that obviously aren’t correct, thus saving systems from dealing with a lot of unnecessary traffic.  

Lately my work focuses on using middleware as a kind of security gateway. The middleware identifies and processes requests that need certain security – for example, when someone logs in to a website on a browser, their browser sends tokens along with requests when users perform actions like editing their profile. The middleware checks that these tokens are present in the request, and also valid for that user, before it’s passed to other systems.

What I do in my work on middleware is often hidden from the end user, and, if I do my job well, all of our client websites you use will load quickly, and allow you to enter and receive the information you need so you can get on with your day. 

Even though it’s hidden, our development team and our clients appreciate the significant benefits of clever middleware integrations.

Hi I'm Mansi

Mansi is a Full-Stack Developer with ten years of experience working in the Digital space. She has worked with various technologies like Silverstripe, Laravel, ReactJS, Bootstrap, Foundation, etc. She is passionate about web technologies and enjoys solving challenging problems to help clients and businesses have a better digital presence. With her love for mathematics crossing over with software development, creating robust web solutions is never far-fetched for her.

Mansi Sheth-Parmar | Senior Developer

A motif of six squares arranged in a grid pattern with three squares on top and three squares on the bottom