

On Jun 9, 2025, at 9:42 PM, Phạm Đức Mạnh <phamducma...@gmail.com> wrote:
Hi everyone,
My friend and I are working on building a low-code UI platform.
Our goal is to define a system that revolves around a few core dynamic concepts:
+ Addons
+ Dynamic resources
+ Frontend templates (defined via JSON or a specialized DSL)
These templates are responsible for declaring UI components, as well as the configuration needed to connect with dynamic resources and addons from the backend.
While I've managed to map and organize the data layer quite comfortably, I've encountered a challenge on the frontend side (which is built with Flutter). Specifically:
> In a low-code environment, the frontend needs to dynamically select and render appropriate view states and layout types based on template input.
This introduces a deeper level of abstraction than traditional modular frontend setups — where UI is often tightly coupled to concrete implementations, and modules mainly share datasources, not UI layers.
To support this complexity, I'm proposing a new abstraction I call `HyperView`.
It will act as the main export of each module — a composable, declarative UI layer that abstracts over view logic.
Each module will follow this structure:
Data → Presenter → HyperView Layer
The frontend modules will try to expose only the HyperView layer, hiding internal details.
This approach not only improves view reusability, but also aligns well with the principle:
+ "Deep module, narrow interface."
At the app entry point, we simply declare:
+ The set of HyperViews to use
+ A global Stylesheet (optional)
+ Routing configuration
From there, each app entry can assemble its own unique application — by composing different modules that export HyperViews and their related models.
<hyper1.jpg>
<hyper2.jpg>
I'm reaching out to seek guidance or best practices on designing this kind of UI architecture:
+ How to best structure modules around dynamic view types?
+ How to maintain scalability and testability?
+ Are there any frameworks or existing systems that approach UI this way?
Any insights or references would be greatly appreciated.
Thank you!
Manh
--
You received this message because you are subscribed to the Google Groups "software-design-book" group.
To unsubscribe from this group and stop receiving emails from it, send an email to software-design-...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/software-design-book/4b6e2932-eda9-49dd-9b95-aa47ee13a2a8n%40googlegroups.com.
<hyper1.jpg><hyper2.jpg>
On Jun 10, 2025, at 11:56 PM, Phạm Đức Mạnh <phamducma...@gmail.com> wrote:Thank you so much, Dave for your helpful response.
I wanted to ask a follow-up question:
In your opinion, at what scale of project (or at what level of reuse) does it make sense to introduce a dedicated **UI control language** — such as a custom XML/XIB-like format — or at least a declarative layer that extends the native UI SDK’s widget/view/component system?
I’ve seen large-scale products like Google Chat or Google Groups, and I imagine they must also have some internal UI abstraction layer, especially considering that views or modules from one app may need to be embedded into another.Also, is it reasonable to say that in companies with a **cohesive app ecosystem** and a **shared design system**, it's naturally easier to invest in building shared UI layers — like a `HyperView` layer — that sit on top of existing widget frameworks ?
Around me, I’ve observed that some companies attempt to reuse common UI components like “post list view” or “province selector.” However, because these shared views were either too rigid or not well-designed, they often ended up violating the **Single Responsibility Principle** — becoming overly coupled and hard to maintain due to conflicting requirements from multiple apps.
To view this discussion visit https://groups.google.com/d/msgid/software-design-book/5130fa75-5785-4381-babd-c67f97315bf9n%40googlegroups.com.
Thank you again, Dave
I’d like to share a reflection and follow-up thought:
In the past, I primarily worked with UI frameworks like JavaFX and mobile SDKs where object-oriented programming dominated. State was implicit — you interacted directly with views and controllers, and in my opinion, the state management often felt "invisible."
However, in newer declarative technologies like SwiftUI or Flutter, state management takes center stage. The UI instructions tend to becomes a pure function of state, and since views themselves are immutable declarations, the only mutable part left is the state they respond to. This shift made me realize: managing state becomes a form of managing side effects — just like in functional programming.
In this context, I found the rise of hooks (React, flutter_hooks) or effect systems (algebraic effects) quite fascinating (thought I admit I haven’t fully grasped their underlying principles yet).
But even then, I’ve noticed that state management mostly applies to data-bound logic. When it comes to non-data context, such as:
It still feels hard to fully isolate those effects. These parts tend to bleed across components and force some degree of coupling or branching logic.
In practice, I often see teams just split the whole app by platform (web vs. mobile vs. desktop) and handle layout adaptivity independently within each project. But this feels less composable — and not ideal if we want a shared system across platforms.
I wonder if there are any UI patterns that allow child views to be "oblivious" to their platform, layout, or parent context — and yet still behave appropriately when composed into different containers ?
That is, how can we let parent views opt-in to control or constrain their children, without the children needing to understand their host environment ?
Thanks again for inspiring this line of thought — writing this helped clarify a lot of my own confusion too. I'd love to hear thoughts from others who’ve wrestled with these same concerns.
Still, I believe statefulness and side effects are inevitable; my aspiration is to find better ways to contain and isolate them — however hard it may be today, I see great potential. This belief stems from the idea that functional and structured programming are fundamentally equivalent in power, and in practice, pure functions tend to help developers avoid many common pitfalls.
On Jun 14, 2025, at 10:37 AM, Đức Mạnh Phạm <manh...@gmail.com> wrote:
Thank you again, Dave
I’d like to share a reflection and follow-up thought:In the past, I primarily worked with UI frameworks like JavaFX and mobile SDKs where object-oriented programming dominated. State was implicit — you interacted directly with views and controllers, and in my opinion, the state management often felt "invisible."
However, in newer declarative technologies like SwiftUI or Flutter, state management takes center stage. The UI instructions tend to becomes a pure function of state, and since views themselves are immutable declarations, the only mutable part left is the state they respond to. This shift made me realize: managing state becomes a form of managing side effects — just like in functional programming.
In this context, I found the rise of hooks (React, flutter_hooks) or effect systems (algebraic effects) quite fascinating (thought I admit I haven’t fully grasped their underlying principles yet).
But even then, I’ve noticed that state management mostly applies to data-bound logic. When it comes to non-data context, such as:
- Responsive layout
- Adaptive behavior
- Routing
It still feels hard to fully isolate those effects. These parts tend to bleed across components and force some degree of coupling or branching logic.
In practice, I often see teams just split the whole app by platform (web vs. mobile vs. desktop) and handle layout adaptivity independently within each project. But this feels less composable — and not ideal if we want a shared system across platforms.
I wonder if there are any UI patterns that allow child views to be "oblivious" to their platform, layout, or parent context — and yet still behave appropriately when composed into different containers ?
That is, how can we let parent views opt-in to control or constrain their children, without the children needing to understand their host environment ?
Thanks again for inspiring this line of thought — writing this helped clarify a lot of my own confusion too. I'd love to hear thoughts from others who’ve wrestled with these same concerns.
Still, I believe statefulness and side effects are inevitable; my aspiration is to find better ways to contain and isolate them — however hard it may be today, I see great potential. This belief stems from the idea that functional and structured programming are fundamentally equivalent in power, and in practice, pure functions tend to help developers avoid many common pitfalls.
To view this discussion visit https://groups.google.com/d/msgid/software-design-book/6bdd0d5b-68ee-4d88-8c8b-27beada08fdcn%40googlegroups.com.
Dear Mahmoud,
Thank you so much for your comment.
Your description of PWCT 1.x and 2.0’s evolution gave me a lot to reflect on. I find the transition from a custom DSL to using the Ring language itself to define visual components particularly insightful — it reminds me of how Scratch enables users to create stories, games, and animations.
Your approach also made me think of several other technologies that pursue the vision of using a single expressive language to replace the traditional HTML/CSS/JS stack. For instance:
Ur/Web – where the entire web app is written in UrML
Imba – a DSL designed to replace the full web stack
Elm UI – expressing UI in typed functional code, not HTML
Revery – native UI in OCaml, no HTML/CSS
Pollen and Scribble (Racket) – programmable documents
I see PWCT2 as part of this same lineage — where a strong DSL or core language defines not only logic, but also interface and structure, potentially enabling a new kind of hypertext that's purpose-specific and far more powerful than current HTML-based systems.
I’m honestly excited about the idea of building software whose core is a lightweight browser, but instead of interpreting HTML/CSS/JS, it reads a different kind of hypertext — one designed specifically for that domain, with a coherent and expressive syntax.
Thank you again for the inspiration and for sharing the resources. I really appreciate it.
Warm regards,
Manh