美文网首页Learn English The Hard Way
原著阅读 - Android Programming The B

原著阅读 - Android Programming The B

作者: 几千里也 | 来源:发表于2017-09-26 17:29 被阅读27次

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.

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 同样

相关文章

网友评论

    本文标题:原著阅读 - Android Programming The B

    本文链接:https://www.haomeiwen.com/subject/ikxeextx.html