In a recent Mach-II discussion on Listeners and Services (http://groups.google.com/group/mach-ii-for-coldfusion/browse_thread/thread/a13d7ba9578dae1e?hl=en), Joel Cox made the comment "Your listener *should* be fairly simple, just passing the necessary event args into the service. Let the service itself do the heavy lifting." As I thought about this comment, I realized that I may actually be using Listeners wrong. To be honest, I think I'm doing the exact opposite of what Joel suggests. In fact, I know I am after reading this quote in the Listeners Wiki entry: "It is important to mention that it is not recommended that any business logic appear here, but is kept outside of Mach-II."
After reading through the Wiki entry I realize that you should use Listeners for getting Mach-II logic over to your Services, and keep that logic out of your model. In my (first) Mach-II application, I've been using Listeners a little differently. I've basically been using them to do the heavy lifting, with most of my business logic being in my Listeners instead of my Service components. My Service components really just have a few basic CRUD methods that interact with my Bean/DAO/Gateway components, and that's about it. So it looks like I need to reverse my thinking and get all of my business (non Mach-II) logic into my Service components. Does that sound about right? Since I am somewhat of a beginner to Mach-II, I would love to see a discussion on how some of you use Listeners to interact with your Services. -- Thanks, Eric Cobb http://www.cfgears.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to Mach-II for CFML list. 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/mach-ii-for-coldfusion?hl=en SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/ Wiki / Documentation / Tickets: http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/ -~----------~----~----~----~------~----~------~--~---
