jonathangeiger / kohana-jelly

See the link below for the most up-to-date code
https://github.com/creatoro/jelly
MIT License
146 stars 34 forks source link

Support for model behaviors #22

Closed jonathangeiger closed 14 years ago

jonathangeiger commented 14 years ago

In this case, we can use the plan you outline in the PM you sent me. I wonder, though, should behaviors have any special access to the query builder? Your outline doesn't really account for that.

banks commented 14 years ago

Not sure. I think we will need to write the behavior code and simultaneously write at least 2 or 3 of the most important (and different) core behaviour s with it, like MPTT and any others we can think of.

I'd say, lets start by coming up with a list of the most important behaviors we want to include. I'd say two Id like to see are two tree variants, MPTT and ClosureTable.

Part of me would like these the return a Jelly_Collection_Tree which implements RecursiveIterator or similar... Not sure how easy it would be to allow behaviors to afffect things like how the query builder returns results? I think you are right - we will probably need a neat way that behaviors can modify the behavior of jelly builder. More though necessary. If this becomes ugly, I'd rather not do it!

jonathangeiger commented 14 years ago

Here for now:

0102e36b44e83437c9c72ad69a72e44ee7e30dd1

Still have work to get the core API stable.

SoftDelete and/or Versioning would be two good ones as well. I think those will be the first two I work on. I'll take a look at your MPTT one for Sprig to see if I can adapt that.