[06:18:08] --> _Maniac_ has joined #peak [06:41:32] --> _Maniac_ has joined #peak [06:46:19] [Global Notice] Hi all. Looks like the new US hub again. The last time turned out to be a Cisco router reboot, they may simply have more routers to fix. We're back, and thank you for your patience. [07:22:45] --> _Maniac_ has joined #peak [07:27:57] [Global Notice] Hi all. Some quick rehubbing, which we hope will resolve our current problems. It's worth reminding you that freenode needs more hubbing, http://freenode.net/sponsoring_servers.shtml .... thanks [07:28:50] --> _Maniac_ has joined #peak [07:35:34] --> _Maniac_ has joined #peak [07:38:22] --> _Maniac_ has joined #peak [15:16:23] --> jack-e has joined #peak [15:23:13] {global notice} Good afternoon all, we are having some problems with hubbing and are working on fixing the situation. any further messages will be given in wallops [15:46:55] --> pyniac_ has joined #peak [15:54:46] <_Maniac_> heloo jack [15:56:15] {global notice} Hi all. we're going to do some rehubbing of main rotation servers to see if we can work around the hubbing problems we had a little while ago. Any further messages will be given in wallops. Thank you for your patience, and thank you for using freenode [15:58:25] --> pyniac_ has joined #peak [15:58:25] --> _Maniac_ has joined #peak [15:59:11] --> pyniac_ has joined #peak [15:59:11] --> _Maniac_ has joined #peak [15:59:29] heya maniac [16:32:00] --> pje has joined #peak [16:32:03] Howdy. [16:34:04] Since y'all were so helpful on Friday in getting the PWT design fleshed out, I thought I'd pop back in and see if there were any opinions on the terminology. :) [16:37:03] * jack-e has read the irc-log and is just about to read the code you wrote .. [16:38:05] All the pieces really fell into place on Friday; writing it was a breeze. [16:38:23] Now the hard part: naming it. :) [16:39:12] Twisted uses 'model' and 'view' as attribute names, but I'm starting to lean towards wanting to use 'view' to mean what's currently called 'location' in peak.web. [16:39:31] (Because locations basically correspond to Zope 3's notion of 'view') [16:40:12] So, to replace 'view' I'd need a short word that implies "visual component". [16:40:27] If this were Java, I'd use "bean"... :) [16:40:39] And if it were VB, I'd use "control"... [16:41:57] * jack-e is not good in finding proper names .... [16:51:10] What does wxPython call them? Widgets? Controls? [16:51:25] [Global Notice] Good evening, all. News is up on the freenode website, http://freenode.net/news.shtml .... have an excellent night! :) [16:52:01] when you're talking about things like TextBox, Button, Tree .. then they say "Control" [16:53:14] where i wouldn't find it intuitiv for pwt, that something that renders a list to html is a control (if i understood what you're doing correctly) [16:53:34] That's true. [16:53:46] * pje hates having to come up with names for new ideas [16:54:05] when i can slide it or input text than control is ok .. but only if there is interaction (in the users pov) [16:54:06] So what *would* you find intuitive? :) [16:55:44] widget (if it's about small things like render this string to a input-type text) or view (if it is about how to represent an object in x(ht)ml) [16:56:00] Hm. [16:56:18] you want a name that implies both .. am i right ;-) ?? [16:56:18] The problem is that it's both and neither. :) [16:56:23] :) [16:56:42] Yeah, because you can make one that just does a widget, or you can make one that controls a complex form or navigation layout. [16:57:20] Maybe I should call them eXtreme Widgets [16:57:25] Or Xidgets. :) [16:57:35] XML controls [16:57:39] wiews :) [16:57:47] Heh. [16:58:03] XML adapters [16:58:10] Transformers [16:58:12] Projectors [16:58:19] lenses.. [16:58:58] Hm. lens doesn't seem too bad, except it doesn't go with "model". :) [16:59:22] You almost want to make model->"slide" :) [16:59:49] * pje sighs [17:01:03] nothing that really hit's the point without suggesting too many other things imho [17:01:21] The essence is that it's a component that generates a portion of an XML document. [17:02:00] Hmmm... domlet? :) [17:03:01] i still think that view would be one of the best descriptions so far [17:03:32] Yeah... but it's hard to have two mutually incompatible meanings for "view component" in peak.web. [17:04:06] view-component as the thing that is found at a location vs. view-component that renders part of a doc ? [17:04:14] And if someone migrates from Zope 3, they are going to be confused, because this is nowhere near the same kind of view as in Zope 3. [17:04:19] Yes, exactly. [17:04:27] hmm :) [17:04:51] And the doclet or domlet kind of view is exclusively for XML rendering... it can't double as the other kind, or vice versa. [17:04:58] At least not without a lot of work. [17:05:37] so lets summarize: [17:05:46] you find a view-component at a certain location [17:05:53] I'm kind of liking doclet or domlet from the perspective that "let" implies a small component, possibly visual... it also sounds like the end of the word "template", at least a little. [17:06:07] is this equal to the template (if the location points to it) ?? [17:06:26] Er, there's a class/instance distinction we need to make here. [17:06:46] The view="" attribute names a class or factory for constructing the actual component. [17:07:10] within the template you mean ? [17:07:36] Yes... and the "template" itself (TemplateDocument) is really just another domlet. [17:08:23] There's an adapter from templates to IWebMethod, that renders the template in its render() method. [17:08:23] so if the template is a domlet, from what thing is it a *part* ? [17:08:42] I don't understand. [17:09:20] The template is the template... like a DTMLFile() object. [17:09:38] what do you mean with template is just another domlet ? [17:09:53] Just that... it's an ITemplateElement like any other. [17:10:05] It has a renderTo() method that outputs XML. [17:10:36] and you provide an adapter from IWebMethod to ITemplateElement to hook it into the publisher ? [17:10:55] The other way around, ITemplateNode -> IWebMethod, yes. [17:11:03] (ITemplateElement subclasses ITemplateNode) [17:12:40] * pje is beginning to like domlet as a term for the component, even if not for the attribute [17:13:25] * jolby finishes scrolling... [17:14:13] Maybe I should use the show:what, show:how, show:this attributes, and just say that "how" identifies a domlet class or factory. [17:14:22] pje: so just to get clear-- the main objection to "view" is that it conflicts with naming conventions in other (woven, ZPT) web gui toolkits? [17:15:00] Jolby: it conflicts with Zope 3's "view" concept. It actually is the *same* as Woven's "view". [17:15:41] I sort of like view. Its short. The concept (in how it fits into a MVC structure) is well known. [17:16:10] After "living a while with" the "location" term that's been used in peak.web so far, I don't like it, because I keep finding myself saying "it's just like a view in Zope 3." :) [17:17:40] right-- but if possible you should define it in your own frameworks terms, not in terms of "hey this little bit is quite a bit like Zope.blah, and this bit is like twisted.baz" [17:18:02] Me for instance-- I don't know what Zope views are. [17:18:59] True... but if I said that a "view" provided presentation methods for domain components, you'd find that okay, right? [17:19:14] correct. [17:19:35] That to me is the clearest. [17:19:48] The trouble here is that PEAK has two kinds of "views"... one that provides URL navigation, and one that provides XML. [17:20:15] And the navigational one is generally a specific adapter for a particular domain component. [17:20:30] Selected by the type of the component. [17:20:46] Whereas the one used in a template, is explicitly named and could apply equally to a wide variety of data objects. [17:21:09] (in the general case; obviously one could make very app-specific domlets as well) [17:23:53] so one is general (list of text items outputs table in xhtml), and one maps directly to your domain object (LineItem)? The specific one would use the general widgets in its output yes? [17:27:58] --> yarcat has joined #peak [17:29:04] hi, could could tell me what is the way to set a default value to the property not using ini file. I'm talking about smth. like: logger = binding.whenAssembled(logger, [17:29:04] offerAs=[ [17:29:04] interfaces.ILogger, [17:29:04] PropertyName("peak.logs?") [17:29:04] ], doc="Our specific logger") [17:29:29] Sorry - PropertyName("peak.logs.*") [17:33:29] yarcat: you can't offer an attribute as a wildcard/default rule. [17:33:46] jolby: yes. [17:34:03] * pje was away for a moment, answering a question from Ty [17:35:17] yarcat: but, if you want to set up a rule for subcomponents in your 'def logger()' method, you can. [17:36:04] pje: how can i do this? [17:36:04] You would do something like 'self.registerProvider(PropertyName('peak.logs.*'), lambda ...)' [17:36:33] Look at the config.IRule interface to know what the lambda signature should be. [17:36:52] And the config.IConfigurable (I think) interface describes 'registerProvider'. [17:37:03] Anyway, read peak.config.interfaces. [17:37:31] thnx. i'll try to do smth [17:37:39] smth? [17:38:22] smth - something [17:38:23] http://peak.telecommunity.com/doc/src/peak/config/interfaces.html [17:39:03] Click on IConfigurable and IRule. [17:39:46] IConfigurable has registerProvider() [17:40:06] binding.Component implements IConfigurable and IConfigSource. [17:40:15] pje: well it seems to me that the URL nav component maps conceptually to the word "view" better. The general use ones map to "widget", "domlet" or what have you pretty well. [17:41:01] Yep. [17:41:21] Jack objects to "widget", though, and I largely agree. [17:41:23] I'm not really too hung up on the names. If they're consistent and documented, I can work with 'em [17:41:38] Because widgets in most GUIs are a lot more concrete than these things. [17:42:05] I kind of like "domlet" because nobody's using it, but it sounds like some kind of XML applet. [17:42:27] And because it sounds like something you need to break a few eggs for. :) [17:42:49] :-) [17:43:19] Just tossing stuff out: How about "viewlet". LIttle reusable view components. [17:43:26] What did you think of the show:what/show:how/show:this attribute name? [17:43:35] Hmm.. viewlet. *Interesting*. [17:44:48] Googling it reveals widespread use as a term for slideshow-like web presentation. [17:44:55] Or at least, highly ranked usage. :) [17:45:35] pje: The show:what/show:how would be: show:what == the main domain component being viewed (URL nav), show:how == being the (widgets,domlets..) being used to spit out the xml representation? [17:46:05] Yes, and show:this="listItem" is a parameter for the domlet. [17:46:58] If this were Java, I'd probably call it 'paramName'. [17:47:12] And "view" would be 'xmlBean'. :) [17:48:29] Another possibility... domlet:subject, domlet:factory, domlet:paramName [17:48:30] hehe-- I'm tired of blahZZZZBean stuff. [17:48:40] But those are very verbose. [17:48:45] ya [17:51:47] I think I'm pretty sold on DOMlet as a term for a XML component. It sounds like it works well in explanation. [17:53:04] "PEAK features DOMlets, simple components that generate XML or HTML. DOMlets go beyond templating languages by turning XML/HTML tags into objects of a classes named in a source document." [17:53:40] "peak.web.templates provides several DOMlet base classes you can use or easily extend, to create custom XML widgets for use in your own applications." [17:53:53] So... an XML widget is an example of something you can do with a DOMlet. [17:55:51] (Interestingly, PWT is actually an XML configuration language for components, in much the same way that ZConfig constructs component trees.) [17:56:51] pje: thnx. It seems to work [17:57:17] yarcat: There's lots of gold in them thar interfaces. :) [18:09:32] pje: but why I can't do the same stuff, using binding.whenAssembled(..., offerAs=[ILogger, PropertyName("smap.eggs.*")])? [18:12:58] Because offerAs only offers attributes, and it's defined at the class level. [18:13:29] The registries used are very different. [18:13:38] I imagine I could make them more similar. Just never had a reason. [18:14:01] Ordinarily, I want to use a .* property to create a rule that computes something based on the part after the '.' [18:14:05] Ok. I understand. Thnx [18:14:26] The case where you actually want to use the same value for all the possible .* values is actually pretty unusual. [18:14:40] I mean, I suppose it works as a default. [18:15:24] I just was trying to find a walkover way to do some things :) Now I'm fixing my code [18:16:08] walkaround to be correct [18:16:49] --> jack-e has joined #peak [18:19:13] pje: one more question. I have unreadable lines in my log file: [18:19:14] Jul 21 21:17:29 YC PEAK[1120]: /*/*/*/AppRootComponent/SocketServer/mac_127.0.0.1_9999 at 127.0.0.1:9999 connected to 127.0.0.1:2497 [18:19:59] I want to have my own logging root component. and it could change during run-time. what is the better way to do it? [18:20:54] I don't know what you mean. [18:21:24] Do you mean, you'd like to create your own ILogger implementation(s)? [18:21:54] may be [18:22:53] You see I have AppRootComponent. I want to see this component as a root in a log [18:24:00] It sounds like the issue is that you want to display a shorter component path. [18:24:06] Which doesn't have anything to do with logging, per se. [18:25:10] binding.getComponentPath() takes an optional 'relativeTo' argument to indicate how far up you'd like to go. [18:25:23] Ok. I'll ask later, when I'll really understand, what I want... Or, to be honest, I understand, but can't translate it to english [18:25:28] So if you're currently using it to get the path used in your log, you can pass it the object you want to treat as a root. [18:25:35] I can't use relativeTo... But can't describe why [18:25:42] So then you'll just get AppRootComponent/...whatever [18:25:48] Okay. [18:26:37] Note that if the issue is that you don't know what component should be used for relativeTo, you can always mark it with an interface and use findUtility. [18:38:32] Hmm... looks like Ty likes 'data=""' and 'format=""' [18:39:04] as attributes in markup i find these terms ok [18:40:17] They're at least not awful. :) [18:40:23] yes :) [18:40:40] I need to go get some food, and then I have a meeting shortly thereafter. [18:41:07] I think I'm going to have to sleep on the naming decisions. [18:46:26] See y'all later.