🔧 Proxy Pattern
Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to
Proxy is a structural design pattern that lets you provide a substitute or placeholder for another object. A proxy controls access to the original object, allowing you to perform something either before or after the request gets through to the original object.
Let’s create a person object, that represents John Doe.
Now lets analyze an interview question :
𝗛𝗼𝘄 𝗰𝗮𝗻 𝗶 𝘀𝘁𝗼𝗽 𝘀𝗼𝗺𝗲𝗼𝗻𝗲 𝘁𝗼 𝗰𝗵𝗮𝗻𝗴𝗲 𝘁𝗵𝗲 𝗶𝗱 𝗶𝗻 𝘁𝗵𝗲 𝘂𝘀𝗲𝗿 𝗼𝗯𝗷𝗲𝗰𝘁 ?
To freeze the id property in a JavaScript object using a Proxy, you can define a Proxy handler that prevents the id property from being modified. Here's how you can do it :
Keep Exploring JS ❤
...
🔧 Design Pattern #3 - Observer Pattern
📈 21.01 Punkte
🔧 Programmierung
🔧 Design Pattern #2 - Facade Pattern
📈 21.01 Punkte
🔧 Programmierung
🔧 Design Pattern #7 - Builder Pattern
📈 21.01 Punkte
🔧 Programmierung
🔧 Design Pattern #6 - Composite Pattern
📈 21.01 Punkte
🔧 Programmierung
🔧 Service: O pattern que virou anti-pattern
📈 21.01 Punkte
🔧 Programmierung
🔧 Design Pattern #5 - Adapter Pattern
📈 21.01 Punkte
🔧 Programmierung
🔧 HFDP(11) - Proxy Pattern
📈 18.88 Punkte
🔧 Programmierung
🔧 Proxy Pattern
📈 18.88 Punkte
🔧 Programmierung
🔧 Proxy Design Pattern
📈 18.88 Punkte
🔧 Programmierung
🔧 C# Design Pattern: Proxy (Portugues)
📈 18.88 Punkte
🔧 Programmierung
🔧 C# Design Pattern: Proxy
📈 18.88 Punkte
🔧 Programmierung
🔧 Proxy Pattern
📈 18.88 Punkte
🔧 Programmierung