How would you prefer to use libraries that might change?
Ex) Android network libraries had to change to httpurlconnection or retrofit because the higher version did not support http-client.
Ex) In json, many libraries exist such as jackson and gson which may change depending on the situation
-
Create an interface (such as an adapter) to interact with an existing system. (Externel lib - my interface - my system)
-
Apply external libraries to existing systems as they are. (Externel lib - my system)
In my opinion: 1. the dependence on existing systems and external libraries can be reduced, but unnecessary code may be generated because external libraries need to be implemented to match adapters.
- the function of an external library can be adequately used, but replacing it with another library can result in a significant change in the code.
I can't choose between number 1 and number 2.
I would like to hear your opinion and would appreciate it if there were any other opinions.
Aucun commentaire:
Enregistrer un commentaire