Commit fd6f0dd
committed
Refactor: Implement MVC pattern and reduce boilerplate code
Major architectural improvements:
- Reduced main class from 1,284 to 33 lines (97% reduction)
- Implemented MVC pattern with clear separation of concerns
- Added Lombok dependency to eliminate boilerplate
New structure:
- controller/: MainController (event handling and coordination)
- model/: Domain objects (EmulatorStatus, DeviceConfiguration, etc.)
- view/: UI components (MainView, SdkConfigPanel, AvdGridPanel, LogPanel, DialogFactory)
- util/: Extracted utilities (AndroidVersionMapper, DeviceNameFormatter, ThemeUtils)
Benefits:
- Single Responsibility Principle applied to all components
- Improved testability (UI separated from logic)
- Enhanced maintainability (smaller, focused classes)
- Better code organization (19 files vs 6, avg ~150 lines each)
- Eliminated God Class anti-pattern
Addresses feedback: "molto boilerplate", "classe main gigante", "niente oggetti di business"1 parent a756557 commit fd6f0dd
File tree
15 files changed
+2015
-1258
lines changed- src/main/java/net/nicolamurtas/android/emulator
- controller
- model
- util
- view
15 files changed
+2015
-1258
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
62 | 71 | | |
63 | 72 | | |
64 | 73 | | |
| |||
0 commit comments