Contribute to the DSpace Development Fund

The newly established DSpace Development Fund supports the development of new features prioritized by DSpace Governance. For a list of planned features see the fund wiki page.

Diagram of a Spring Boot based UI solution

The below diagram shows a server-side Java UI solution 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

This diagram shows an example interaction of a page that includes both static (HTML) and dynamic (Javascript + REST calls) content. This example interaction is meant to highlight the ability of Spring Boot to act as both a UI and a REST API, using the same underlying Models and Controllers (i.e. business logic).

  • No labels