| |

EDM – The UI

In this post, I’d like to talk about what I feel is a very interesting idea, I’d like to take the time to talk about engineering some user interface that interacts with an event driven microservice for a back end, whether this back end is utilising some message broker or something else is irrelevant. For argument sake, let’s just say that the back end behaves in some asynchronous manner due to the complex business logic and/or complex/time consuming processes that are involved.

For this example, I’ll use a delivery service as an example, to initiate an order it’s reasonable to assume that a customer has successfully purchased a product. In such a scenario, an event occurs, the purchase has succeeded, then this triggers a series of events to occur, an order is created. In the creation of this order, a few key pieces of information, such as the expected time of delivery & the date the purchase went through.

Let’s say that the order is now in a pending state, the purchase has been successful, the money has left the customers account, but the order hasn’t yet been processed by the warehouse. In such a scenario, you could quite easily have some backend system that communicates with some front-end application via SSE (Server Sent Events), WS (Web Sockets) or potentially some other HTTP mechanism that may implement some form of polling.

So, on the front end, the user would see something along the lines of “Your order is being processed, we expect that you should receive your product on xx/xx/xxxx @ xx:xx”, this is quite a common design for such a business process. Examples include Dominoes when you place a pizza order on their website, Amazon, etc, the idea is that it’s simple & the user will likely check the state of the order later. We could make this system more sophisticated & use notifications or send a text, email, etc, the idea is to ensure that the user is informed that the state of the order has changed for some reason or another. Whether the user decides to cancel the order, or the order has progressed to another stage in the order process, such as “Your order is being shipped”. In all these scenarios, some event has occurred, in such a scenario, the UI should be updated, as previously mentioned, whether you decide to use email, SSMS, notifications, etc is down to specification.

When it comes to implementing a UI to cater for asynchronous backends, depending on context of course, you don’t need to worry about informing the user instantly, if the interface reflects the current state of the process, that’s all that matters. You can even implement an interface that will update in real time, as the state updates, which in my opinion is the best that you can achieve. If the system is non-blocking, responsive, reactive, fault tolerant, quick/fast, etc, I’d say that you’ve done a pretty good job.

The best part about implementing such an interface is that users are natively familiar with it, regardless of how enterprise & complex the back-end architecture is, the UX is generally quite satisfying. You could go ahead & include some fun animations which is what has been achieved with the likes of Dominoes, in my opinion at least, this is a nice to have to say the very least, increasing the UX just that little more.

Similar Posts

  • |

    Enterprise

    Being a developer that’s come from a background of working for relatively small companies, it’s been an interesting experience working for Admiral Group Plc so far. In my little time at Admiral, I’ve changed the way I think about things, the way I tackle things, etc, it used to be the case where I was…

  • |

    An Intro to P vs NP

    Okay, so P vs NP is a very interesting topic that I like to talk about, to keep things simple, P vs NP is 1/7 of the millennium problems. From an abstract perspective, this problem essentially queries whether or not it’s possible to solve complex problems in the amount of time that it takes to…

  • | |

    Why I Like Spring

    To start off, let’s agree that Spring is a lovely ecosystem, between the large community support, it’s incredibly popular & it’s just all round tried & tested. I could go on, one thing that’s made me fall in love with the Spring framework is the ease that’s included when scaling horizontally, and hell, here’s a…

  • Interviews

    Introduction I thought I’d spice things up a little. 🌶️ One thing that I’m certain nearly every developer has read up on is the interview process. How some companies will have several stages to the entire process, from application to offer & how others will be as simple as a single interview with a panel…

  • |

    Technical Leadership II

    So, since I’ve joined Lloyds banking group, I’ve taken on a bit of an unusual role, especially for an organisation of this size. If I had the complete freedom to say what it is that I do at Lloyds, I’d say that I’m somewhat of a semi-manager, not a full blown manager by any means,…

  • |

    The DevOps Analogy

    This won’t be a long post, rather a silly little thought process that I just wanted to share with you guys! 🙂 Since working for Lloyds, I’ve taken on a large number of DevOps focused tasks & it’s been odd, when family, friends or anyone that’s not technologically literate asks me what I do, I…

Leave a Reply

Your email address will not be published. Required fields are marked *