IOS Design Pattern Learning (22) proxy

Source: Internet
Author: User

1 Preface

A common use of proxy is as a lightweight proxy object, which allows the client to first access some cheap information or functions. When a user is willing to pay for the real and high-price membership status, the proxy opens the door to allow users to access more functions only available to paying members.

A specific design pattern is called AGENCY pattern.

2. Details

2.1 Brief Introduction

Provides a proxy for other objects to control access to this object.


2.2 proxy category

(1) remote proxy: provides a local representation of objects in different address spaces or networks.

(2) virtual proxy: creates heavy objects as needed.

(3) protection proxy: controls access to the original object based on various access permissions.

(4) smart-reference proxy: manages the memory by counting the real object references. It is also used to lock a real object so that other objects cannot be modified.

3 conclusion

The above is all content and I hope it will help you.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.