You'd have to lay out all of the details of the use case for us to really lock this, but let me get you thinking in a direction . . .
You can see my live non-OO site at http://whitehorsemedia.com/articles/index.cfm. On that page you will notice that I have a top four most frequently viewed articles column. Every time someone goes to the articles detail page, the query that returns the single record is accompanied by another query that implements the views field by 1. I would like to list the top four most viewed articles total as well as the top view articles of the week (which I am not exactly sure how to do...). I would like to do the same for article categories, products, etc.
Your ProductService should have access to your ViewCounterService (if you use ColdSpring or LightWire, just use constructor or setter injection to make it available). Then in your various view methods within the product service, call ViewCounterService.addView("Product",ProductID) and the ViewCounterService will add a view of the Product object to whatever ViewCounter table it uses via the ViewCounterDAO which handles all database interaction for the ViewCounter object.
I can make good sense out of most of it, but I don't really understand why you would have access to the viewCounterService from the productService and then call viewCounterService.addView("Product","productid) from within the productService. Why not just call viewCounterService directly from the product details page? Also, would I init the viewCounterGateway and pass it in to a setViewCounterGateway() method in the ProductService and then call the viewCounterGateway as variables.viewCounterGateway.addView("Product","productid")? Thank you and thank you and thank you! -Aaron You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm CFCDev is supported by: Katapult Media, Inc. We are cool code geeks looking for fun projects to rock! www.katapultmedia.com An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org