[04:02:24] [connected at Sun Oct 24 04:02:24 2004] [04:02:24] <> *** Looking up your hostname... [04:02:24] <> *** Checking ident [04:02:25] <> *** Found your hostname [04:02:55] <> *** No identd (auth) response [04:02:55] <> *** Your host is niven.freenode.net[niven.freenode.osuosl.org/6667], running version dancer-ircd-1.0.35 [04:02:55] [I have joined #peak] [04:02:55] ** niven.freenode.net set the topic to http://peak.telecommunity.com is back on line [06:25:18] ** gbay has joined us [10:20:19] ** vlado__ has left IRC (Read error: 110 (Connection timed out)) [12:37:18] ** vlado has joined us [13:43:22] ** pje has joined us [13:44:05] ** pje set the topic to peak.web Tier 1 in October - the countdown is on! [13:44:15] * pje waves [13:44:29] yo pj [13:44:36] Obviously, I'm getting a bit excited about actually having a functional peak.web. :) [13:44:39] Hi gbay. [13:45:16] I just checked in the final "quirk fix" for sitemaps, so it's now just a matter of finishing the currently-proposed PWT features. [13:45:19] Everything good with peak =) [13:45:58] "Everything" is a big word, gbay. :) [13:46:27] pje: I don't understand how one guy can do all the stuff you do, I keep getting impressed =) And I'm gratefull for protocols.. I love it [13:47:06] gbay, if you spread it out over enough years... :) [13:47:29] Don't forget that in the beginning there was ASDF, and ASDF begat ZPatterns, and ZPatterns begat TransWarp, and TransWarp begat PEAK. [13:47:52] pje: Yeah =) Ahh.. I'm not into the history but cool [13:48:15] Yeah, I'm looking forward to exploring peak.web on my new project, but I need forms and I heard you say that part isn't there, so I'm wondering how hard doing forms is going to be? I presume it's quite possible, just not made convenient the way the rest of Peak is so convenient :) [13:48:22] I'm just pointing out there's like nearly 8 years of history involved. [13:48:50] Right rdmurray. Naturally it'll be *possible*, it just won't be automatic. [13:49:20] Really, tier 1 peak.web will have enough in it to write a really interesting "Hello World" for the tutorial. [13:49:36] pje: wow.. eight years. Had no idea.. now I understand. [13:49:45] But it won't be enough to write "serious" apps with, only like documentation tools and such like. [13:50:18] gbay: the hard part is design. Each of those names I threw out there were efforts to find the "right" design for a Python "enterprise" component model. [13:50:49] So, you could almost say I've written the same stuff three or four times, and if you do that long enough you get pretty good at it. :) [13:51:23] Yeah, the design thing is amazing. I can't always follow your logic, but the end results show that you know exactly what you are doing. [13:51:30] Really though, most of my productivity in the last year or two is due to 1) the peak "core" being pretty much sorted out, and 2) test-driven development. [13:51:59] pje: I hear you.. I've got a lot of design issues on PUB as well [13:52:06] The core being sorted out means that these days I'm mostly building stuff *using* the core, and the core is intended to make people very very productive. :) [13:52:14] :) [13:52:38] I wouldn't have dared tackle my current project with my current deadline without that. [13:52:51] Without what? [13:53:06] The productivity bost Peak gives to this kind of app. [13:53:11] Ah. Cool. [13:53:49] So what do you currently plan to use for the web part? [13:54:08] I got all my database issues sort out, by the way. I'll be starting on the business rules stuff on Monday, which is of course the core of the app. [13:54:33] I'm surprised you didn't start with that first. [13:54:56] Or was it a legacy database format? [13:55:08] Legacy [13:55:33] Ah, okay. [13:55:37] Although I get to import the data and go on from there, so it's kind of weird hybrid. [13:55:51] So what do you currently plan to use for the web part? [13:56:11] Well, the web part has a much later deadline, so I haven't worried about that yet. Any suggestions? [13:56:44] Not really. Zope X3 is a lot further along in what I'd consider peak.web "tier 2" and "tier 3" facilities. [13:57:04] (To tell the truth, writing the code for the business rules first didn't even occur to me.) [13:57:18] But you'd have to do some work to generate e.g. ZX3 schemas from peak.model classes. [13:57:37] I'm out of touch with X3, so whatever I do is going to have a learning curve. [13:57:40] I usually try to start with the domain model, because you can mock up the database part. [13:58:04] E.g., just create a bunch of Customer and Account objects, or whatever, and play with them in the interpreter, create clean unit tests, etc. [13:58:55] Then the rest is a matter of transformations on the domain model: input, output, storage. [13:59:19] Makes sense. I think I started with the Model/Storage stuff because I had this legacy database file sitting there to import, and getting that to work gave me the biggest emotional payback :) [13:59:29] The main differences between Zope X3 and the peak.web approaches are that: [13:59:46] 1) Zope likes ZODB; PEAK abhors it [14:00:01] 2) Therefore, in Zope you can't really create an app in the filesystem, in PEAK you can [14:00:15] 3) Zope wants to support running "untrusted" code, PEAK will never even try [14:00:24] Which is why I use peak and not Zope these days. [14:00:25] (at least, not untrusted *Python* code) [14:00:39] (point 2, that is) [14:00:46] 4) Zope wants to do "content", PEAK does "applications" [14:01:28] Because of these differences, PEAK will be easier to implement/use for its target audience. [14:02:14] Right. If I want a CMS for non-programmers, I look at Zope. If I want to write an application, I look at peak. [14:02:21] E.g. its sitemap language is both more compact and more powerful than ZCML, for the portion of ZCML that it replaces. [14:02:57] And if you need a hybrid, soon PEP 333 will allow PEAK and Zope to run side-by-side in the same Python process, even. [14:03:23] Yeah, that's pretty darn cool. Haven't looked at it closely yet. [14:03:32] But I don't currently have a need for that myself, so I don't expect to do anything with it soon. [14:05:40] Do you have any clue when you might feel a need for Tier 2 web stuff? [14:05:44] One other PEAK/Zope difference is that peak.web is specifically designed to be able to do static site generation. [14:05:55] Well, after I finish my tier 1 apps, certainly. :) [14:06:00] :) [14:06:21] A blog is one of them, right? I'm interested in that. [14:06:34] I got a lead on a possibly interesting venture the other day, and it will probably need some tier 2 stuff, but not sure how much yet. [14:08:08] Tier 2 pretty much equals forms, menus, authorization, and authentication. [14:08:27] Yes, a blogging tool will be one of the tier 1 apps I want to build. [14:09:14] At least enough of one to replace my use of Blogger. [14:09:48] It'll be Blosxom-style, in the sense that you'll run it over a directory to produce the output. [14:10:19] The other two apps are a Python documentation tool suitable for documenting PEAK, and a mutlidimensional link indexer. [14:11:27] It's possible that one or more of these apps might need the menu facility, so that in itself might lead to a bit more of tier 2 creeping in. [14:11:54] The "macro" facility that's already in PWT now was originally supposed to be a tier 2 feature, but it turned out cleaner to integrate it now. [14:13:56] Actually, the more I think about it, the more certain I am that I'll have to add the menu facility in order to implement at least the doc tool and link indexer. [14:14:11] I don't think it'll be necessary for the blog tool. [14:14:43] Anyway, I'm not going to add it to my list for completion by next week. :) [14:15:16] I have about 8-10 PWT features that need finishing first. [14:17:12] Hmmm... suppose you could implement form widgets as views? [14:17:36] (on model.Features) [14:18:44] Or I guess you could at least define type-to-form *mappings* that way... [14:19:13] Like ... [14:19:51] Where the latter is a Python object that implements the code-ish parts of the form, and designates what widgets should be used, titles, etc. [14:20:50] That makes sense to me. [14:21:15] Oh wait, even better... the form can be the URL target, and then it uses a layout view from its target to wrap itself in a GUI. [14:21:36] So, you don't make a template for the form, you just make a template for "here's what a page on this object looks like". [14:21:55] And the form just inserts itself into the slot for where the body goes. [14:22:42] [14:22:54] To tell it what layout view to use, or something. [14:23:27] Although I guess technically you need a page layout and a form layout, where the form layout puts itself into the page layout. [14:24:07] The form layout is a view applied to the form; the page layout is a view applied to the object the form applies to. [14:24:28] It's sorta fractal if you think about it. :) [14:24:32] :P [14:24:35] I mean :) [14:25:04] And the 'form' is the bit of python code? [14:25:07] That is, the form view lays out the form, but for each field it applies sub-views to render the title and widget for each item. [14:25:22] Yeah, a class or something that specifies the mapping from the domain model to form fields. [14:25:47] Although some of that can be "guessed", there needs to be a way to override the guesses. [14:25:56] Yeah. [14:26:04] For example, a model.Enumeration might be expressed as radio buttons or a dropdown. [14:26:36] Also, if the form itself is defined by a class, it means you can create content views on it, to override the standard layout. [14:27:13] ... [14:27:26] See? A view on the form, rather than on the customer. [14:27:45] All of what I'm describing can of course be done with the existing sitemap and template system. [14:28:39] It would just be a matter of designing the interface for these "form" and "widget" objects to use, that the templates would use to render them. [14:28:40] Ah. So maybe that's what I'll use for my web interface :) Assuming I can puzzle out how to make it work for real. I don't know anything about peak.web yet. [14:28:57] And of course implementing the form objects themselves. :) [14:29:02] Right. [14:29:25] 90% of peak.web is the sitemap and the templates. [14:29:46] Check out 'test-sitemap.xml' in the peak.web.tests package. [14:29:57] Or better, the example I posted on the mailing list. [14:30:26] You can create "hello world"-ish applications with just a sitemap and some page templates. [14:30:46] And if you don't know the PWT language, an XHTML file will suffice as a crude template. :) [14:30:56] (i.e., one that doesn't do anything but show itself.) [14:31:18] In fact, here's "Hello World" in sitemap: [14:31:36] [14:32:04] Then put 'hello.pwt' in the 'somepkg' directory, and put 'peak.web.resource_pacakges.somepkg = True' in an .ini file. [14:32:34] Finally, run 'peak launch ref:sitemap@file:my-sitemap.xml' to bring it up in your browser. [14:32:54] Oh, and that sitemap should be: [14:33:03] [14:33:22] That does indeed look like a new chapter for the tutorial :) [14:33:23] So you can put the .ini stuff in 'hello.ini' in the same directory as the sitemap file. [14:34:14] Yep. Then the next step after that is that you add a to the location, so that going to myapp/username gives you a custom greeting for that user. [14:34:51] Of course, to do that, you'll need a [14:35:06] And add a 'showGreeting' template. [14:35:18] (Yes, it's really just that simple.) [14:35:31] cooll [14:35:38] s/ll/l/ [14:35:56] So it actually won't make a very long chapter. :) [14:36:46] Short chapters are not bad :) [14:37:12] At least the sample code will be short, anyway. The explanations of how it works, and all the options you have available might take a bit more space. [14:38:18] For example, the '' tag can use 'resource', 'expr', 'object', 'attribute', or 'function' to specify what will be used as the view. [14:38:37] * pje grins [14:38:53] Yes, I don't think we will need to worry about it being light on content :) [14:39:04] And that's ignoring optional attributes like 'permission' and 'helper'. :) [14:40:17] Oops, it's getting late; I've got some errands to run. [14:40:44] see you. I'll doubtless have lots of questions when I get to try using peak.web. [14:40:51] That will be next month. [14:40:58] Sure, but that's how the tutorial gets written, right. ;) [14:41:09] s/./? [14:41:19] right :) [14:42:16] * pje waves [14:42:19] Later, all [14:42:23] ** pje has left IRC ("Client exiting") [15:39:59] ** vlado has left IRC ("Leaving") [23:24:32] ** teratorn has joined us [23:24:55] hello [23:35:17] ** Maniac_ has left IRC ("Chatzilla 0.9.65 [Mozilla rv:1.7.3/20040913]") [23:39:46] i'm interested in using the deferred importation magic in my app [23:41:04] Your best bet right now is to email the mailing list. I know it has something to do with lazymodule, but that's the extent of my knowledge :) [23:43:13] yeah i was just reading the source for lazyModule [23:43:20] it looks pretty straight-forward :) [23:45:21] the relativePath arg makes my head hurt [23:45:28] but I think I can ignore it :)