作品書籍課程程式集小說集論文集散文集影片集編輯雜誌程式人電子書JavaScript計算語言學微積分Blender 動畫C# 語言系統程式高等 C 語言JavaAndroidVerilogWikidotR 統計軟體機率統計計算機數學組合語言人工智慧開放原始碼網路資源運用計算機結構相關訊息常用工具友站連結在家教育RSS最新修改網頁列表簡體版English |
物件導向的問題
Class Dictionary Graph下例是一個有關籃子裝東西(蘋果、柳丁、小籃子)的 class dictionary description. Propagation Patterns下例是一個收集所有裝有蘋果所在地以成為一個 list 的程式. Good Idea :Nonblack-box reuseClass dictionary ComponentConstruction Class : class Formal Specification of Demeter method :Structural specification : class dictionary G Parts of adaptive software :Succinct subgraph specification C : *traverse* *from* class1 *to* class2 Key Idea for adaptive software :The detailed design of the individual objects or classes only happens after a system design is in place. Because the interrelationships among objects are complex, it is almost impossible to design them exactly right the first time, as anyone who has built a reasonably large object-oriented program knows from hard-won experience. The design process is iterative, with the interactions among objects being redesigned as problems are unconvered during design or coding of individual objects or classes. Inventor's Paradox :It is often easier to solve a more general problem than the one at hand. — Polya Stepwise Refinement :A Complex process where the final solution is achieved by stepwise refinement. In every step certain detail get specified which have been left open in the previous step. Representation / Interface Independence :A program should be designed so that the i nterfaces of objects can be changed within certain constraints without affecting the program at all. Data structure shy program :Written in terms of hooks (ie : important data structure) into a data structure. Pareto-Principle :For a given task, 80% of the work is done by 20% of the interesting classes. Delay-Binding :Broadly speaking, the history of software development is the history of ever-later binding time.
Law of Demeter :When writing a method, one should not hardwire the details of class structure into that method. You should talk to (1) your self. (2) close relatives. (3) friends who visit you. Use case :Use cases are a way to make complex systems understandable without, as a first step, trying to structure the system into … objects .. Such structuring creates very technical descriptions which tend to shift the focus from the problem of understanding the requirement to dealing with implementation-like description. Unplanned reuse :If a generic algorithm need to accound for each possible use, then it will be difficult to write and reuse. Adaptive framework library of propagation patterns (pps) + class dictionaries (cds) + documentation (purpose, use, design) (Adaptive framework vs framework = class, genre, species vs. instance, genre, animal) Decontextualized components :Compilation decisions are delayed until the context information is available. Method of assertions :precondition + postcondition Intentional programming :Implementation detail is seperated from computational intent. Domain specific knowledge can be added routinely using program transformations. Trade-offs are simply eliminated by proving great abstraction capabilities. Requirement for design notation :Structure shy queries :Open implementations :Software Architecture :Controlling impact of change versus reuse capability. Hot Pot driven approach :Important feature of evolving system
|
閱讀筆記:Adaptive Object Oriented Software
page revision: 3, last edited: 04 Jun 2010 07:55
Post preview:
Close preview