Module 3 — Patterns and Architecture
Module 2 gave you the building blocks — widgets, sizers, menus, and dialogs. This module is about how to use them well. Real applications are not just collections of widgets; they have structure, they manage state, they read and write files, and they stay responsive while doing slow work in the background.
The lessons here cover the patterns that appear in every non-trivial wxRuby3 application. By the end you will know how to structure an app so it stays maintainable as it grows, how to work with data-rich widgets like lists and trees, how to handle files and user preferences cleanly, and how to move slow work off the UI thread so the app never freezes.
Lessons in this module
- Event handling in depth — Propagation, skip, custom events, and binding strategies
- Application structure — Splitting across files, separating concerns, shared state patterns
- Data-driven widgets — ListCtrl, TreeCtrl, and managing collections of data
- File I/O and preferences — FileDialog, reading and writing files, dirty state, user preferences with Wx::ConfigBase
- Threading: keeping the UI responsive — Background threads, posting events, progress dialogs
- App: file processor — A complete multi-panel app combining everything in this module
What you will have by the end
A solid understanding of how wxRuby3 applications are structured at scale, and a working file processor app that accepts dragged files, processes them in a background thread with a live progress display, and saves results — all without the UI ever freezing.