Describe ASP's capability for creating a rotating Web banner.
Advertisement Rotator Component in ASP
As you browse through Web sites, you have undoubtedly seen many click able banner ads.
You probably encounter different banner ads each time you return, even after just a minute or two. The ASP Advertisement Rotator component lets you do this on your own Web site.
With this component, you can display ads randomly to your users and track the traffic from your site to others through your server's logs.
You can use the Advertisement Rotator to display banner ads, to advertise your favorite sites or generate revenue by directing users to a commercial site. But you're not limited to other sites' ads. You can use the banners to promote other sections of your own site, or even as additional content for the page.
The Advertisement Rotator component works with two additional files: a redirection file and a schedule file.
The redirection file is optional, but it lets you do processing after a user clicks on a banner ad (such as which ads your users are clicking on). The schedule file determines the size and rotation of the banners you have created or downloaded.
The next lesson describes how to create an Advertisement Rotator schedule file.
Abstraction with Routes
Somewhat similar to service interfaces and their implementations in WCF, routes give the ASP.NET Web API service developer a layer of abstraction between what the callers see and the underlying implementation.
In other words, you can map any URL to any controller method.
When the API signature (i.e., the REST URL) is not hard-wired to a particular interface, class, or .svc file, you are free to update your implementation of that API method, as long as the URL specification for that method remains valid.
One classic example of using URLs to handle changing implementations is in the case of service versioning.
By creating a new route with a "v2" (or similar) embedded in the URL, you can create an arbitrary mapping between an implementation and a versioning scheme or set of versions that does not exist until sometime later. Thus, you can take a set of controllers and decide a year from now that they will be part of the v2 API. Later on in this book, you learn about a few different options for versioning your ASP.NET Web API service.