RavensKrag / ThoughtTrace

Naturally chart out words in 2D space, mapping the relations between them. Even link to other ideas. Then, build your programs on top of the flow.
0 stars 0 forks source link

where should Entity Action constants should be stored? #7

Closed RavensKrag closed 9 years ago

RavensKrag commented 10 years ago

should Entity Action objects be stored under the Entity classes the correspond to? then what about the other Action types?

would make it easier to automate the action flow controller if the structure was the same not sure how this affects getting the Actions from Entity, though

RavensKrag commented 10 years ago

could still store the constants under the ThoughtTrace::Actions module, but then just provide interface to access them though the Entity class they're attached to?

RavensKrag commented 10 years ago

oh, but wait.

The whole point of having them under their respective classes was to have polymorphism and namespacing, which would almost certainly be lost by moving all Entity Actions under the Actions module.

May have to just give up on having everything in one place.

But that might be totally ok.

RavensKrag commented 9 years ago

The solution is to move the files that define Actions under one directory, but keep the actual constants namespaced under their respective classes for polymorphism.

Also note that Actions should always be initialized though the ActionFactory, never directly. This allowed for defining one method to extract actions from classes. That method is now inside of ActionFactory.