微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

设计模式 – 如何解释依赖注入到5岁?

什么是解释 dependency injection的好方法

我在Google上发现了几个教程,但没有人会认为读者只是一个Java初学者。你会怎么解释这个新手?

我给你五岁的依赖注入。

When you go and get things out of the refrigerator for yourself,you can cause problems. You might leave the door open,you might get something Mommy or Daddy doesn’t want you to have. You might even be looking for something we don’t even have or which has expired.

What you should be doing is stating a need,“I need something to drink with lunch,” and then we will make sure you have something when you sit down to eat.

原文地址:https://www.jb51.cc/javaschema/283248.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐