Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Angular Design Patterns

You're reading from   Angular Design Patterns Implement the Gang of Four patterns in your apps with Angular

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781786461728
Length 178 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Mathieu Nayrolles Mathieu Nayrolles
Author Profile Icon Mathieu Nayrolles
Mathieu Nayrolles
Nayrolles Mathieu (USD) Nayrolles Mathieu (USD)
Author Profile Icon Nayrolles Mathieu (USD)
Nayrolles Mathieu (USD)
Arrow right icon
View More author details
Toc

Proxy patterns

Continuing our investigation into unbounded APIs and AJAX overkill, in the previous recipe, we established that both should be avoided, but the solution to this was to make APIs change in case the APIs were not paginated. This assumes that you have access to these APIs or to someone who has. While this is a reasonable assumption to make, it will not hold true in all cases.

What can we do, besides not making requests (obviously), to preserve those poorly designed and out-of-control APIs? Well, an elegant way to resolve this problem would be to use the proxy pattern. The proxy pattern is used to control access to an object. You surely know that the web proxy can control access to web pages given a user's credentials. In this recipe, we will not talk about the web proxy, but the objected-oriented proxy. In the object-oriented proxy, we do not control so much...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime