Re: Software Architecture/Design

Tom Plunket <[email protected]>
Newsgroups gmane.games.devel.sweng
Message-ID <[email protected]>
Richard Fabian wrote:
> This is meant to be data oriented development, so the data knows nothing.
> Part A will never request anything of part B because part A is just dumb
> data. Part A has no methods, neither does part B. An operation on part A
> does not request anything of part B unless that operation is for combining
> the part A stream and part B stream to do some processing.
> I'll try to clarify one more time, borrowing from Morten's SO/PO
> descriptions
> In OO, if part A calls in part B, it can happen like this:
> partA->Tick()
> {
>  /*body*/
>  if( this->SomeCondition() )
>   this->GetEntity()->GetComponentB()->DoSomething();
> }
> in Data oriented, you can do this:
> partA -> [ tick and generate B processing requests ] -> partA + partB
> process requests
> partB + partB process requests -> [ process partB ] -> partB
> Keeping the partB process requests
> this way, it's possible to use partB process requests to preload the cache
> with the right partBs so that processing doesn't stall, and you don't have
> the extra I cache miss of moving between scopes of doing the tick for partA
> and processing of partB.

Oh come now, you can't give an example of code which any respectable
OO developer would call "not OO" and say that OO should be replaced by
something else.  I mean seriously, I understand the desire to replace
"poor design" with "good design," but you could just as easily replace
the above with a "better" OO design and reap the benefits that folks
seem to be attributing to DCI.

In short- someone telling me that "the car" reaches into the engine
and pushes fuel into the injectors and fires the pistons is really
telling me that they really don't understand (how to do) proper OO
design.

This isn't to say that OO is the end all be all.  Indeed, I've said
forever and ever that it's not.  It's a tool.  The fact that it can be
used poorly does not mean it's not a useful tool, anymore than the
mess you're left with after pulling screws with a hammer is an
indication that a hammer isn't useful.  Stateful vs. stateless objects
is good to consider, and I appreciate that it's being brought up, but
it's not like that conversation diverges from OO.  Indeed, it has
'object' right in its name.

Anyway- this is a very strange discussion to me, having been steeped
in writing OO code in C, since obviously "the data knows nothing" and
all of the transformations were functions that took an "object" and
did some operation with it.

-tom!

--
_______________________________________________
Sweng-Gamedev mailing list
[email protected]
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.