atomic14 / atomic14/diy-esp32-epub-reader
Split the rendering of the display from the model objects
- Dominant language
- C
- Stars
- 867
- Forks
- 111
- PR merge metrics
- No merged PRs in 30d
Description
It would be good to move towards the MVC (Model View Controller) pattern for the UI to make the code a bit cleaner. At the moment classes like the EpubList and EpubReader have everything in them with some of the controller code in the main.cpp as well.
Ideally, we'd have a model class that contains the state, a controller class that responds to user events and updates the model and then a view class that renders the current state of the model.
User Event (touch, button_press) -> Controller -> Model Update -> View Rendered
This will be a fairly chunky refactor.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading EpubList and EpubReader, then inspect the controller-related code in main.cpp. Trace touch and button_press events through the current model and rendering paths before defining the separation described in the issue. Done means the UI state, event handling, and rendering responsibilities are separated into model, controller, and view classes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100