Design Patterns in Ruby by Russ Olsen
Author:Russ Olsen
Language: eng
Format: epub, pdf
Publisher: Pearson Education Limited (US titles)
Published: 2008-03-19T16:00:00+00:00
proxy = BankAccountProxy.new(account)
proxy.deposit(50)
proxy.withdraw(10)
* * *
There really is nothing very exciting going on in BankAccountProxy. The BankAccountProxy presents exactly the same interface as its subject, the BankAccount object. But the proxy doesn’t really know a thing about high finance—whenever someone calls a method on it, the BankAccountProxy turns to the real BankAccount object, delegating the method call to the subject.
Of course, if our proxy did nothing more than echo every call blindly down to the subject, we will not have accomplished much except create a sink for those extra CPU cycles as the method calls arrive at the proxy, only to be immediately bounced off to the subject. But once we have a proxy, we have a place to stand squarely between the client and the real object. If we want to manage who does what to the bank account, the proxy provides the ideal pinch point to exert control.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Ada | Ajax |
Assembly Language Programming | Borland Delphi |
C & C++ | C# |
CSS | Compiler Design |
Compilers | DHTML |
Debugging | Delphi |
Fortran | Java |
Lisp | Perl |
Prolog | Python |
RPG | Ruby |
Swift | Visual Basic |
XHTML | XML |
XSL |
Hello! Python by Anthony Briggs(9373)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9343)
The Mikado Method by Ola Ellnestam Daniel Brolund(9307)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(7852)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7402)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7325)
Grails in Action by Glen Smith Peter Ledbrook(7296)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7117)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(5957)
Kotlin in Action by Dmitry Jemerov(4638)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(3888)
Functional Programming in JavaScript by Mantyla Dan(3723)
Learning Java by Patrick Niemeyer & Daniel Leuck(2872)
Learning React: Functional Web Development with React and Redux by Banks Alex & Porcello Eve(2839)
Mastering Python for Finance by Weiming James Ma;(2839)
Windows APT Warfare by Sheng-Hao Ma(2617)
WordPress Plugin Development Cookbook by Yannick Lefebvre(2603)
Mastering Java 9 by Dr. Edward Lavieri(2573)
Architecting Modern Java EE Applications: Designing lightweight, business-oriented enterprise applications in the age of cloud, containers, and Java EE 8 by Daschner Sebastian(2559)