This chapter has shown you how to build a complex and articulate module to completely manage the site's articles, events, and possibly even photo galleries. It covered all of the following:
An administrative section for managing the data in the database.
Pages for browsing the published content.
Integration with the built-in membership system to secure the module and track the authors of the articles.
A syndication service that publishes a RSS feed of recent content for a specific category, or for every category, by means of an ASP.NET page.
A generic user control that consumes any RSS feed. It has been used in this chapter to list the new articles on the home page, but you could also use it in the forums module, and in other situations.
By following along in this chapter you've seen some of the powerful things you can do with the GridView control, its accompanying ObjectDataSource, and a properly designed business logic layer (BLL). The provider-based data access layer (DAL) implemented in this chapter enables you to easily create new classes to support different data stores and plug them into the system without changing a single line of code in the BLL or the UI.
This system is flexible enough to be utilized in many real-world applications, but you can also consider making some of the following improvements:
Support multi level categories (subcategories management).
A search engine could be added to the public section of the modules. Currently, when users want to find a particular article, they have to go through all the content (which could fill several pages in the article list). You could add a Search box that searches for the specified words in the selected category, or in all the categories, and with further options.
Extend the ShowArticle.aspx page, or create a separate page, that outputs a printer-friendly version of the article, i.e., the article without the site's layout (header, menus, footer, left- and right-hand columns). This could be done easily by adding a new stylesheet to the page (when the page is loaded with a PrinterFriendly=1 parameter on the querystring) that makes some DIVs hidden (use the visibility:hidden style).
Create a web service that allows other applications to retrieve the list of articles as an alternative to the RSS feed. This could also be used by Contributors to submit new articles, or even by Administrators and Editors to perform their duties. You could use the Microsoft Web Service Extensions (WSE) to make authentication much easier and even to support encryption — otherwise, you'd have to pass credentials in the SOAP headers, and encryption would only be possible by using SSL.
In the next chapter you'll work on a module for creating, managing, displaying, and archiving opinion polls, to implement a form of user-to-site communication.