Skip to content
Snippets Groups Projects

Migration to Ektorp and refactoring of the database layer

Merged Daniel Gerhardt requested to merge db-ektorp into master

A summary of the changes:

  • CouchDB4J has been replaced by Ektorp.
  • CouchDBDao has been split up into multiple repositories: One for each entity.
  • Jackson is used instead of JSON-lib for POJO <-> JSON (de)serialization.
    • Jackson's @JsonView's are used to mark which properties are (de)serialized for the API and/or CouchDB
    • A lot of persistence code could be simplified since serialization is handled automatically by the ObjectMapper.
  • Entities and related Classes have been renamed:
    • Content <- Question / SkillQuestion / LecturerQuestion
    • Comment <- FeedbackQuestion / AudienceQuestion
  • CouchDB design docs can now be automatically created by the backend if necessary. They are included as JavaScript code which is parsed and transformed to JSON at startup using Java's ScriptEngine.
  • MediaTypes for API versioning have been introduced:
    • vnd.de.thm.arsnova.v2+json: the format as used in ARSnova 2.x
    • vnd.de.thm.arsnova.v3+json:
      • ISO 8601 dates instead of timestamps
      • id instead of _id, revision instead of _rev
  • api.indent-response-body can be set in configuration for pretty responses for API debugging.
  • Empty (e.g. null) entity properties are ignored for serialization
Edited by Daniel Gerhardt

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply