Good arguments. I was already starting to think soon after writing it that the idea was going past laziness-as-a-virtue and into the realm of too-much-coupling.
The issue reminds a little of the following article I ran into recently where the author explains that sometimes more lines of code is actually a good thing: http://blog.smartbear.com/the_smartbear_blog/2009/06/please-stop-staying-java-sucks.html Of course ColdFusion is not Java, but maybe that just means we (as in "I") need to take more care in leaving hints on how data is flowing in an application: for instance, which _specific_ 'xe' values are being used in each view. Cheers, Dennis On 7/28/2009 9:16 PM, Charlie Griefer wrote: > I agree. > > Like you, I see the potential benefit, but I'd prefer the more > self-documenting method of listing the xe values explicitly. > > Not that it'd probably have any _significant_ impact, but it would > also mean loading every 'xe' value defined in MG.xml into _each_ > rendered view. There may be a way to cache 'em, but even so... seems > like more overhead than would be worthwhile? > > > On Tue, Jul 28, 2009 at 6:07 PM, Dan Wilson <[email protected] > <mailto:[email protected]>> wrote: > > > Interesting shortcut idea. I can see why you want it, but i'm not > totally sold. > > One of the key principle of good software is readablity. Used > properly, copyToScope leads to very readable code. I'm not sure the > wild card idea promotes good software practices. > > How would any developer know what XEs were valid? > > Listing the desired values gives a sense of what will be in scope. > > > Thoughts? > > Dan > > On 7/28/09, Dennis Clark <[email protected] > <mailto:[email protected]>> wrote: > > What about adding wildcard support to copyToScope()? I think > it'd be nice if > > I could do the following in a view: > > > > <cfset event.copyToScope(variables,"xe.*") /> > > > > That way I could get all the exit event values into a single > structure > > without having to list them all out. > > > > > > On Tue, Jul 28, 2009 at 4:16 PM, Andy Jarrett > <[email protected] <mailto:[email protected]>>wrote: > > > >> > >> Even in MG 3 im using XE's then on the top of most of my views I > >> generally have a <cfscript> block like: > >> > >> <cfscript> > >> xe.link1 = viewState.getValue('xe.link1'); > >> xe.link2 = viewState.getValue('xe.link2'); > >> </cfscript> > >> > >> That way they are set for the whole of the view and keeps my > >> event.linkTo() links cleaner. > >> > >> <a href="#event.linkTo(xe.link1)#">Link 1</a> > >> > >> > >> > >> On Jul 24, 8:35 am, Sean Corfield <[email protected] > <mailto:[email protected]>> wrote: > >> > Why not: > >> > > >> > <a href="#event.linkTo( event.getValue('xe.forgotPassword') > )#">Forgot > >> > Password?</a> > >> > -- > >> > Sean A Corfield -- (904) 302-SEAN > >> > Railo Technologies US --http://getrailo.com/ > >> > An Architect's View --http://corfield.org/ > >> > > >> > "If you're not annoying somebody, you're not really alive." > >> > -- Margaret Atwood > >> > > >> > > > > > > > > > > -- > “Come to the edge, he said. They said: We are afraid. Come to the > edge, he said. They came. He pushed them and they flew.” > > Guillaume Apollinaire quotes > > > > > > -- > I have failed as much as I have succeeded. But I love my life. I love > my wife. And I wish you my kind of success. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en For more about Model-Glue, check http://www.model-glue.com . -~----------~----~----~----~------~----~------~--~---
