接口如何工作以及如何在实际编程中使用它们 [英] How do interfaces work and How to use them in practical programming

查看:99
本文介绍了接口如何工作以及如何在实际编程中使用它们的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不久前开始编程。据说,如果将数据和算法结合在一起,那么你就得到了一个程序。这正是我现在所做的,但我听到了这些理论:

I started my programming life not long ago. It is said that if you combine data and algorithm together, then you got a program. That is exactly what I do now, yet I hear these theories:


  • 为今天构建,为明天设计

  • 在编码之前,尽可能使每个模块都清晰

  • 只有少数人才能理解您的代码

  • 准备可预测的变化

  • Build for today, design for tomorrow
  • Before coding, make each module as clear as possible
  • Your code should not be understandable by just a handful of people
  • Prepare for predictable changes

总而言之,我没有遇到任何关于接口的理论。我想知道何时何地使用接口来达到良好的标准。

All in all, I come across no theories about interfaces. I wonder where and when to use interfaces to meets good standards.

也许你知道很多。然后给我一些提示!例子很棒!

Maybe you know a lot. Then give me some tips! Examples are wonderful!

推荐答案

接口:我为什么不能抓住它们?

了解界面

这篇关于接口如何工作以及如何在实际编程中使用它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆