At what level in bridge pattern the inheritance to be broken into composition

85
April 21, 2021, at 08:40 AM

I have gone through theoretical concept of bridge pattern https://springframework.guru/gang-of-four-design-patterns/bridge-pattern/.

We need to replace the chain of inheritance of implementation with composition which is correct but the question that is confusing me at what level of inheritance should be segregated to composition.

Referring to example mentioned in the above link, TextMessage and EmailMessage are also implementation of Message interface like MessageSender and EmailSender. So, how to exactly know at which implementation level inheritance should be replaced with composition, e.g.: at TextMessage level or at TextMessageSender level?

Also if any framework uses bridge pattern or any code/ scenario in production where one can leverage this pattern?

READ ALSO
how to stream output opencv procesed frames from ip camera stream and play it on vlc or any

how to stream output opencv procesed frames from ip camera stream and play it on vlc or any

Actually i'm importing a stream ip camera into OpenCV & python and playing on local(Ubuntu server Frame), working on Face Mask detector's projectIt does process the frames imported and check if target 'Wear or not mask' and show output in a frame (vs = VideoStream('rtsp://CAMERA_USER:PASSWORD@IP_SERVER:554/videoMain')

107
Symfony Api Platform /api not showing the api page correctly

Symfony Api Platform /api not showing the api page correctly

I'm working on a Symfony ProjectI had to install the API PLATFORM

101
Displaying output from different function in one innerHTML

Displaying output from different function in one innerHTML

I am trying to display two outputs in different functions into single innerHTML when the button clickedHowever, I want it without using a global variable to store the output

20