posts - 37,comments - 7,trackbacks - 0

          1. No varible should hold a reference to a concrete class.
                If you use new, you'll be holding a reference to a concrete class. Use a factory to get around that.

          2. No class should derive from a concrete class.
                If you derive from a concrete class, you're depending on a concrete class. Derive from an abstraction, like an interface or an abstraction class.

          3. No method should override an implemented method of any of its base classes.
                If you override an implented method, then your base class wasn't really an abstraction to start with. Those methods implemented in the base class are meant to be shared by all your subclasses.

          posted on 2005-08-12 09:42 Dave 閱讀(88) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 永康市| 华亭县| 高雄市| 莒南县| 肇州县| 岳池县| 临泉县| 乌审旗| 高密市| 武隆县| 蚌埠市| 南陵县| 定陶县| 正阳县| 樟树市| 丰都县| 项城市| 江油市| 石棉县| 邵阳市| 林州市| 漠河县| 博乐市| 宁南县| 峡江县| 于田县| 龙川县| 乌兰浩特市| 乌拉特中旗| 噶尔县| 龙江县| 沾益县| 武乡县| 江西省| 普安县| 和田市| 石家庄市| 新泰市| 师宗县| 河北省| 南涧|