You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Re-reading Sam's memo, the main frustration seems to be that responsibility for certain tasks, like building forms, is spread across the stack. For that reason, I propose a clear and clean separation where React's only role is rendering interactive components – maps, charts, forms, etc. – while Django retains responsibility for everything else.
More explicitly, Django is responsible for...
Database
Models
Routing
Views / templates
Back end form processing through Django's forms module
Data API (Django REST), if needed
CMS
React is limited to...
Interactive components
Interact with API and/or static data files baked out in ETL process
Front end form display and user interaction
An interesting question: Why keep routing in Django?
In the short term, the answer is because our CMS of choice, Wagtail, uses Django routing (and myriad other pieces of Django, like template tags, serializers, etc.), and we don’t want to split responsibility across the stack.
With that said, Wagtail comes with a Django REST Framework API and can be run headlessly. We could utilize that and delegate routing to React. This is a bigger step, however. It involves writing custom Python code to correctly serialize CMS-managed content, and we'd have to adopt a React-in-browser framework like Next.js (#378). See details, plus example code bases, here: https://wagtail.org/headless/
With that said (again), I think (?) we like writing Python/Django more than JavaScript, and we abandoned Gatsby because we didn't like the DX of a JavaScript web framework... so there's that.
Background
From Sam's team survey.
What will be the focus of your R&D? Why do you think it's important? Leave background here.
Proposal
What shape do you want your R&D to take? Focus on the big picture: What tasks you want to accomplish, what questions you want to answer.
Deliverables
What artifacts will you produce from your R&D? How will we know when you're done?
Timeline
How long do you expect this R&D to take? What could cause you to need more or less time?
The text was updated successfully, but these errors were encountered: