'. '

Use Modular Architecture

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(Double Injection)
(9 intermediate revisions not shown.)
Line 1: Line 1:
-
The example of the JDK as non-modular may be out of date by the time you go to print! :)
+
== Have You Ever Wondered...? ==
-
I'd like some discussion of how you modularize a project that already has a large, non-modular, full-of-spaghetti code base.
+
OK, so you want to prevent [[NetBeans Runtime Container#Manifesto|object-oriented spaghetti mess]] by splitting our systems into into independent modular pieces, however I wonder how to glue them together? Are there some good practices for doing so? Yes, there are and the
-
I think this would resonate with a lot of programmers.
+
[[Use Modular Architecture|Chapter 7]] gives some. For example to glue pieces together you need some ''injection'' to configure all individual components to work together. The [[Use Modular Architecture|Chapter 7]] builds the understanding for this by starting with the most straightforward and hand-coded solutions and then enhances them to cover ''injection'' as provided by [[wikipedia::Spring_Framework| Spring Framework]] as well as latest releases of [[wikipedia::JDK|JDK]].
-
Also, I'd like you to address non-runtime modularization. That is, just enforcing module dependencies at compile time, in the
+
=== Manifesto of Modular Programming ===
-
ant script. It's perfectly valid, requires no additional software like OSGI, but has some pitfalls (Class.forName, etc).
+
 
-
For some organizations that are mistrustful of runtime modularization's performance impact (warranted or not), it's better
+
Get the feel for necessity of [[module system|modular programming]] by reading through the [[NetBeans Runtime Container#Manifesto|manifesto]] and going through the demo described at [[NetBeans Runtime Container]] page.
-
than nothing.
+
 
-
--[[User:RichUnger|RichUnger]] 22:40, 10 April 2008 (UTC)
+
=== Double [[Injection]] ===
 +
 
 +
The [[Use Modular Architecture|Chapter 7]] also mentions that it might be beneficial to join the strength of [[Spring]] (or other [[Dependency Injection]] technology) and [[Lookup]]. The time has passed since then, and the bridge between these two is available. See [[LookupAndSpring]] for more details. We even have a more theoretical explanation why [[singleton]]s need not be evil.

Revision as of 08:47, 8 November 2010

Have You Ever Wondered...?

OK, so you want to prevent object-oriented spaghetti mess by splitting our systems into into independent modular pieces, however I wonder how to glue them together? Are there some good practices for doing so? Yes, there are and the Chapter 7 gives some. For example to glue pieces together you need some injection to configure all individual components to work together. The Chapter 7 builds the understanding for this by starting with the most straightforward and hand-coded solutions and then enhances them to cover injection as provided by Spring Framework as well as latest releases of JDK.

Manifesto of Modular Programming

Get the feel for necessity of modular programming by reading through the manifesto and going through the demo described at NetBeans Runtime Container page.

Double Injection

The Chapter 7 also mentions that it might be beneficial to join the strength of Spring (or other Dependency Injection technology) and Lookup. The time has passed since then, and the bridge between these two is available. See LookupAndSpring for more details. We even have a more theoretical explanation why singletons need not be evil.

Personal tools
buy