The Artima Developer Community
Sponsored Link

Articles Forum
The DCI Architecture: A New Vision of Object-Oriented Programming

119 replies on 120 pages. Most recent reply: Jan 7, 2012 3:19 AM by Thorin Potjes

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 119 replies on 120 pages [ « | 1 ... 35 36 37 38 39 40 41 42 43 ... 120  | » ]
Dick Ford

Posts: 149
Nickname: roybatty
Registered: Sep, 2003

Re: The DCI Architecture: A New Vision of Object-Oriented Programming Posted: Mar 24, 2009 9:51 PM
Reply to this message Reply
Advertisement
> OK. So what happens is that if the account concept is
> involved in 10 use cases of your application, you may end
> up placing some behavior for each of those use cases into
> class Account. Deciding what behavior to put
> in and what to leave out is the designer's challenge.
>
> DCI challenges the assumption that each object has one and
> only one class. The observation is that objects need
> different behavior in different contexts. So why not let
> an object have a different class in each context? The way
> it shakes out is that you will have an anemic
> Account class in your design, and different
> traits that can be mixed into Account to
> supply just the extra (non-anemic) behavior needed for the
> use case at hand. And DCI also suggests is that use map
> these traits to conceptual roles in the user's thinking.
>


Bill, thank you for that explanation.


OK. So what happens is that if the account concept is
involved in 10 use cases of your application, you may end
up placing some behavior for each of those use cases into
class Account. Deciding what behavior to put
in and what to leave out is the designer's challenge.


That has always been my fundamental problem with OO languages like Java and C#. Grouping behavior with different contexts in the same class isn't right, but as you stated, what do you leave in and out. Maybe that's why I've always been intrigued with Common Lisp's CLOS style of OO.

Flat View: This topic has 119 replies on 120 pages [ « | 35  36  37  38  39  40  41  42  43 | » ]
Topic: Effect Choreography in Flex 4 Previous Topic   Next Topic Topic: Cooperative Visitor: A Template Technique for Visitor Creation

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use