Re: [Pharo-dev] Why does not have a standard Tree Structure in Pharo? ( stepharo )
Hi Stef, I mean, Tree structure is a standard Data Structure including store, edit and visit. (endorder,preorder). tree as a struture has a set of protocol for operations. TreeStruture is a class of Dolphin ( it has become an opensource project now ). TreeStructure implements the <treeModel> protocol and organises a collection of objects into a tree like data structure. You can organise the objects with TreeStructure when need a tree. Only one class for all applications. I think. But in Pharo , there is no such a standard tree structure. so people makes theri owns. e.g. FTDataSource subclass: #FTTreeDataSource MorphTreeModel subclass: #SpecTreeModel Model subclass: #MorphTreeModel Dictionary subclass: #KeyedTree (not real tree) these implements mix tree structure and other attributes. if we have a standard tree struture, so we can seperate them, make the system become clean and simple. Best Regards! Liang
Ok I see. Indeed. You are right. If you want to help proposing one then we can improve the situation together.
Hi Stef, I mean, Tree structure is a standard Data Structure including store, edit and visit. (endorder,preorder). tree as a struture has a set of protocol for operations. TreeStruture is a class of Dolphin ( it has become an opensource project now ). TreeStructure implements the <treeModel> protocol and organises a collection of objects into a tree like data structure. You can organise the objects with TreeStructure when need a tree. Only one class for all applications. I think.
But in Pharo , there is no such a standard tree structure. so people makes theri owns. e.g. FTDataSource subclass: #FTTreeDataSource MorphTreeModel subclass: #SpecTreeModel Model subclass: #MorphTreeModel Dictionary subclass: #KeyedTree (not real tree)
these implements mix tree structure and other attributes. if we have a standard tree struture, so we can seperate them, make the system become clean and simple.
Best Regards!
Liang
But please notice that FTTreeDataSource is not a âTree Structureâ, and it is not its purpose⦠FTTreeDataSource is a data source :) a provider of data for visualisation purposes, in a tree way. This is very different than been a tree structure⦠for example, FTTreeDataSource could *contain* a tree structure⦠or not, it could just calculate children as demanded (for example is browsing a file system), etc. Esteban
On 23 Apr 2016, at 11:10, stepharo <stepharo@free.fr> wrote:
Ok I see. Indeed. You are right. If you want to help proposing one then we can improve the situation together.
Hi Stef, I mean, Tree structure is a standard Data Structure including store, edit and visit. (endorder,preorder). tree as a struture has a set of protocol for operations. TreeStruture is a class of Dolphin ( it has become an opensource project now ). TreeStructure implements the <treeModel> protocol and organises a collection of objects into a tree like data structure. You can organise the objects with TreeStructure when need a tree. Only one class for all applications. I think.
But in Pharo , there is no such a standard tree structure. so people makes theri owns. e.g. FTDataSource subclass: #FTTreeDataSource MorphTreeModel subclass: #SpecTreeModel Model subclass: #MorphTreeModel Dictionary subclass: #KeyedTree (not real tree)
these implements mix tree structure and other attributes. if we have a standard tree struture, so we can seperate them, make the system become clean and simple.
Best Regards!
Liang
There are BTrees (I made a copy in my Smalltalkhub): http://www.smalltalkhub.com/#!/~philippeback/Trees http://stackoverflow.com/questions/6917310/tree-implementations-in-smalltalk HTH Phil On Sat, Apr 23, 2016 at 11:35 AM, Esteban Lorenzano <estebanlm@gmail.com> wrote:
But please notice that FTTreeDataSource is not a âTree Structureâ, and it is not its purpose⦠FTTreeDataSource is a data source :) a provider of data for visualisation purposes, in a tree way. This is very different than been a tree structure⦠for example, FTTreeDataSource could *contain* a tree structure⦠or not, it could just calculate children as demanded (for example is browsing a file system), etc.
Esteban
On 23 Apr 2016, at 11:10, stepharo <stepharo@free.fr> wrote:
Ok I see. Indeed. You are right. If you want to help proposing one then we can improve the situation together.
Hi Stef, I mean, Tree structure is a standard Data Structure including store, edit and visit. (endorder,preorder). tree as a struture has a set of protocol for operations. TreeStruture is a class of Dolphin ( it has become an opensource project now ). TreeStructure implements the <treeModel> protocol and organises a collection of objects into a tree like data structure. You can organise the objects with TreeStructure when need a tree. Only one class for all applications. I think.
But in Pharo , there is no such a standard tree structure. so people makes theri owns. e.g. FTDataSource subclass: #FTTreeDataSource MorphTreeModel subclass: #SpecTreeModel Model subclass: #MorphTreeModel Dictionary subclass: #KeyedTree (not real tree)
these implements mix tree structure and other attributes. if we have a standard tree struture, so we can seperate them, make the system become clean and simple.
Best Regards!
Liang
On Sat, Apr 23, 2016 at 12:03:03PM +0200, phil@highoctane.be wrote:
There are BTrees (I made a copy in my Smalltalkhub): http://www.smalltalkhub.com/#!/~philippeback/Trees http://stackoverflow.com/questions/6917310/tree-implementations-in-smalltalk
Also http://smalltalkhub.com/#!/~hernan/Trees, a port of Bruce Samuelson's generalized tree implementation from the early 90s. Pierce
participants (5)
-
Esteban Lorenzano -
lb -
phil@highoctane.be -
Pierce Ng -
stepharo