• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Direct 2 Web - which rule files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Direct 2 Web - which rule files?


  • Subject: Re: Direct 2 Web - which rule files?
  • From: David Avendasora <email@hidden>
  • Date: Mon, 15 Jun 2009 18:01:01 -0400


On Jun 15, 2009, at 5:17 PM, David LeBer wrote:


On 15-Jun-09, at 3:33 PM, David Avendasora wrote:

Hey Kieran,

I believe that any given application or framework can only have two files: user.d2wmodel and d2w.d2wmodel (user.d2model would normally be maintained by the Assistant). If you have an application with 3 D2W frameworks, then you'd have a total of 8 files to work with. The rule with the _highest_ priority number will win. I'm not sure what happens if two rules have the same priority though.

The reading I've done says that only the two 'user' and 'd2w' rule files are supported by default, which leads me to believe you could use others if you wished, but you might need to create your own D2W factory subclass to do so (or something). I've never had the need.


In the bad old days, you would try to avoid editing the user.d2wmodel file as the Assistant would stomp all over your changes. However, since I don't use the Assistant, I recommend that others not, and it may not even work anymore,

Keep in mind that the D2JC Assistant works really well and they both use the same file. So, I'd qualify any recommendation to manually modify the user.d2wmodel file with the statement "only if you plan on _never_ using the file with a D2JC project". I just want to avoid people in the future that google "user.d2wmodel" and seeing unqualified recommendations like what you've written below. It could be confusing to all the throngs of D2JC users that there will be in the near future. (Bwahahahahaha)


Dave

I follow the following convention:

user.d2wmodel file - rules that are application specific i.e: not generic enough to be reusable.
d2w.d2wmodel file - rules that are generic and can be reused - i.e: base rules for your look, or rules that define default behaviour for your model


Remember, if you use -D2WTraceRuleFiringEnabled YES as a launch argument, you can see all the rules fire so you'll know which one is doing what.

And the virtual log4j loggers that are available from Wonders log4j config page.


i.e:
// these two are enabled when you turn on rule tracing in the ERD2WDebugFlags
log4j.category.er.directtoweb.rules.D2WTraceRuleFiringEnabled=DEBUG
log4j.category.er.directtoweb.rules.ERD2WTraceRuleFiringEnabled=DEBUG

er.directtoweb.rules.displayPropertyKeys.cache
er.directtoweb.rules.displayPropertyKeys.candidates
er.directtoweb.rules.displayPropertyKeys.fire


Dave

On Jun 15, 2009, at 2:03 PM, Kieran Kelleher wrote:

OK, as I add D2W into existing apps, I may ask some dumb questions this year, so bear with me ;-)

Question: For a typical app having D2W and the essential Wonder D2W frameworks too, what are all the rule files that get picked up? Is it only ones named d2w.d2wmodel and user.d2wmodel files or is it all and any file *.d2wmodel?

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: 	http://codeferous.com
blog: 	http://davidleber.net
profile:	http://www.linkedin.com/in/davidleber
twitter:	http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Direct 2 Web - which rule files? (From: Kieran Kelleher <email@hidden>)
 >Re: Direct 2 Web - which rule files? (From: David Avendasora <email@hidden>)
 >Re: Direct 2 Web - which rule files? (From: David LeBer <email@hidden>)

  • Prev by Date: Re: D2WQueryPage queryBindings creating an "OR" vs an "AND"
  • Next by Date: Re: Hudson and Client-Side Classes
  • Previous by thread: Re: Direct 2 Web - which rule files?
  • Next by thread: Re: Direct 2 Web - which rule files?
  • Index(es):
    • Date
    • Thread