5.3. Messaging Implementation for Servlets

If you look at the design of our Messaging interface and class, this is one place where, frankly, I blew it. Rather than going back and reimplementing the class as it should have been done, let's use it as a study of how bad assumptions can come back to bite us later.

In the original application, the output was under the control of the Standings class, and we chose to just show the messages as they were generated. When we redesigned the application into a layered application, we separated the Messaging interface from the Messaging implemention, but didn't really give sufficient thought to how this was going to work. Yes, we can now implement the show() method to format its output as HTML, or XML, or ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.