BinaryKits.Zpl icon indicating copy to clipboard operation
BinaryKits.Zpl copied to clipboard

Add Labelary overlay to webapi

Open Int32Overflow opened this issue 2 years ago • 10 comments

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.

grafik

Int32Overflow avatar Aug 09 '22 12:08 Int32Overflow

Seems useful to me. It makes it easy to see which areas need attention.

primo-ppcg avatar Aug 10 '22 10:08 primo-ppcg

I would suggest to do the two requests separately as it is a development support.

tinohager avatar Aug 10 '22 12:08 tinohager

I would suggest to do the two requests separately as it is a development support.

Which two requests do you mean?

Int32Overflow avatar Aug 10 '22 20:08 Int32Overflow

One for rendering with BinaryKits and a second for the optional request to Labelary. And the create the overlay in the browser

tinohager avatar Aug 10 '22 20:08 tinohager

Okay then my pull requests fit right?

Int32Overflow avatar Aug 10 '22 20:08 Int32Overflow

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.

tinohager avatar Aug 10 '22 20:08 tinohager

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?

Int32Overflow avatar Aug 10 '22 21:08 Int32Overflow

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.

tinohager avatar Aug 10 '22 22:08 tinohager

@Int32Overflow I think he wants the new logic not to be inside the function RenderZpl, an easy adjust possible?

YipingRuan avatar Aug 11 '22 00:08 YipingRuan

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.

primo-ppcg avatar Aug 11 '22 05:08 primo-ppcg

Superseded by #156.

primo-ppcg avatar Jan 14 '23 11:01 primo-ppcg