Hmmm… that’s pretty intriguing – I’ve got a similar problem with our product which makes use of castle and has about 30 assemblies and around 20 configuration files stashed in the assemblies, and though it’s working alright now there has been a lot of pain involved in getting there… at the moment we just end up duplicating a fair bit of redundant stuff for registering things like tcp/ip WSE 3.0 services – and every time I have to manipulate the config files it pleads “fix me” ;o) … I could definitely see a Boo DSL being an elegant way to solve this :)

 

Let me know how you get on :)

 

Chez,

 

 - Alex

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ayende Rahien
Sent: Thursday, 17 August 2006 5:49 p.m.
To: [EMAIL PROTECTED]; castleproject-users@lists.sourceforge.net
Subject: [Castle-users] Boo DSL for Windsor

 

After getting lost in 19 configuration files for Windsorm (most of which was duplicated), I broke down and did it in code, with some external help from Boo.

I’m thinking about something along the lines of:

 

import System

import Rhino.Commons

import My.Project

 

addComponent ( repository, IRepository, NHRepository )

 

addComponent ( employee_repository, IRepository[of Employee], ActiveDirectoryRepository )

 

addComponent ( email, IEmailSender, EmailSender):

                Parameters:

                                Host: “localhost”

                                Port: 25

 

addComponent ( validation, IValidator, Validator, Parameters: { Email: @email } )

 

 

Not sure how/if facilities configuration will be done this way.

The nice thing about this is the first and second lines, which are generic parameters (which Boo finally supports!), instead of the tediously long assembly qualified names.

For me the killer feature is being able to do this (beside not doing XML):

 

services = (

                "http://localhost/1.asmx",

                "http://localhost/2.asmx",

                "http://localhost/3.asmx",

)

for service in services:

                addComponent ( "{service}_service", IWebServiceInterface, WebServiceInterface)

 

Without having to duplicate stuff in the configuration (and I have a situation where I need this very often).

 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
CastleProject-users mailing list
CastleProject-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/castleproject-users

Reply via email to