Page 213 - Tuesday, 26 September 2017

Benefits of MVC

An application can accumulate features until it is too complicated to understand. Separating code into classes helps you design and understand the application as a whole; you can think in terms of classes instead of individual variables and methods.

Similarly, separating classes into model, view, and controller layers helps you design and understand an application; you can think in terms of layers instead of individual classes.

  • accumulate 积累

  • in terms of 依据,按照,在···方面

MVC also makes classes easier to reuse. A class with restricted responsibilities is more reusable than one with its fingers in every pie.

  • with its fingers in every pie
    • https://english.stackexchange.com/questions/293826/meaning-of-have-ones-fingers-in-every-pie
    • https://www.collinsdictionary.com/zh/dictionary/english/a-finger-in-every-pie
    • 上面整段话可以理解为:使用 MVC 模式还可以让类的复用更加容易。相比功能多而全的类,功能单一的专用类更加有利于代码复用。

Notice that you use the escape sequence ' in the last value to get an apostrophe in your string. You can use all the usual escape sequences in your string resources, such as \n for a new line.

  • apostrophe 文中指单引号

  • escape sequence 文中指转义字符

Take a moment to put this code into a private method instead, as shown in Listing 2.9.

  • Take a moment 花点时间

Now that you have the questions behaving appropriately, it is time to turn to the answers. At the moment, GeoQuiz thinks that the answer to every question is “true.” Let’s rectify that. Here again, you will implement a private method to encapsulate code rather than writing similar code in two places.

  • appropriately 恰当地

  • rectify 改正

  • Here again 同样

更多相关文章

  1. android 如何使用spinner来实现选择省份和市区功能
  2. Android(安卓)frameworks去掉熄屏前先变暗的功能
  3. Android(安卓)wifi adb 功能
  4. android studio 库工程添加变体功能
  5. android中实现“再按一次退出”功能
  6. 面向Android微博客户端"Crowdroid2.5.0"正式版已经发布了!
  7. Android下拉刷新完全解析,教你如何一分钟实现下拉刷新功能
  8. Android(安卓)Timer的自动功能
  9. Android开发系列(二十二):AdapterViewFlipper的功能和使用方法

随机推荐

  1. android合理配置PRODUCT_LOCALES为你的系
  2. 第一篇 Android(安卓)驱动开发之简单概述
  3. 【Android(安卓)adb】 adb环境变量配置
  4. 告别 USB,用 wifi 进行 Android(安卓)真机
  5. activity在配置只支持竖屏时要注意个问题
  6. android sdk manager 的解决办法
  7. About Unit Test In Android(安卓单元测试
  8. Android(安卓)NDK开发指南---Android.mk
  9. 用fiddler做代理服务器转发请求
  10. Android(安卓)UI学习 - Menu