- Modern Programming: Object Oriented Programming and Best Practices
- Graham Lee
- 347字
- 2021-05-21 22:05:59
Conclusion to Part One
We have seen that Object-Oriented Programming is indeed, as many detractors suggest, a complex paradigm with many moving parts. We have also seen that this complexity is not essential: at its core is a single idea that a problem can be modeled as lots of distinct, interacting agents, and that each of those agents can be modeled as a small, isolated computer program. The solution to the original problem is found in the interaction between those agents, which is mediated by message passing.
Some of the incidental complexity seems to have been added by people wanting to make their mark: the proliferation in design patterns appears to have occurred because it is always easier to add a new pattern than to consolidate existing ones; however much some people might like to erase Singleton from history. Objects are not "just" decomposition and message-passing, they are that and providing access to a program's data, or that and a hierarchy of classes.
Much of the complexity associated with objects comes from another source: trying to treat object-oriented programming as much like the structured, procedural, imperative processes that came before, and map its terminology onto the thought structures and workflows of the established ways of writing software. This is the "structured on-ramp" of this section's introduction, in which OOP is seen as an extension to existing ideas, and programs are made "better" by adding objects in the same way that food is made "better" by sprinkling paprika on top. Thus, it is that Ann Weintz could say that "A NeXT Object is simply a piece of C code" in Writing NeXT Applications. Thus, object-oriented software engineering is about building complex software systems by careful, top-down analysis of the procedures (or bottom-up analysis of the data and its manipulations), while also as a side activity creating a hierarchy of classes with particular relationships.
If objects are something you do as well as writing software, then no wonder it is harder than not using the objects! OOP seems to have failed, but it may not even have been attempted.
- 數據產品經理高效學習手冊:產品設計、技術常識與機器學習
- Python絕技:運用Python成為頂級數據工程師
- Word 2010中文版完全自學手冊
- Google Visualization API Essentials
- Visual Studio 2015 Cookbook(Second Edition)
- 數據要素五論:信息、權屬、價值、安全、交易
- 中國數字流域
- Scratch 3.0 藝術進階
- 智能數據時代:企業大數據戰略與實戰
- Python數據分析與挖掘實戰(第3版)
- 探索新型智庫發展之路:藍迪國際智庫報告·2015(上冊)
- MySQL DBA修煉之道
- Spring MVC Beginner’s Guide
- 云計算寶典:技術與實踐
- 數據分析思維:產品經理的成長筆記