Prev | Current Page 417 | Next

Frank Zammetti

"Practical DWR 2 Projects"

Once more, I??™ve chosen not to show the code here owing to its
extreme simplicity, but yet slightly page-filling girth.
CHAPTER 5 n SHARE YOUR KNOWLEDGE: DWIKI, THE DWR-BASED WIKI 234
Figure 5-15. ArticleHistoryItem class UML diagram
As with ArticleComment, the articleTitle links a given history item to a particular article.
The previousText field stores the entire contents of the article before an edit was made. The
newText field stores the entire contents of the article after the edit was made (I mentioned
earlier that this is a very inefficient and not very elegant way to do history, but it has the virtue
of being very easy to implement, and really, it??™s not going to miss any changes, that??™s for sure!).
The edited and editedBy fields serve the same purpose as posted and poster in the
ArticleComment class.
And with that, we have only three more classes to look at, but I??™ve saved the best, and
lengthiest, for last. Let??™s start with the Freemarker class, which of the remaining three is probably
the smallest and simplest.
Freemarker.java
Of course, you know by now that the FreeMarker templating engine is used to generate much
of the output that is shown to the user in this application.


Pages:
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429