MODULES / 09 · DART & FLUTTER
Architecture and maintenance
Prerequisites
Modules 1 through 5 and a case study already run.
Learning objectives
Set boundaries between domain, interface and infrastructure. Choose abstractions based on the required behavior.
Suggested activity
Use an application from an earlier module to isolate a rule from the interface. Compare it with a design pattern only when the problem justifies doing so.
O Grimório dos Padrões provides TypeScript examples: study the concepts and implement your activity in Dart. MVC, MVVM, MVP and Clean Architecture are study alternatives, not guaranteed code modules in this index. Use the current version of the chosen repository, synthetic data and its documented validation steps. Record the environment and distinguish real execution, emulation and a local demonstration. These activities are proposals for your own study repository.
Suggested reading
O Grimório dos Padrões, Fantasia Técnica and Masmorra ASCII: compare concepts and apply only those needed by the case study.
Agência Holística · Volume II — Tudo Tem Memória: Use a reading case to discuss flaky tests, observability and the boundaries where a failure should be investigated.
Books & sitesCase studies and references
Labs for this module
These activities connect each laboratory to the lesson. Integration suggestions are adaptations for your own project.
Genetic Engine
In your study repository, implement a fitness function for a small problem using the package’s public contracts. Separate the problem from the search operators.
What to check: Test fitness against independent expected results and swap a selection strategy without changing the problem representation.
Steering Engine
Compose existing behaviors in a small Dart example, keeping movement rules separate from Flutter rendering.
What to check: Run a public-API test without widgets and explain the contract between agent state and behavior.
05 / EXERCISES
Exercises
- 01
Responsibilities
Objective: Draw a dependency map for the chosen case study.
Completion criteria: Explain which modules know about the interface, domain and storage.
- 02
A rule
Objective: Isolate a business decision.
Completion criteria: Call the rule in tests without a UI framework.
- 03
Infrastructure
Objective: Replace data access through a contract.
Completion criteria: Use an alternative implementation in a test without changing the rule.
- 04
Refactoring
Objective: Improve the structure while preserving behavior.
Completion criteria: Show tests before and after the change and explain the reduction in complexity.
- 05
A decision
Objective: Record an architectural choice.
Completion criteria: Compare an alternative and make the context, consequences and limits of the decision explicit.