Thanks Paul > > Your factory will have to be context aware in order to compose the > User correctly. Strike that. It's not the Factory's job to know the > context. Maybe, it should accept an argument to a createInstance() > method like "LoginUser" or "User" (implying full validation) and > return a correctly composed User object. > Yip. Thats the idea. The factory will then pass the concrete strategy into the bean via a setter method (just to keep a standard as I'm using setter injection with Coldspring for the singletons).
> This scenario sounds familiar. Hunt back in the CFCDEV archive, I > believe Brian Kotek suggested a similar setup for Transfer Objects. > His concept included a bridge pattern for Javascript validation as > well. It looked quite robust. > Thanks, will do. Javascript validation is something I had on my 'hitlist'. I'm spending a lot of time making my cf code have all business logic in cfc's then breaking those rules for js validation ... more 'smells' to address! Hopefully Brian's solution means I don't have to think about it myself (although Bridge isn't a pattern that has fully sunk into my brain yet :-) ) > Anyway, I like the idea. Let us know how it goes! > Will do! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" 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/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
