I’ve written an example app (the usual todo list) showing how the Model-View-Controller (MVC) pattern can be applied to Anvil apps:
https://anvil.works/build#clone:RHNOQUKUGAUQ4KLZ=SWBITLDPNUSV6OGEIKZ4RJRW
It uses the (experimental) atomic module from Anvil Labs along with Anvil’s Portable Classes.
Models are portable classes representing the domain being modelled. They are entirely standalone and have no knowledge of any other part of the app.
Views are ordinary forms - concerned only with displaying content and responding to user events.
Controllers encode the business logic of the app - that’s where atomic is doing its work.