Skip to content

Commit fd6f0dd

Browse files
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

15 files changed

+2015
-1258
lines changed

pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<junit.version>5.10.1</junit.version>
4040
<slf4j.version>2.0.9</slf4j.version>
4141
<logback.version>1.5.19</logback.version>
42+
<lombok.version>1.18.30</lombok.version>
4243

4344
<!-- Launch4j default properties -->
4445
<bundled.jre.path></bundled.jre.path>
@@ -59,6 +60,14 @@
5960
<version>${logback.version}</version>
6061
</dependency>
6162

63+
<!-- Lombok -->
64+
<dependency>
65+
<groupId>org.projectlombok</groupId>
66+
<artifactId>lombok</artifactId>
67+
<version>${lombok.version}</version>
68+
<scope>provided</scope>
69+
</dependency>
70+
6271
<!-- Testing -->
6372
<dependency>
6473
<groupId>org.junit.jupiter</groupId>

0 commit comments

Comments
 (0)