Skip to end of metadata
Go to start of metadata

Nuts Feature Highlights

What is a "Component"

Before going anywhere, there's an important concept that we have to clarify:

Component, in Yan and Nuts' terminology, is an intelligent factory object that instantiates component instances. It is a piece of object creation logic, an object creation routine. It creates your "BankAccount", "Vehicle", "Fruit" objects.

We call it "intelligent" because Component knows how to resolve dependencies.

Nuts support Components such as: ctor, bean, method and way more.

What is "Nuts"

Nuts is the xml wrapper sub-project for Yan.

Nuts is fast. See Performance Test (Nuts vs Spring) for a benchmark.

Nuts stands for Naming convention based User defineable Tags. This means that the xml tags in Nuts' xml configuration file are extensible. For a non-sense example, you could create your own customized tag that calls a method repeatedly for a thousand times and collect the return value in an array. The tag syntax can look like:

Or, a bit more cleverly, we can create a repeat tag that calls a certain component for x number of times:

Yep, I hear ya. Who the heck would want to do that? For more practical examples, please refer to the following links:

  • No labels