[{"data":1,"prerenderedAt":67},["ShallowReactive",2],{"term-a\u002Fadapter-pattern":3,"related-a\u002Fadapter-pattern":57},{"id":4,"title":5,"acronym":6,"body":7,"category":39,"description":40,"difficulty":41,"extension":42,"letter":43,"meta":44,"navigation":45,"path":46,"related":47,"seo":51,"sitemap":52,"stem":55,"subcategory":6,"__hash__":56},"terms\u002Fterms\u002Fa\u002Fadapter-pattern.md","Adapter Pattern",null,{"type":8,"value":9,"toc":32},"minimark",[10,15,19,23,26,30],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"You're in Europe with a US charger. You need an adapter. In code, your app expects a PaymentProcessor with a .pay() method, but the new Stripe SDK uses .processPayment(). An Adapter wraps Stripe and translates .pay() calls into .processPayment() calls. Your app never knows Stripe's interface even exists.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"undefined",[11,27,29],{"id":28},"when-youll-hear-this","When You'll Hear This",[16,31,25],{},{"title":33,"searchDepth":34,"depth":34,"links":35},"",2,[36,37,38],{"id":13,"depth":34,"text":14},{"id":21,"depth":34,"text":22},{"id":28,"depth":34,"text":29},"architecture","You're in Europe with a US charger. You need an adapter. In code, your app expects a PaymentProcessor with a .pay() method, but the new Stripe SDK uses .","intermediate","md","a",{},true,"\u002Fterms\u002Fa\u002Fadapter-pattern",[48,49,50],"Decorator Pattern","Proxy Pattern","Strategy Pattern",{"title":5,"description":40},{"changefreq":53,"priority":54},"weekly",0.7,"terms\u002Fa\u002Fadapter-pattern","74USTqIPnoFr1ZOfBPCw65OUBycCpeTod3A9QsPps6M",[58,61,64],{"title":48,"path":59,"acronym":6,"category":39,"difficulty":41,"description":60},"\u002Fterms\u002Fd\u002Fdecorator-pattern","You have a Coffee object. You want Coffee with Milk. Coffee with Sugar. Coffee with Milk and Sugar. With inheritance you'd need four classes.",{"title":49,"path":62,"acronym":6,"category":39,"difficulty":41,"description":63},"\u002Fterms\u002Fp\u002Fproxy-pattern","A Proxy is a stand-in for a real object that controls access to it.",{"title":50,"path":65,"acronym":6,"category":39,"difficulty":41,"description":66},"\u002Fterms\u002Fs\u002Fstrategy-pattern","You're writing a sorter and want to sort by price, name, or date depending on user choice.",1776518254206]