BinaryKits.Zpl
BinaryKits.Zpl copied to clipboard
Add Labelary overlay to webapi
This PR offers the possibility to superimpose the image of Labelary on the image of the viewer. This allows you to quickly see how accurate the new viewer is.
Seems useful to me. It makes it easy to see which areas need attention.
I would suggest to do the two requests separately as it is a development support.
I would suggest to do the two requests separately as it is a development support.
Which two requests do you mean?
One for rendering with BinaryKits and a second for the optional request to Labelary. And the create the overlay in the browser
Okay then my pull requests fit right?
You have built the overlay logic into the main request. Which is activated with the parameter ShowLabelaryOverlay
. I don't think that's so great.
You have built the overlay logic into the main request. Which is activated with the parameter
ShowLabelaryOverlay
. I don't think that's so great.
I do not understand the problem😔 Why is this not good?
The Single Responsibility Principle (SRP) The idea behind the SRP is that every class, module, or function in a program should have one responsibility/purpose in a program. As a commonly used definition, "every class should have only one reason to change". The class above violates the single responsibility principle
In your modified version, the function now has several tasks. If I want to add another service I have to change the existing code again.
If you build an additional function you do not change the existing functions.
@Int32Overflow
I think he wants the new logic not to be inside the function RenderZpl
, an easy adjust possible?
One for rendering with BinaryKits and a second for the optional request to Labelary. And the create the overlay in the browser
I second this. It would also make it possible to turn the overlay on and off without the need fire off a new request.
Superseded by #156.