TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Object Oriented Role Analysis and Modeling

38 pointsby dmuxabout 5 years ago

6 comments

dmuxabout 5 years ago
I&#x27;ve been enjoying going through the OOP literature from the 90&#x27;s (and earlier) and have especially enjoyed Trygve Reenskaug&#x27;s view on things. I came across the OORam methodology in Trygve&#x27;s book, &quot;Working with Objects&quot; [0] which I found after reading about Ivar Jacobson&#x27;s &quot;Use case driven design.&quot;<p>I found the idea of reifying use-cases into explicit code constructs interesting.<p><a href="https:&#x2F;&#x2F;heim.ifi.uio.no&#x2F;~trygver&#x2F;1996&#x2F;book&#x2F;WorkingWithObjects.pdf" rel="nofollow">https:&#x2F;&#x2F;heim.ifi.uio.no&#x2F;~trygver&#x2F;1996&#x2F;book&#x2F;WorkingWithObject...</a>
bedersabout 5 years ago
It sounds a little bit like a solution for a problem you wouldn&#x27;t have if you didn&#x27;t use classes and inheritance in the first place.<p>A role as understood by OOram design principles paper is &quot;An activity is a task carried out by a set of associated objects in cooperation.&quot;<p>That&#x27;s an abstraction more easily and succinctly solved by higher-order functions.<p>And to boot OOram uses inheritance for re-using those role-models, which we would avoid nowadays.<p>An interesting idea for sure, but more like an observation on the limitations of (older) object-oriented language with regard to abstractions we now take for granted.
评论 #22543775 未加载
评论 #22536947 未加载
LessDmesgabout 5 years ago
For those that want to understand what modern class-based OOP really is, there&#x27;s a great analysis at <a href="https:&#x2F;&#x2F;wiki.haskell.org&#x2F;OOP_vs_type_classes#There_is_only_one_dictionary_per_function_call" rel="nofollow">https:&#x2F;&#x2F;wiki.haskell.org&#x2F;OOP_vs_type_classes#There_is_only_o...</a>
discreteeventabout 5 years ago
Reenskaug did further work on this under the heading DCI.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Data,_context_and_interaction" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Data,_context_and_interaction</a>
ChrisRusabout 5 years ago
OOP is not a helpful paradigm for modeling systems. If it was, we would design digital circuits with classes. But, of course that&#x27;s not possible. Because classes are absolutely a horrible metaphor for representing shared state at runtime. And, that&#x27;s most of what modern systems are doing. Have you ever stopped to consider that a class API is effectively the pin-out to a chip that&#x27;s missing it&#x27;s observable state vs input specification? Nobody would use that chip because it&#x27;s actually not adequately documented. And, so why people think OOP is still a reasonable basis for building re-usable code and expressing ideas about system architecture after decades of disappointment is one of software enduring mysteries. My speculation is that the half-life of talented engineers before they become managers is approximately equal to the number of years you need to seriously struggle with OOP before you have enough perspective to start having ideas of your own. And, then you switch to management, and buy a book on design patterns, and kick the can to the next generation.
评论 #22535998 未加载
评论 #22535639 未加载
ChrisRusabout 5 years ago
Note that the idea here is sound; identify and specify the roles of various actors in detail specifying explicitly that they are not actual _classes_. Effectively, this is high-level block diagram and there&#x27;s every reason in the world to have that clearly defined before actually building a system.<p>But, then when you go to actually implement and testing something designed this way that&#x27;s non-trivial. That&#x27;s the point where I am arguing that OOP should not be manner in which the implementation is expressed because the paradigm is optimized for organizing functions that operate on common data context. But, not for organizing actors that must share data and carefully coordinate the which and in what order functions are applied to modify that data.
评论 #22539236 未加载
评论 #22537013 未加载