Presentation Logic Development Pitfalls
By this point, we have established a clear separation of responsibilities: state logic selects handlers, business logic makes decisions, and presentation logic visualizes the current state and exposes triggers.
This page looks at what happens when that separation is violated.
The most common presentation logic mistake is taking over responsibility that does not belong to it.
Consider the following screens from the “Health Card Verification” use case.
From a UI developer’s perspective, the flow seems obvious: if the user clicks “I do not have a health card”, the application should simply navigate to the “Additional Charges” page.
Many UI frameworks actively encourage this approach by providing direct navigation APIs between pages.
When presentation logic performs direct navigation, it silently makes a business decision.
In this example, the decision “a patient declares the absence of a health card” is embedded directly in the UI flow.
This decision does not belong to presentation logic. It belongs to business logic, because it determines the next state of the business process.
When presentation logic bypasses state logic and business logic, several problems appear:
Over time, the system becomes rigid and difficult to maintain.
The correct responsibility of presentation logic is much simpler.
After a trigger is raised, the transition execution pipeline takes over: business logic evaluates the outcome, state logic selects the next handler, and presentation logic displays the new state.
Presentation logic never decides where the process goes next.
This pitfall appears frequently because UI frameworks are optimized for navigation, not for business process execution.
Without a clear mental model of states, transitions, and execution pipelines, developers naturally gravitate toward direct page-to-page navigation.
Recognizing this pitfall early helps preserve the separation of concerns established in previous chapters.
Table of Content Software Development Pitfalls Next: Business Logic Development Pitfalls