Chapter 9. Creating a rich-text comment engine
This chapter covers
- Enabling user comments
- Supporting article delivery
- Including rich-text editing
A striking characteristic of several successful modern websites and web applications is the way in which they support community, sometimes for its own sake and sometimes in the service of other goals. Examples include sites like Facebook (social networking), LinkedIn (career networking), Wikipedia (online encyclopedia), Digg (social bookmarking), DZone (tech-specific social bookmarking), Amazon (retail), Pinterest (photo sharing), and YouTube (video sharing).
One important way to create a sense of community is to allow users to submit comments. The comments might target articles, blog posts, user submissions, products, or anything else where it’s useful to respond to items in a public fashion.
In this chapter, you’ll implement a comment engine. It will be generic in that it won’t care what kind of item serves as a target. You’ll begin with a basic comment engine. Then you’ll embed it in an article-delivery engine. Next you’ll add support for rich-text editing, with real-time client-side previewing. Finally you’ll write tests that deal with the security issues that rich-text editing raises.
None
JPA, Hibernate Core and Validator, programmatic transaction management, JavaMail