[00:00:15] ** pje_ has joined us [00:00:29] Damn DSL. [00:00:31] Sorry about that. [00:00:43] Wonder who the other me is? :) [00:00:52] what was the last line you got? [00:01:04] "what additional work do you mean" :) [00:01:11] But I read your reply in the logs. [00:01:18] So, what I was going to say was... [00:01:23] ;-) [00:01:33] peak.query will let you do those things with events. [00:02:03] You can implement all sorts of "business rules" using the relational algebra. [00:02:04] so i'm looking through an application where i did a dm per class style impl, most of this looks like it would be fine with composition using a peak dm [00:02:11] Or really, sort of a pipes-and-filters thing. [00:02:51] Well, PEAK DM's are certainly at least as usable as the old ZPatterns stuff. [00:03:03] I just am trying to push them to the next level. [00:03:26] And that means business rules need to not be part of storage logic, or necessarily even domain logic. [00:03:53] I guess you could say that that's one of my big learnings since ZPatterns: business rules are not domain logic! [00:04:24] i'll go back to lurk mode then, i have faith ;-) [00:04:30] Yes, they are "logic" expressed over the "domain"... but that's not the same thing. :) [00:05:05] That is, business rules need to be modularly separate from true domain logic, and they need to be declarative. [00:05:13] An example is peak.security's security rules system. [00:05:53] It uses logic over the problem domain objects, but the code is separated, declarative, and configurable per-use of a set of application components. [00:06:23] lets go back to domain logic (not quite back to lurker yet) [00:06:34] So, that's the model I want the broader business rules system in PEAK to follow. [00:06:39] Sure. [00:06:48] i generally structure my relational models as pseudo object models with fk chaining to a base object table [00:07:00] Okay. [00:07:12] pje_ is now known as pje [00:07:47] create table objects(object_id) ; create table forms(form_id ref object_id) etc, sometimes i generally do a pl/sql pl/pgsql api for creating new objects that does the proper thing wrt to inserting into base tables [00:07:56] * pje nods [00:08:20] so here is an example method on the dm from an publication type application [00:08:39] def activate(self, publication_id): [00:08:39] """ [00:08:39] make an archived publication active again [00:08:39] """ [00:08:39] uid = self.getContext().getUser() [00:08:40] self.executeSimpleDML( [00:08:42] """ [00:08:44] update pw_publications [00:08:46] set active_p = 't' [00:08:48] where publication_id = %s [00:08:50] """, [00:08:52] parameters = (publication_id,) [00:08:56] ) [00:09:00] self.executeSimpleDQL( [00:09:02] """select isi_object__update(%s, %s)""", [00:09:04] parameters = (publication_id, uid) [00:09:06] ) [00:09:38] so basically an audit/update explicit method onto a base table thats aggregated behind the dm op [00:10:02] i find these types of things hard to express in a purely model driven environment [00:10:08] er. i have found [00:10:44] I guess I'm confused. What's wrong with doing, e.g. Publications[publication_id].activate()? [00:11:56] Boy, considering this is a fairly simple HelloWorld app, I've refactored it an awfuly large number of times :) [00:13:04] nothing, afaics.. that was a bad example.. the python objects where dumb dicts based off opalgroup's row module... my bad. [00:13:58] doh... ok, now i really will go back to lurk mode... and come back after i start using peak ;-) [00:16:05] ** pje_ has joined us [00:16:22] Grr. [00:16:30] Looks like a lot of my typing was lost... [00:16:34] ISTM that everything will boil down to either: [00:16:37] 1) manipulation of state [00:16:40] 2) triggering of business rules [00:16:45] Right now, PEAK DM's aren't good at mass changes of state. [00:16:50] You can't do mass updates or deletes, IOW. [00:17:14] And it has no place to hook business rules, either. [00:17:28] Both of those should be able to change once peak.query lands. [00:23:46] Hello? [00:25:20] I guess he was serious about returning to lurker status :) [00:27:04] * pje_ reads the logs [00:27:08] Ah, didn't see that. [00:27:26] Must've been during my second DSL blackout. [00:27:32] pje_ is now known as pje [00:27:34] Ah well. [00:40:11] * pje yawns loudly and repeatedly [00:40:41] * rdmurray hopes pje hangs on just a tad longer, because he's about to upload the next chapter [00:41:15] Oh no, now I'll never get to bed. [00:41:18] * pje chuckles [00:41:20] heh [00:41:38] I stayed up till 3:30 or so last night editing the last chapter. :) [00:42:05] well, I've got five or ten more minutes of editing to do, so if you run away quick you can get some sleep :) [00:42:15] I'd better do that. [00:42:34] Thanks again for all your help, it's been a big morale booster. [00:42:40] cool :) [00:42:50] I knew that something like this was needed, but I've been really dreading writing it. [00:43:21] I think this will let me focus more on improving the reference documentation. [00:43:38] And then maybe producing "advanced" guides to various topics. [00:43:45] that sounds good. [00:44:04] It's really only introductory material that's hard for me. [00:44:18] But it's what PEAK needs most right now. [00:44:43] Now, if you could just do one of these newbie guides for PyProtocols, I'll be all set. :) [00:45:06] Anyway, guess I'd better run before the window of opportunity closes. :) [00:45:07] Yeah, I have that problem with stuff I write. But here, I don't know the advanced stuff, so it doesn't get in the way of my writing down what I do know/can figure out. [00:45:14] :) [00:45:31] Guess I better not write about anything advanced till you finish the tutorial, then. :) [00:45:44] Anyway, thanks again, you've been a big help. [00:45:47] See y'all later. [00:45:51] You are welcome. [00:45:53] see you [00:45:58] * pje waves [00:46:01] ** pje has left us [03:53:48] ** gpciceri has joined us [12:26:04] ** rdmurray has joined us [13:51:57] hello peakers [14:49:39] ** rdmurray has joined us [19:53:24] ** hazmat has joined us [19:53:50] * rdmurray tries to figure out sqlite. [19:56:38] * rdmurray tries to remember sql. [20:00:55] wow, group is not valid as a table column name. That's kind of weird; the syntax isn't ambiguous (I think). [22:21:39] group would be a reservered word. ie. "group by" [22:22:30] Yeah, I forgot that there are sql sentences in which it would be ambiguous whether or not it was a column name. It just wasn't ambiguous in the 'create table" command :) [22:24:40] Hey, what's the thing in front of the ":" called in a PEAK URL? [22:24:59] And the thing after the ":", for that matter. [22:45:21] Hmm. From the docstrings I would actually have expected 'peak shellcmd:ls -l' to work, but it doesn't. You have to use 'peak shellcmd:"ls -l"' if you want the -l passed to ls. [23:46:32] Hmm. What's the hierarchy for .ini files overriding each other?