Hi Sam,

On 11/30/06 5:42 PM, "Sammy Larbi" <[EMAIL PROTECTED]> wrote:
>> Given that I'm generating the files, it matters less to me whether they are
>> validated or not as I can validate metadata pre-generation, but I still like
>> the self validating benefits of the XML files with DTD enough to use them as
>> a best practice.
> Now, when you say "self validating" ... Might you explain what all it
> validates?  I'm having trouble understanding what benefits that provides
> above the programmatic variety.

Firstly it captures any silly syntax errors like missing brackets. Secondly
it makes sure that the right properties are in the right places (if a bean
must have 1..n attributes, it makes sure there is at least one attribute tag
under every bean tag) and thirdly it makes sure nothing is in the wrong pace
(if you can't have a bean tag under an attribute tag, it doesn't let you).

>> FWIW, my conversion came when I actually started USING the programmatic
>> config for LightWire. There were cases where I was getting funky errors and
>> a DTD (and a little additional CF validation) would have helped.
> I'd love to try and use both versions, if you have them available, to
> get a better understanding of what you mean.   As I mentioned in the
> post, lately all my configuration has been pretty simple - so I can
> easily be overlooking something.  But even where I need "categories" (as
> I think Joe Rinehart called them, or perhaps "sections"), I still find
> it easier to do something like:
> db.dsn = "datasource";
> db.username ="sam";
> db.password = "password";
> app.title_background_color = "##000069";
> app.title_text_color = "white";

Sure. Main driver of this is DEEP data. Those properties don't have a
relationship so a DTD wouldn't help much. Here is a snippet of LightWire
config file:

    // LightBase
  
variables.Bean.LightBase.Singleton = 1;

variables.Bean.LightBase.Path = "lightbase.com.LightBase";

variables.Bean.LightBase.ConstructorDependencies =
"LightWire,BaseController,Render";



// Render rendering component

variables.Bean.Render.Singleton = 1;

variables.Bean.Render.Path = "lightbase.com.view.Render";



// Newsletter Service

variables.Bean.NewsletterService.Singleton = 1;

variables.Bean.NewsletterService.Path =
"lightbase.com.model.Newsletter.NewsletterService";

variables.Bean.NewsletterService.ConstructorDependencies =
"LightWire,NewsletterDAO";

variables.Bean.NewsletterService.MixinDependencies = "";

variables.Bean.NewsletterService.SetterDependencies = ""; 

variables.Bean.NewsletterService.ConstructorProperties.ObjectName =
"Newsletter"; 

   

// Newsletter DAO
 
variables.Bean.NewsletterDAO.Singleton = 1;

variables.Bean.NewsletterDAO.Path = "lightbase.com.model.BaseDAO";

variables.Bean.NewsletterDAO.ConstructorDependencies = "LightWire";

variables.Bean.NewsletterDAO.MixinDependencies = "";

variables.Bean.NewsletterDAO.SetterDependencies = ""; 

variables.Bean.NewsletterDAO.ConstructorProperties.ObjectName =
"Newsletter"; 
    
variables.Bean.NewsletterDAO.ConstructorProperties.Datasource =
"newsletter"; 
    
variables.Bean.NewsletterDAO.ConstructorProperties.TableName =
"newsletter_Newsletter"; 


I think this would be better in XML.

Best Wishes,
Peter





You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to