Closed DLade closed 3 years ago
With "from an architecture view it is not nice" I mean that one should split data and function to prevent a strong coupling between components/classes. Decoupling things make maintenance much easier.
Functions which needs the client should be part of the client or like in C# at least extensions.
But I see not much efford in calling thing.getObservations(client)
instead of client.getObservations(thing)
.
You know what I mean?
Hi, just took a quick look, at first sight the solution 1 looks nice to me
client.Get<SensorThingsCollection<Observation>>>(datastream.ObservationsNavigationLink)
If we merge this, we should change the major number - because the interface changes a bit.
There are several functions using the client inside the DTOs (data transfer objects). It might be convenient to have such functions there but from an architecture view it is not "nice".
Solution 1 (my preference, much less code): The client can do it:
or (SensorThingsEntityHandler style)
Solution 2: Extensions outside the DTOs can hadle it:
Solution 3: Mix both:
What do you think? Which solution do you like most?