On Wed, Apr 30, 2008 at 12:27 PM, Sonny Gill <[EMAIL PROTECTED]> wrote:
> ApplicationContext application = appFactory.newApplication( new
> Assembler[][][]
> {
> { // Swing layer
> {
> new ModuleName( "Swing" ),
> new ViewAssembler()
> }
> },
> { // Domain layer
> {
> new ModuleName( "Domain" ),
> new DomainAssembler()
> }
> },
> { // Infrastructure layer
> {
> new ModuleName( "Infrastructure" ),
> new InfrastructureAssembler() }
> }
> } );
>
> For someone new to Qi4j, that can be a bit hard to understand if you
> remove the comments.
Ahh.. I see that it is quite easy to remove the need for commenting by
using LayerName -
ApplicationContext application = appFactory.newApplication( new Assembler[][][]
{
{
{
new LayerName("Swing layer" ),
new ModuleName( "Swing module" ),
new ViewAssembler()
}
},
{
{
new LayerName( "Swing layer" ),
new ModuleName( "Domain module" ),
new DomainAssembler()
}
},
{
{
new LayerName( "Swing layer" ),
new ModuleName( "Infrastructure" ),
new InfrastructureAssembler() }
}
} );
Cool! :)
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev