On Mon, Apr 8, 2013 at 1:30 AM, Dave Howorth <dhowo...@mrc-lmb.cam.ac.uk>wrote:
> Bill Moseley wrote: > > Anyone using DBIC to represent hierarchal directory (folder) structures? > > > > Essentially just like a file system, except users each have their own > root. > > To add to the complexity, I need to be able to "share" folders and all > > child elements to other users. > > Just a thought, and most likely irrelevant to your application, but file > system hierarchies are frequently a poor match to the users' > requirements. The user would often really prefer multiple parents (i.e. > a DAG) and/or classification tags for 'files'. Those features would lead > to a different implementation. > Yes, I prefer the tag system as a user, too. And I find it is easier to model as a set of normalized tables. Especially if the leaf nodes are well defined like an email message. Then tables are "message" and "tag" plus link tables to associate them together "tag_message", as well as "user_message", "user_tag" which can carry access permissions to facility rights and sharing, for example. Usage patterns are hard to predict -- especially when the same model is used for web, mobile, and API users. We have some API users that add tens of thousands of items in a single folder, and others that create a huge number of folders with just a few entries in each. Things to keep in mind when designing the UI. -- Bill Moseley mose...@hank.org
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk