Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Diagram of a

...

Spring Boot based UI solution

The below diagram shows how a server-side Java UI solution might be implemented.  Please note that, while the REST API in this model looks to stand alone, it may be plausible to reimplement it as a thin layer over the Java API, or as part of the "UI Platform / Controllers" (where some controllers respond to requests for HTML, and others respond to REST requests and return JSON or similar). consisting of the following:

  1. Spring Boot would be used to build the Models/Views/Controllers

  2. A modern template engine (e.g. Thymeleaf), which makes it easy for developers/designers to theme/stylize DSpace without touching Java code.

  3. The existing REST API would be refactored/migrated into Spring Boot as a part of the new UI. We would use Spring Boot’s ability to perform “content negotiation” to parse requests to either the UI or the REST API. This would mean the REST API and UI layer would share the same Java business logic (in Controllers). For example:

    1. By default, calls to the UI would simply return HTML

    2. But, one could make REST calls, by appending “.json” or “.xml” on any UI paths. In this scenario Spring Boot would respond with JSON or XML, and act as a REST API layer.

  4. For code examples of this, see https://github.com/tdonohue/DSpace-Spring-Boot  , specifically the ItemController which can respond with HTML, JSON or XML: https://github.com/tdonohue/DSpace-Spring-Boot/blob/spring-boot-ui/dspace-ui/src/main/java/org/dspace/ui/controller/ItemController.java


Gliffy Diagram
nameServer-Side UI diagram