Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: restore

Tapestry's Inversion of Control container is a built-in Tapestry module based on inversion of control (IoC), a design approach that allows a working system to be fabricated from many small, easily testable pieces.

Div
stylefloat:right
titleRelated Articles
classaui-label
Content by Label
showLabelsfalse
showSpacefalse
titleRelated Articles
cqllabel = "ioc" and space = currentSpace()

An additional benefit of using IoC is that, by breaking a complex system into small pieces, it becomes easier to modify and extend the system, by overriding or replacing selected parts of the system.

...

The core concept of Tapestry IoC is that the Java language itself is the easiest and most succinct way to describe object creation and method invocation. Any approximation in XML is ultimately more verbose and unwieldy. As the examples show, a small amount of Java code and a handful of naming conventions and annotations is far simpler and easier than a big chunk of XML.

...

Services are identified by a unique id. Typically, a service id matches the unqualified name of the service interface, but this is simply a convention.

Note

The evolutionary direction of the Tapestry IoC is to eventually eliminate service ids and work totally in terms of service interfaces and marker annotations.

Services are aggregated into modules:

...

The point of Injection is a field, method parameter, or constructor parameter that receives an injected value. The type of service (or other dependency) is determined by the type of the field or parameter. Often, annotations further identify what is to be injected, or in the case of field injection, that an injection is required.

IoC Subtopics

Children Display