Hi everyone ![]()
Iโve been working on a Python web framework called Duck Framework, and recently designed a UI architecture called Lively Components.
The goal is to make it easier to build interactive server-driven UIs while keeping development mostly in Python and HTML.
Iโd love to share the design and get feedback from the community.
Core Idea
The system is based on two types of components:
Frozen Components
Frozen components are rendered once and reused across requests.
Typical examples include:
- Layouts
- Headers
- Navigation bars
- Footers
Once rendered, their output is cached and reused, avoiding unnecessary rendering work.
Dynamic Components
Dynamic components are instantiated and rendered per request.
They are used for parts of the UI that depend on:
- request data
- user state
- frequently changing information
Examples include:
- dashboards
- user widgets
- data-driven sections
Rendering Pipeline
Hereโs a simplified explanation of how the system works:
- A browser sends an HTTP request.
- The framework builds a component tree.
- Frozen components reuse cached render output.
- Dynamic components are instantiated and rendered for the request.
- The results are combined into the final HTML response.
Goals of the Architecture
The design aims to provide:
Python-first UI development
high rendering performance through frozen components
clean component-based page architecture
server-driven UI without heavy frontend frameworks
Documentation
More details here:
Feedback
Iโd really appreciate feedback on things like:
- the frozen vs dynamic component model
- potential edge cases in component caching
- comparisons with similar server-driven UI systems
Thanks!
