HeavyWeight

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(New page: How one defines a ''weight'' of a module? In general it is a size of its environment - which is usually expressed by the ''outgoing dependencies'' the module has. If there is a modul...)
Current revision (12:31, 26 March 2019) (edit) (undo)
 
Line 1: Line 1:
How one defines a ''weight'' of a module? In general it is a size of its [[environment]] - which is usually expressed by the ''outgoing dependencies'' the module has.
How one defines a ''weight'' of a module? In general it is a size of its [[environment]] - which is usually expressed by the ''outgoing dependencies'' the module has.
-
If there is a module depending on [[Swing]], it is more [[heavyweight]] than a module which depends only on {{JDK|java/util|ArrayList}} - because the first one requires whole [[JDK]]8 while the latter can run on [[JDK]]8 ''compact 1'' [[LowerProfile|profile]] (which is not just a matter of the name but also of about 30MB of download size and other resources).
+
If there is a module depending on [[Swing]], it is more [[HeavyWeight]] than a module which depends only on {{JDK|java/util|ArrayList}} - because the first one requires whole [[JDK]]8 while the latter can run on [[JDK]]8 ''compact 1'' [[LowerProfile|profile]] (which is not just a matter of the name but also of about 30MB of download size and other resources).
-
The classic refactoring is to increase granularity of your [[modules]] - e.g. split them into (two) parts. Module A (shows a dialog, asks for a number and shows result) can be refactored into two modules: one [[library]] to compute the factorial and another [[JAR]] to show the dialogs and call into the library to get the right results.
+
The classic refactoring is to increase granularity of your [[module]]s - e.g. split them into (two) parts. Module A (shows a dialog, asks for a number and shows result) can be refactored into two modules: one [[library]] to compute the factorial and another [[JAR]] to show the dialogs and call into the library to get the right results.

Current revision

How one defines a weight of a module? In general it is a size of its environment - which is usually expressed by the outgoing dependencies the module has.

If there is a module depending on Swing, it is more HeavyWeight than a module which depends only on ArrayList - because the first one requires whole JDK8 while the latter can run on JDK8 compact 1 profile (which is not just a matter of the name but also of about 30MB of download size and other resources).

The classic refactoring is to increase granularity of your modules - e.g. split them into (two) parts. Module A (shows a dialog, asks for a number and shows result) can be refactored into two modules: one library to compute the factorial and another JAR to show the dialogs and call into the library to get the right results.

Personal tools
buy