码迷,mamicode.com
首页 > 其他好文 > 详细

beginner’s mistake

时间:2016-08-14 07:24:02      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:

PHP Advanced and Object-Oriented Programming 3rd Edition

Related to modularity is abstraction: classes should be defined broadly. This is a common and understandable beginner’s mistake. As an example, instead of designing a class for interacting with a MySQL database, you should make one that interacts with a nonspecific database. From there, using inheritance and overriding, you would define a more particular class for MySQL. This class would look and act like the general database class, but some of its functionality would be customized

beginner’s mistake

标签:

原文地址:http://www.cnblogs.com/yuanjiangw/p/5769288.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!