cph-cachet / carp.core-kotlin

Infrastructure-agnostic framework for distributed data collection.
https://carp.cachet.dk/core/
MIT License
21 stars 3 forks source link

Add Website as a device #465

Closed xelahalo closed 8 months ago

xelahalo commented 8 months ago

I also added a convenience URL classes and moved the things that was in WebTask to a common place. I tried to keep things backwards compatible but someone should check it out. I am also unsure about the schemas.

xelahalo commented 8 months ago

Then a comment about extensibility: we probably don't want a browser "enum". You'd instantly stop supporting the ones you omit, or haven't been released yet. Instead, I'd probably be more open-ended and make it a string (at least for data capture), ideally the one directly reported by the browser, i.e., the one that maps to the HTTP header information. Then instead, if you want to map those values to something more statically typed, you can add a transformation to an enum (which stores the origin value), which has an "OTHER" option as well.

I decided not to include any static typing and just go with strings for now.

xelahalo commented 8 months ago

I also decided to rename WebBrowser to Website as it made more sense to me; it felt weird to register a browser at a url, instead it makes more sense that a specific website has supported browsers and a URL at which it is hosted.

Whathecode commented 8 months ago

Thank you for adding this @xelahalo !

To have something which requires no further discussion and can be merged now, I adjusted the PR as follows: