views:

15

answers:

1

My requirements are that Ads have a definite size, could be different media types (although I'd like to focus on Images first) and need to have their impressions tracked

I'm using Spring-MVC and will likely have a service that will retrieve all the relevant ad information

adService.getAdsForPage("news");
adService.getFeaturedAd("news");

and so on...

My question is, what will my view be responsible for? I need to track impressions, and I can only really think of how to do that on the server side. But what would my view look like.

I'd like any example code, ideas, or a link to a page that has some in depth discussion of this topic

+1  A: 

The view has just to display the ad.

<img src="${adService.imageUrl}" />

All the business stuff can be handled in adService. You can for example add a counter to the getImageUrl() method.

BalusC