Hi everyone,
I’m working on a platform where my domain objects form a cyclic graph, not a tree:
- A
Gamehas manyServers - A
Serverbelongs to oneGameand oneUser - A
Userhas manyServers
In a Master-Detail UI, the user might naturally navigate like this:
Game > Server > User > Server > Game > ...
Or more abstractly: A > B > C > D > E > F > B > A
The problem with pure URL-based routing:
If I encode every navigation step into the URL, I end up with something like:
/games/1/servers/5/users/3/servers/5/games/1
That’s not just ugly, but it also breaks down semantically, because the URL is no longer a resource path, it’s a navigation history. And it could theoretically grow unbounded.
On the other hand, if I collapse the URL to only the “current” object (e.g. always just /servers/5), I lose the navigation context and the back button becomes useless and I can’t reconstruct “how did I get here”.
What I’m wondering:
Is there a known pattern in Vaadin (or the broader community) for this kind of situation? Specifically:
- Does Vaadin have any built-in support for in-memory navigation stacks / breadcrumb history that stays separate from the URL?
- Is the right approach to keep URLs clean (just the current object) and maintain a client- or session-side navigation stack manually?
- Or is there a smarter URL strategy that handles cycles gracefully without blowing up the path?
Matrix42 (a enterprise ticketing tool) seems to handle this with in-memory navigation rather than URL-based routing, but that sacrifices deep linking entirely. Is there a middle ground?
Curious how others have tackled this, especially in more complex domain models where object relationships aren’t strictly hierarchical.
Thanks!