imagej / imagej-server

A RESTful web server for ImageJ [EXPERIMENTAL]
Apache License 2.0
38 stars 17 forks source link

Convert JsonService and other non-SciJava services into SciJava services #31

Open PetrBainar opened 5 years ago

PetrBainar commented 5 years ago

There is a class named JsonService in the ImageJ Server project. This service however is NOT a SciJava service. Since ImageJ Server relies on SciJava, which has got an own service model, the fact that JsonService is not a SciJava service causes certain confusion.

@ctrueden pointed out in https://github.com/imagej/imagej-server/pull/30

I think part of the confusion is that the Dropwizard stack has its own service model, so the term "service" becomes technically ambiguous in this project. And further adding to this confusion: I don't think the JsonService is a Dropwizard service either! 😆 It would be nice if someone who takes the time to understand both architectures (SciJava and Dropwizard) could clean up this project.

ctrueden commented 5 years ago

Alternately, the class could just be renamed JsonHelper or JsonFunctions or similar to avoid this confusion. The only reason I can think of to make it a SciJava service would be for extensibility, in case anyone wants to override how those functions work downstream.