| |

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

  • Politics

    This is a bit of a different post from myself, recently I’ve been thinking about the likes of parliament & senior management in large organisations. Organisations that includes a lot of politics in the work environment, etc. I’ve come to the conclusion that we’re in a position where we need more technically hands on people…

  • Consulting

    Just to clarify, I’m going to keep this one short & sweet! 😅 As some of you may know, I’ve decided to step down as the CTO from QuoteOnSite. I have done this for a few reasons, including: It’s safe to say that I didn’t leave on bad terms, I want nothing but the best…

  • |

    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…

  • |

    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…

  • Exhaustion

    I’ve been extremely absent within the development community as of recent. This is purely due to the fact that I’m really struggling to find the right balance with my current juggling act, which is: Nothing drastic, but I’m really struggling to find time to relax & engage in some hobbies of some shape or form….

Leave a Reply

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