About IOC's wonderful metaphor

zhaozj2021-02-16  76

Sender: DEV (no time ~ a heaven, one meal hell), letter area: J2EE Title: About IOC's Wonderful Metaphor (ZZ) Send Station: BBS Shuimu Tsinghua Station (Mon Jul 19 08:30:00 2004), A Girl Wants To Kiss A Boy.The Girl's Name Is Daisy Anne O'Leary (DAO). She Has Red Hair.The Boy's Name Ed (IT's My Example), He Has A Swimming Pool (Filled with Database Connections). In Our Current Approach (Service Locator / Singleton) ..., Daisy Has To Go To An Central Known Place (Dating Service),

And ask it for ed. Daisy Has to have Built-

IN Knowledge About About The Dating Service, She Has To Know How To Fill Out The Right Forms To Get Someone Like Ed.

If SHE MOVES TO A DIFFERENT Dating Service, She Might Have To Go Through a Totally Different Process To Get Hooked Up

WITH ED.

In the Inversion of Control / Dependency Injection Approach ..., Daisy Knows She Has Needs ... Ed Knows He Has What

IT Takes to Fill Those Needs. Daisy and Ed Both Live In The Same Neighborhood and Have A Mutual Friend. That Friend

Takes Ed AND Introduces Him to Daisy, The Magic Happens. Smart-

MOTHED Red Headed Kids Are Soon Tearing Up The Neighborhood .-- ※ Source: · BBS Shuimu Tsinghua Station Smth.org · [from: 221.218.21. *]

转载请注明原文地址:https://www.9cbs.com/read-15072.html

New Post(0)