Chapter 10. The User Interface

Beauty is a sign of intelligence.

Andy Warhol

To this point, we’ve focused entirely on elements that cannot be seen. In this chapter we bring everything home by exposing our backend services to the end user.

When it comes to Enterprise Java, we have our fill of options for display technologies. The Java EE Specification provides JavaServer Faces (JSF), a component-based framework for web applications. This approach takes advantage of server-side rendering: that is, the final response returned to the client is created on the server from source templates (typically Facelets).

In our GeekSeek example, however, we’ll be going off the beaten path a bit and rolling our own single-page application in pure HTML. The dynamic elements backed by data will be supplied via JavaScript calls to the backend via the RESTful interface we exposed earlier.

In general, our requirements remain simply to expose our operations in a human-consumable format.

Use Cases and Requirements

On a high level, we’re looking to allow a user to take advantage of the application’s primary purpose: we’d like to modify the state of our domain objects in a consistent fashion. We can state these:

  • As a User I should be able to Add/Change/Delete a Conference
  • As a User I should be able to Add/Change/Delete a Session to Conferences
  • As a User I should be able to Add/Change/Delete an Attachment to Sessions and Conferences
  • As a User I should be able to Add/Change/Delete a Venue (and attach to Conferences ...

Get Continuous Enterprise Development in Java 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.