xcode ios 模块化_xcode模块化的第1部分

xcode ios 模块化

w ^帽子modularising? (What is modularising?)

When we use “import something,” we say to our beautiful Mac, that connect the code in this particular file to that something. When we make any app, we use lots and lots of modules — most of them we don’t even see. Why is it good?

当我们使用“导入某物 ”时,我们对美丽的Mac说,将特定文件中的代码连接到某物 。 制作任何应用程序时,我们都会使用很多模块-大多数甚至看不到。 为什么好呢?

It can help us and our machine. We can collaborate better on the code, re-use the code, and help Xcode to build faster.

它可以帮助我们和我们的机器。 我们可以在代码上进行更好的协作,重新使用代码,并帮助Xcode更快地构建。

怎么样? (How?)

By separating concerns.

通过分离关注点

关注点分离 (Separation of Concerns)

Image for post
Beloved MagSafe (2006–2016)
心爱的MagSafe(2006–2016)

You connect your Mac’s charger to the power outlet. Your Mac has no idea if there is a power outlet, let alone knowing how to convert 220V AC to a 16.5 V DC! That is the charger’s job. Your Mac just knows how to tell the charger how much power it needs, and how to receive the power.And the charger doesn’t know how Mac works. It just knows how to talk to it about its power needs. And it also doesn’t know where the power is coming from, is it wind power, nuclear, or some nature unfriendly, terrible thing, like solar — not joking, if you want to save the planet and humans, go nuclear! Wind power and marine currents are not bad, either.

您将Mac的充电器连接到电源插座。 您的Mac不知道是否有电源插座,更不用说知道如何将220V AC转换为16.5 V DC了! 那是充电器的工作。 您的Mac仅知道如何告诉充电器它需要多少电量以及如何接收电力,而充电器不知道Mac的工作原理。 它只知道如何与它谈论其电源需求。 而且它也不知道电力来自何处,是风力,核能,还是某些自然界不友好,可怕的事物,例如太阳能?这不是在开玩笑,如果您想拯救地球和人类,那就去核能吧! 风力和洋流也不错。

Anyways…

无论如何…

This is good, because when building Mac, it is simpler to build the Mac and not the power c

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值