Preliminary understanding of agency

What are dynamic proxies and static proxies?
What is a proxy: It is to decouple the client from the user, so that it can be reached, add a delegate class at any time, and make the client not open to the public.
Static proxy: that is, writing fixed code, each time a client is added, a delegate class needs to be written.
Dynamic proxy: During the running of the program, the delegate class is dynamically generated according to the code instructions. Compared with the static proxy, the code amount can be saved and the development efficiency can be improved.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325440270&siteId=291194637