-
-
Notifications
You must be signed in to change notification settings - Fork 853
Description
Important
If you are not a member of the Volto Team or Developers Team in the Plone GitHub organization, then do not work on or comment on this issue.
PLIP (Plone Improvement Proposal)
Responsible Persons
Proposer: Víctor Fernández de Alba (@sneridagh)
Seconder: Rob Gietema (@robgietema)
Abstract
This PLIP proposes the implementation of a Backend for Frontend (BFF) approach for the Plone 7 frontend (Seven), with @robgietema/nick — referred to as "Nick" — serving as a BFF for Seven.
Note
To clarify, this proposal is not intended to replace anything, but it is intended to provide a new option that currently does not exist. It does not mean converting NickCMS in the default Plone 7 backend.
This PLIP is proposing Nick as an alternative backend for Plone 7 frontend for entry level, technology enthusiasts, personal sites, and alike.
Implementing this approach has several benefits, like easy and effortless deployment in freemium SAAS (the whole stack) by sharing the same Node (backend) server in the same deployment (do you remember Andy and Pete's big green button?).
Motivation
A Backend for Frontend (BFF) is an architectural pattern in which a specialized backend layer is created to serve the needs of a particular frontend or client application. Instead of the frontend directly consuming a generic or monolithic API, the BFF is tailored to supply exactly what the frontend needs in the most efficient and secure way.
Instead of the frontend talk to the backend crossing the network chasm, accesses directly to the data layer through the BFF API, which matches the Plone RESTAPI 1:1. The backend endpoint logic sits in the same Node server instead of a different one (with its own language, platform and framework), simplifying the deployment dramatically.
Assumptions
- Nick will provide a BFF mode where it does not "open a port", but their endpoints can be used as a collection of API methods.
- Clear and up-to-date documentation is crucial for developers to understand, implement, and extend the BFF architecture and usage.
Proposal & Implementation
- Evaluate and document the requirements of the Seven frontend that benefit most from a BFF approach.
- Adapt or extend Nick as a general-purpose BFF for Seven, covering authentication, content retrieval, aggregation, and additional frontend-specific needs.
- Develop comprehensive documentation on:
- What a BFF is and why it is beneficial for Seven.
- How Nick is deployed and maintained as a BFF for Seven.
- Real-world examples, development workflow, best practices, and migration notes for legacy integrations.
- Create migration and integration guides for existing Volto or other Plone frontends to adopt or experiment with Nick as their BFF.
Sketching an ASCII diagram of the two architectures:
Plone 6 traditional deployment:
Volto -> plone.restapi -> Python Plone -> ZODB/RelStorage/RDBMS
Plone 7 traditional deployment:
Plone 7 frontend -> @plone/client -> plone.restapi -> Python Plone -> ZODB/RelStorage/RDBMS
BFF deployment:
Plone 7 frontend -> nickcms/client -> NickCMS -> RDBMS
Deliverables
- Updated/extended Nick BFF service suitable for frontend needs.
- Developer documentation (guide, how-to, cookbook, migration notes) for:
- Setting up and running Nick as BFF
- BFF architecture overview
- Example projects and migration guides
Risks
- Additional infrastructure and maintenance complexity due to an extra backend layer.
- Possibility of duplicated business logic if not managed properly.
- Need to keep documentation in sync with development.
- Training needed for Plone, Volto, and frontend developers new to the BFF pattern.
Participants
- Víctor Fernández de Alba (@sneridagh)
- Rob Gietema (@robgietema)
- Plone Volto Team (@plone/volto-team)
Important
This PLIP is for Plone's core developers and the subsequent issues are part of the organization of this project.
It is not intended for newbies or first time contributors.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status
Status