Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

David Lundgren:
The allure of static proxies
Mar 02, 2017 @ 16:52:47

David Lundgren has a post to his site talking about the allure of static proxies in your development and some of his own experiences using them in his own code (and in using Laravel).

Several weeks ago I started playing with Laravel. Primarily because several colleagues are using it, and have suggested that I take a look at it. During my time reviewing how to build a view template I came across references to Html, Form, View and other static calls. Initially I was not impressed due to the use of so many static calls. I have come to an understanding about how static calls in certain circumstances can actually enhance code readability.

He talks about how static calls have been considered an anti-pattern for a long time due to difficulty testing and tight coupling issues. That being said, he did start to see the value in using them in certain situations, how his use relates to the proxy design pattern and some of his own conclusions about using static calls.

tagged: allure static proxy opinion laravel facade cleancode

Link: http://davidscode.com/blog/2017/02/27/the-allure-of-static-proxies/


Trending Topics: