Menu

Why I chose gRPC for the UI of my POS
📰

Why I chose gRPC for the UI of my POS

DEV Community: dotnet·Waxime Studio·about 4 hours ago
#DtK0BROp
#devtodotnet#devto#dev#contract#engine
Reading 0:00
15s threshold

I spent seven years building a point of sale and adapting it to different customers. Changing the screens was a recurring part of the work. With StillDeep, I wanted to be able to build a different interface for a business while keeping the same engine underneath.

That led me to use a public gRPC contract between the UI and the engine. A screen asks for an operation and works with the result. It does not need access to the engine’s internal classes or database.

A client generated from the contract

The contract describes the available services, their requests and their responses in Protocol Buffers files. gRPC tooling uses those definitions to generate a client.

In C#, that gives me typed requests and responses. When I write a screen, I can see what an operation expects and what it returns. The compiler catches type mismatches while I’m working on the client.

It also leaves room for someone to build an interface in another language supported by gRPC.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.