You work in a team that is developing a weather application that brings together data from several sources. One of your colleagues is responsible for creating a client for a weather service that returns data in JSON format. Your colleague suggests creating a weather client interface that returns the weather as a string, then a class that gets (fetches from the weather service) and returns the JSON, and a decorator that extracts the weather prediction from that JSON and returns it. What do you think?
Another colleague needs to create a client for a weather service that already has a library ready. However, the interface offered by this library does not correspond to the one your app expects. Your colleague thinks of creating a decorator to convert these interfaces. What do you think?