modularization of legacy features by relocation and reconceptualization: how much is enough?
DESCRIPTION
CSMR'12TRANSCRIPT
![Page 1: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/1.jpg)
Modularization of Legacy Features by Relocation and Reconceptualization:
How Much is Enough?
— ―
Andrzej Olszak and Bo Nørregaard Jørgensen
![Page 2: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/2.jpg)
Agenda
I. Prologue: The Case of NDVisII. Relocation & ReconceptualizationIII. Experimental DesignIV. Results
— 2 —
![Page 3: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/3.jpg)
— 3 —
Prologue
“Can you help us to migrate NDVis to the NetBeans Module System?”
![Page 4: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/4.jpg)
— 4 —
Dividing the monolith
Module System ≠ modularity Features are great candidates for
Modules!Feature is the unit of program functionality
…but getting there is difficult
![Page 5: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/5.jpg)
— 4 —
Dividing the monolith
Module System ≠ modularity Features are great candidates for
Modules!Feature is the unit of program functionality
…but getting there is difficult
Cont ro l l e r
Mode l
View
feature A feature B feature C
![Page 6: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/6.jpg)
— 4 —
Dividing the monolith
Module System ≠ modularity Features are great candidates for
Modules!Feature is the unit of program functionality
…but getting there is difficult
Cont ro l l e r
Mode l
View
feature A feature B feature C
![Page 7: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/7.jpg)
— 4 —
Dividing the monolith
Module System ≠ modularity Features are great candidates for
Modules!Feature is the unit of program functionality
…but getting there is difficult
Cont ro l l e r
Mode l
View
feature A feature B feature C
Scattering
![Page 8: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/8.jpg)
— 4 —
Dividing the monolith
Module System ≠ modularity Features are great candidates for
Modules!Feature is the unit of program functionality
…but getting there is difficult
Cont ro l l e r
Mode l
View
feature A feature B feature C
Scattering
Tangling
![Page 9: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/9.jpg)
— 4 —
Dividing the monolith
Module System ≠ modularity Features are great candidates for
Modules!Feature is the unit of program functionality
…but getting there is difficult
Cont ro l l e r
Mode l
View
feature A feature B feature C
Scattering
Tangling
![Page 10: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/10.jpg)
— 5 —
The case of NDVis
Mixin layers, aspects, etc. “Let’s stick to Java”
Independent feature-modules Reusable core modules
+ →
NDVis monolith
Featureous tool
![Page 11: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/11.jpg)
— 6 —
“Can we learn more about these restructurings?”
![Page 12: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/12.jpg)
— 7 —
Treatment of classes! Relocation
i.e. move-class refactoring Simple Automatable Classes remain tangled
pkg2
pkg1
feature A feature B feature C
![Page 13: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/13.jpg)
— 7 —
Treatment of classes! Relocation
i.e. move-class refactoring Simple Automatable Classes remain tangled
pkg2
pkg1
feature A feature B feature C
→feature A feature Bfeature C
![Page 14: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/14.jpg)
— 7 —
Treatment of classes! Relocation
i.e. move-class refactoring Simple Automatable Classes remain tangled
pkg2
pkg1
feature A feature B feature C
→→
feature A feature Bfeature C
![Page 15: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/15.jpg)
— 7 —
Treatment of classes! Relocation
i.e. move-class refactoring Simple Automatable Classes remain tangled
Reconceptualizationi.e. move-method refactoring Complex Inherently manual Untangles classes
pkg2
pkg1
feature A feature B feature C
→→
feature A feature Bfeature C
feature B
feature A
Student
feature C
![Page 16: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/16.jpg)
— 7 —
Treatment of classes! Relocation
i.e. move-class refactoring Simple Automatable Classes remain tangled
Reconceptualizationi.e. move-method refactoring Complex Inherently manual Untangles classes
pkg2
pkg1
feature A feature B feature C
→→
feature A feature Bfeature C
feature B
feature A
Student
feature C
→Studentread()eat()sleep()
feature B
feature C
feature A
![Page 17: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/17.jpg)
— 8 —
Experimental construct
Tang
ling
in p
kgs
Scattering in pkgs
Original design
![Page 18: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/18.jpg)
— 8 —
Experimental construct
Tang
ling
in p
kgs
Scattering in pkgs
Original design
Manual relocation + reconceptualization
![Page 19: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/19.jpg)
— 8 —
Experimental construct
― Q1 ―Manual modularization vs. Max relocation?
Tang
ling
in p
kgs
Scattering in pkgs
Max relocation
Original design
Manual relocation + reconceptualization
![Page 20: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/20.jpg)
— 8 —
Experimental construct
― Q1 ―Manual modularization vs. Max relocation?
― Q2 ―Isolated impact of manual reconceptualization?
Tang
ling
in p
kgs
Scattering in pkgs
Max relocation
Original design
Manual relocation + reconceptualization
Max relocation + manual reconceptualization
![Page 21: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/21.jpg)
— 8 —
Experimental construct
― Q1 ―Manual modularization vs. Max relocation?
― Q2 ―Isolated impact of manual reconceptualization?
― Q3 ―Relative impact of manual reconceptualization?
Tang
ling
in p
kgs
Scattering in pkgs
Max relocation
Max reconceptualization
Original design
Manual relocation + reconceptualization
Max relocation + manual reconceptualization
![Page 22: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/22.jpg)
— 9 —
Q1: Automatic Relocation design
Maximum relocation No reconceptualization
Multi-objective relocation of classes in original program—Scattering—Tangling—Cohesion—Coupling
Automatic relocation significantly more efficient Time-intensity: 35 hours vs. 5 minutes
0.05 0.1 0.15 0.2 0.25 0.3
0
0.05
0.1
0.15
0.2
0.25
Scattering
Tan
glin
g
Original
Manual
Automatic
![Page 23: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/23.jpg)
— 10 —
Q2: Manual+Automatic design
Maximum relocation Manual reconceptualization
Multi-objective relocation of classes in manual design
Contribution of manual reconceptualization is minor
Manual approach better at selected features
0.05 0.1 0.15 0.2 0.25 0.3
0
0.05
0.1
0.15
0.2
0.25
Scattering
Tan
glin
g
Original
Manual
Manual+Automatic
Automatic
![Page 24: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/24.jpg)
— 11 —
Q3: Automatic Split design Maximum relocation Maximum reconceptualization
Simulated clean splits in manual design
Multi-objective relocation of classes in resulting design
Manual restructuring achieved a high degree of reconceptualization
Maximum effects of reconceptualization << relocation
0.05 0.1 0.15 0.2 0.25 0.3
0
0.05
0.1
0.15
0.2
0.25
Scattering
Tan
glin
g
Original
Manual
Manual+Automatic
Automatic
split
AutomaticStuden
tread()eat()sleep()feature
B
feature C
feature A
![Page 25: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/25.jpg)
— 12 —
Conclusions
Reconceptualization with mixin layers or aspects would not give us a lot…
Focus on relocation – reconceptualize sparingly Dynamic dependencies among features Module system constraints
Better yet: Relocate automatically before you
reconceptualize!
![Page 26: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/26.jpg)
― END ―
![Page 27: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/27.jpg)
![Page 28: Modularization of Legacy Features by Relocation and Reconceptualization: How Much is Enough?](https://reader035.vdocument.in/reader035/viewer/2022081603/558cfa08d8b42a0a6f8b46b5/html5/thumbnails/28.jpg)
Controller
Model
View
feature Afeature B
feature C
Treatment of classes
→→
feature Afeature B
feature C
→
Studentread()eat()sleep()
feature B
feature C
feature Bfeature C
Student
feature C
feature B
eat(){ if (values.length==0){ read(); return; }
this.numbers = values; number = values.length; quicksort(0, number - 1);
}
←… ←
→