Timothy Perrett wrote:
> Chris,
> 
> I read your comments with interest - just to clarify, are you against
> changing code / would prefer a configuration file? I sort of got that
> vibe from some of your posts... Personally, im not down with
> configuration files and prefer code that configures code.

No, I prefer "wiring" configurations to be in code. Certain artifacts 
however, like localized strings or environmental configurations that 
depend on the server (dev/qa/prod), seem better off externalized.

I suppose you got that vibe from the comment I made a bit earlier, about 
needing to recompile to reflect a change in a dependency configuration 
upstream (in a trait). That was a vague comment rooted in my ignorance 
of the apparently late binding of calls on trait methods. More on that 
later.

> 
> Some of the systems i've got actually use a pattern very similar to
> what DPP detailed - it works fine for me as I use specs and mokkito to
> do testing - have you seen those?

DPP's explanation of how to mock infrastructure code (bound to S, etc) 
made since, but it still feels a bit sketchy. Again, this may be my 
misunderstanding, but he's saying to do something like replace the value 
of the function S.redirectTo, so I can test as needed. So here we go:

S.redirectTo = () => { println("redirect received"); }

Now that value is overwritten. What if I was unit testing a bunch of 
snippets, some of those snippets call the same global function, but I 
need to do per-snippet recordings/inspections of those calls? Must I 
reconfigure the values under S each time? What if I forget one?

I've seen Bill Venner's specs - haven't used it but it looks cool. I've 
not heard of mokkito (and didn't see a relevant link on google), so I 
don't know how these tools might help here. Do share :-)

sincerely,
chris

> 
> Cheers, Tim
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to