I may have misinterpreted the intention? 

I was concerned with this rule:

smartAttribute.userInfo.d2wComponentType = displaySmallIntNumber => 
componentName = "ERD2WDisplaySmallInteger" 

Which implies setting a component name in the model?

Apologies if I'm misinterpreting this. 

-- 
Dr. Mark Wardle
Consultant Neurologist, Cardiff, UK
(Sent from my mobile)


On Saturday, 5 May 2012 at 16:42, Ramsey Gurley wrote:

> I wouldn't put component names in the model.  I hope no one thought I 
> suggested it :-)
> 
> I think specifying what value the attribute holds when the actual attribute 
> value is very broad (password vs regular string) is perfectly acceptable 
> though.
> 
> Ramsey
> 
> On May 4, 2012, at 10:28 PM, Mark Wardle wrote:
> > Isn't there a difference between including additional information about a 
> > value (eg isLarge as in Anjo Krank's example) and  putting in a 
> > pseudo-component name? 
> > 
> > The former clearly belongs in the model, the latter in the view. 
> > 
> > I'd tend to use the user info as hints to refine the description of the 
> > model so that the view's rule engine can make better defaults when the 
> > hints are provided in the model. 
> > 
> > Doesn't anything else break MVC, even if you use pseudo-component names? 
> > Particularly if you have keys named d2w-xxxx in your model! 
> > 
> > -- 
> > Dr. Mark Wardle
> > Consultant Neurologist, Cardiff, UK
> > (Sent from my mobile)
> > 
> > 
> > On Thursday, 3 May 2012 at 18:33, David Holt wrote:
> > 
> > > Hi all,
> > > 
> > > A few of us have been discussing creating an additional default rule set 
> > > for Modern D2W applications based on a new optional key in the user info 
> > > dictionary and the existing prototypeName for an attribute.
> > > 
> > > We were thinking of using a new key such as d2wComponentType = mailto as 
> > > a new key that sets the default component to be used for an attribute. We 
> > > were thinking that if there was no key the fallback could be to using the 
> > > prototypeName from entity modeler, and if neither of those is available 
> > > to go with the current rules.
> > > 
> > > Given that there are now so many little specialized components available 
> > > in Wonder for all sorts of different things, we are hoping to avoid 
> > > continuing to have to create a bunch of rules such as:
> > > 
> > > 50 : propertyKey like '*Post' => componentName = "ERD2WEditLargeString" 
> > > [com.webobjects.directtoweb.Assignment] because the current rules are not 
> > > very specific (the default would just be EditString).
> > > 
> > > Replacing them with more generic rules such as: 
> > > 
> > > 35 : (smartAttribute.userInfo.d2wComponentType = displaySmallIntNumber => 
> > > componentName = "ERD2WDisplaySmallInteger" 
> > > [com.webobjects.directtoweb.Assignment]
> > > 35 : (smartAttribute.userInfo.d2wComponentType = editSmallIntNumber => 
> > > componentName = "ERMD2WEXTEditSmallInteger" 
> > > [com.webobjects.directtoweb.Assignment]
> > > 
> > > 25 : (smartTaskDisplay = 1 and smartAttribute.prototypeName = 
> > > 'intNumber') => componentName = "ERMD2WEXTDisplay_intNumber" 
> > > [com.webobjects.directtoweb.Assignment]
> > > 25 : (smartTaskEdit = 1 and smartAttribute.prototypeName = 'intNumber') 
> > > => componentName = "ERMD2WEXTEdit_intNumber" 
> > > [com.webobjects.directtoweb.Assignment]
> > > 
> > > Given that Wonder was created by geniuses I can't imagine that this idea 
> > > has been overlooked. What are the drawbacks to the approach that are we 
> > > missing?? Or do you think it's a good idea?
> > > 
> > > Thanks,
> > > David
> > > _______________________________________________
> > > Do not post admin requests to the list. They will be ignored.
> > > Webobjects-dev mailing list ([email protected] 
> > > (mailto:[email protected]))
> > > Help/Unsubscribe/Update your Subscription:
> > > https://lists.apple.com/mailman/options/webobjects-dev/mark%40wardle.org
> > > 
> > > This email sent to [email protected] (mailto:[email protected]) 
> > 
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Webobjects-dev mailing list      ([email protected] 
> > (mailto:[email protected]))
> > Help/Unsubscribe/Update your Subscription:
> > https://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com
> > 
> > This email sent to [email protected]
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to