[Dbix-class] RFC: DBIx-Class-Tree
Matt S Trout
dbix-class at trout.me.uk
Tue Apr 4 18:54:39 CEST 2006
Dave Howorth wrote:
> Aran Deltac wrote:
>>> attach_child - DBIC follows the CDBI convention of add_to_*. So why not
>>> call this method add_to_children? The description could also be clearer.
>> Because Matt asked me to follow the DOM naming conventions, which I think
>> I have to the best of my ability. Some of the method names I've chosen
>> are not directly from the DOM methods, but are heavly influenced by them.
>
> Urgh, IMHO :) What's special about the DOM that it deserves such
> respect? And worth breaking internal consistency for? It would be nice
> to have a mention in the docs to explain the apparent inconsistency
> (ideally to the source of the names, because I haven't been able to find
> a fair few with a bit of googling).
Well, I suggested it because I didn't have a better idea - and the DOM is
probably the single best-known tree API. Doesn't mean we can't come up with
something better - anybody want to sketch out a better set of names for the
methods?
>> Its in the Ordered component. Any method that exist in
>> Tree::AdjacencyList or Ordered components is not shown in
>> Tree::AdjacencyList::Ordered component. I've added a section listing
>> the methods that are made available via these other two components. You
>> would still need to read the related component's POD for detailed docs
>> on the methods.
>
> I appreciate this dilemma. As the reader in this instance, I can just
> point out that this policy makes it more difficult to use the module. If
> I were the maintainer, I might well have a different opinion :)
Which brings us back to a regular problem with DBIC's lots-of-components
nature. I think what we really need is a magic script to assemble to bits of
POD from other modules into one that uses them in a way that doesn't get in
the way of the maintainer.
>> A DAG is a bit of a different beast than a Tree, but I'll keep it in
>> mind. Sounds like a deffinate possibility.
>
> Well, a tree is a special case of a DAG, so an interface that can handle
> DAGs can handle trees, but not necessarily vice versa.
From a user's point of view a tree is just a DAG constrained to a single
parent, right?
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Dbix-class
mailing list