Concepts

Key Concepts

Motivation

The KOS UI SDK is intended for use by front-end developers building user interfaces for KOS-based dispensers. This includes both Consumer User Interfaces (CUI) and the Non-Consumer User Interfaces (NCUI). The SDK allows for more natural idiomatic React development practices that insulate front-end teams from some of the complexities inherent in working with hardware-based embedded systems.

Why is the KOS UI SDK Necessary

React front-end development has, traditionally, been focused on REST-based client/server architectures.

For front-end developers and teams more accustomed to building cloud-based enterprise applications, there will be some concepts in KOS that are more familiar when working with dispensers including asynchronous messaging and event-based near-real-time notifications.

KOS front-end development is, architecturally speaking, conceptually more aligned with building UIs for microservices and/or event-sourced systems. When dealing with data, the dispenser hardware and physical components represent the source of truth. The data models used by the KOS UI framework present a materialized view of the physical data that is updated based on events sent over a WebSocket transport.

The KOS UI SDK provides an abstraction that allows dispenser front-end development to feel more like traditional React development rather than having to incorporate complex asynchronous interactions into component and application code.

Asynchronous

In traditional web development, most interactions are of the request/response variety with a typical lifecycle consisting of a user navigating to a page, the required data is loaded based on a full fetch of the data model from a REST API. Updates to the data are performed when the user returns to the page or explicitly refreshes the page. In many cases, edit operations receive all (or a significant amount), of the data model to be returned and incorporated into the page model.

This model doesn’t apply in KOS as almost every interaction on the dispenser is long-running and asynchronous. The KOS platform provides abstractions that make managing the complexity easier.

Reactivity

By using the KOS Model framework provided by the SDK, it is possible to create reactive application behavior that is driven by the data model. Changes to the data model state are automatically reflected on the screen without needing any special listeners or loading actions.

What is it?

Made up of a few major components:

  1. KOS Model Framework

Provides an entity model and state management framework that is tuned to the behaviors and lifecycles associated with KOS-based dispensers.

  1. KOS React Components and Hooks

A set of React hooks and utilities that enable the consumption of KOS Models and concepts in a form that will be more familiar to developers used to working with React on more traditional web-based projects.

Previous
Next
On this page
Java Development
Seamlessly transition from Legacy+ systems to Freestyle microdosing and advanced distributed dispense systems.
UI Development
Using KOS SDKs, integrating Consumer and Non-consumer facing UIs becomes seamless, giving you less hassle and more time to create.
Video Library
Meet some of our development team, as they lead you through the tools, features, and tips and tricks of various KOS tools.
Resources
Familiarize yourself with KOS terminology, our reference materials, and explore additional resources that complement your KOS journey.
Copyright © 2024 TCCC. All rights reserved.