*** rocky has quit IRC | 00:02 | |
mgedmin | timte: List() is more suitable than Tuple() here, I'd say | 00:09 |
---|---|---|
timte | yes, right | 00:09 |
timte | but should this List() be in the utility class or is that inappropriate? | 00:11 |
*** rocky has joined #zope3-dev | 00:14 | |
mgedmin | I don't know | 00:15 |
mgedmin | what's your application? | 00:15 |
mgedmin | you can either have a local utility that stores some data persistently, or you can store data in a content object and have a global utility locate and use it | 00:16 |
timte | I want to show rss feeds. | 00:16 |
timte | And I thought it I'd store the feeds in a utility. | 00:17 |
timte | but the feed urls should be editable, so I need a schema | 00:18 |
*** nathany has quit IRC | 00:19 | |
mgedmin | why utility? | 00:19 |
timte | I thought that would be the right thing to do | 00:20 |
mgedmin | I think utilities are useful when you have something pluggable, when you have more than one kind of something and need one of those configured explicitly | 00:21 |
mgedmin | things like SQL database connections | 00:22 |
timte | I associate zope3 utilities with zope2 tools, they have APIs and store some data that are global for the site. | 00:22 |
mgedmin | I think what I'm trying to say is that if you have a global utility, you have difficulties storing data persistently | 00:22 |
timte | oh | 00:22 |
mgedmin | and if you have a local utility, you have difficulties, period | 00:22 |
mgedmin | ;) | 00:22 |
mgedmin | I wouldn't say zope3 is ready for through-the-web dynamic site building | 00:23 |
mgedmin | it is very good for filesystem-based application building | 00:23 |
timte | hmm, how do you mean? I don't develop this through the web | 00:24 |
* mgedmin is not entirely sure what he means himself | 00:25 | |
mgedmin | if I were going to build an rss reader with zope 3 | 00:26 |
timte | yes... :) | 00:26 |
mgedmin | I'd create a content object that stores a list of feeds | 00:26 |
mgedmin | where each feed has a name/title/url/icon/whatever | 00:26 |
mgedmin | I'd probably be inclined to make the content object a container that stores objects providing IFeed | 00:27 |
mgedmin | then I'd write some views | 00:27 |
mgedmin | some for editing the feed list | 00:27 |
mgedmin | and one for aggregating the feeds | 00:27 |
mgedmin | um | 00:27 |
timte | and when I want all feeds I use a utility that locates this object and returns all its feeds? | 00:28 |
mgedmin | where do you want these feeds? | 00:28 |
timte | in the root of my site | 00:29 |
mgedmin | what comprises your site? | 00:29 |
mgedmin | folders and page templates stored in the zodb? | 00:29 |
timte | page templates are on file system of course | 00:30 |
mgedmin | so your site is a custom application? | 00:30 |
timte | yes | 00:30 |
mgedmin | well, then | 00:30 |
mgedmin | suppose your site provides IMySite | 00:30 |
mgedmin | you could have an attribute rss_feeds = Attribute("a container of IRssFeed objects") | 00:31 |
mgedmin | and the index.html view on IMySite would know to use context/rss_feeds | 00:31 |
mgedmin | or, if you want to be more flexible, you could adapt IMySite to some interface like IRssFeedConfiguration | 00:31 |
mgedmin | or you could go down the local utility route | 00:32 |
mgedmin | maybe it won't be painful | 00:32 |
mgedmin | the z3 developers seem to have stopped redesigning that part | 00:32 |
timte | :) | 00:32 |
timte | if I want members to be able to choose feeds, how should their feed form know where to get the "all available feeds" from? | 00:34 |
mgedmin | getSite().rss_feeds | 00:34 |
timte | hmm | 00:35 |
timte | ok, this should probably work | 00:36 |
timte | what is the problem using global utilities? wouldn't that be similar? | 00:37 |
*** eldafar has quit IRC | 00:39 | |
*** batlogg has joined #zope3-dev | 00:43 | |
*** timte has quit IRC | 00:45 | |
mgedmin | getSite() will work only when you're rendering a request that traversed inside | 00:45 |
mgedmin | it's ok to assume that in a view registered for an interface specific to your app | 00:46 |
mgedmin | it is somewhat less ok to assume that in a global utility that could be called from any context | 00:46 |
mgedmin | otoh you can make the utility perform an interface check and fall back to some default, an empty list perhaps | 00:46 |
*** batlogg has quit IRC | 00:47 | |
mgedmin | disclaimer: it is kind of the middle of the night, and I'm not sure I am able to think clearly enough to design applications I know little about | 00:47 |
mgedmin | ;) | 00:47 |
*** srichter has quit IRC | 00:49 | |
*** srichter has joined #zope3-dev | 00:50 | |
*** alecm has joined #zope3-dev | 00:58 | |
*** mgedmin has quit IRC | 00:59 | |
*** alecm has quit IRC | 01:14 | |
*** philiKON has quit IRC | 01:15 | |
*** rock1 has joined #zope3-dev | 01:18 | |
*** The|uni has quit IRC | 01:18 | |
*** srichter has quit IRC | 01:21 | |
*** srichter has joined #zope3-dev | 01:22 | |
*** alecm has joined #zope3-dev | 01:29 | |
*** rocky has quit IRC | 01:33 | |
smokeyd | hey all. How can I pass data to a zpt page from the page class (the class declared in configure.zcml in a browser:page directive). I tried setting an extra attribute in self.context (self.context.data=somehing) but I get a ForbinnenAttribute error. Is there another way to pass data to the tempate, or to set data in the context? Or is the only official way is to do it in the actual object of the context | 01:35 |
smokeyd | I hope this is still understandable :) | 01:36 |
*** rock1 has quit IRC | 01:38 | |
*** eldafar has joined #zope3-dev | 02:14 | |
*** ChanServ sets mode: +o srichter | 02:21 | |
*** vlado has joined #zope3-dev | 02:24 | |
*** srichter has quit IRC | 02:30 | |
*** nathany has joined #zope3-dev | 02:30 | |
*** srichter has joined #zope3-dev | 02:31 | |
*** smokeyd has quit IRC | 03:04 | |
*** eldafar has quit IRC | 03:31 | |
*** srichter has quit IRC | 03:32 | |
*** vlado has quit IRC | 04:01 | |
*** yota has quit IRC | 04:16 | |
*** nathany has quit IRC | 04:35 | |
*** stub has joined #zope3-dev | 04:54 | |
*** alecm has quit IRC | 04:58 | |
*** adamSummers has joined #zope3-dev | 06:26 | |
*** srichter has joined #zope3-dev | 06:27 | |
*** baijum has joined #zope3-dev | 08:41 | |
*** stub has quit IRC | 09:08 | |
*** philiKON has joined #zope3-dev | 09:53 | |
*** vlado has joined #zope3-dev | 10:21 | |
*** romanofski has quit IRC | 11:00 | |
*** romanofski has joined #zope3-dev | 11:36 | |
*** dunny has joined #zope3-dev | 11:41 | |
*** ktwilight has quit IRC | 11:47 | |
*** ktwilight has joined #zope3-dev | 11:48 | |
*** philiKON has quit IRC | 12:02 | |
*** zagy has joined #zope3-dev | 12:19 | |
*** dunny has quit IRC | 12:46 | |
*** philiKON has joined #zope3-dev | 12:57 | |
*** yota has joined #zope3-dev | 13:09 | |
*** batlogg has joined #zope3-dev | 13:43 | |
*** batlogg has quit IRC | 14:01 | |
*** stub has joined #zope3-dev | 14:05 | |
*** rocky has joined #zope3-dev | 14:27 | |
*** oferw has joined #zope3-dev | 14:36 | |
*** timte has joined #zope3-dev | 14:51 | |
*** adamSummers has quit IRC | 14:59 | |
*** adamSummers has joined #zope3-dev | 15:00 | |
*** rock1 has joined #zope3-dev | 15:14 | |
*** ignas has joined #zope3-dev | 15:23 | |
*** rocky has quit IRC | 15:25 | |
*** oferw has quit IRC | 15:28 | |
*** srichter has quit IRC | 15:36 | |
*** rock1 has quit IRC | 15:42 | |
*** rocky has joined #zope3-dev | 16:07 | |
*** srichter has joined #zope3-dev | 16:11 | |
*** baijum has left #zope3-dev | 16:11 | |
*** tiredbones has quit IRC | 16:34 | |
*** tiredbones has joined #zope3-dev | 16:35 | |
*** pcardune has joined #zope3-dev | 16:46 | |
*** rocky has quit IRC | 16:57 | |
*** rocky has joined #zope3-dev | 17:07 | |
*** stub has quit IRC | 17:35 | |
*** ChanServ sets mode: +o srichter | 18:07 | |
*** ktwilight has quit IRC | 18:07 | |
*** ktwilight has joined #zope3-dev | 18:08 | |
*** mgedmin has joined #zope3-dev | 18:11 | |
philiKON | MJ, ayt? | 18:24 |
*** rocky is now known as rocky|away | 18:40 | |
*** philiKON has quit IRC | 18:49 | |
*** alecm has joined #zope3-dev | 18:49 | |
*** philiKON has joined #zope3-dev | 18:49 | |
*** BjornT has joined #zope3-dev | 18:59 | |
*** ktwilight has quit IRC | 19:08 | |
*** ktwilight has joined #zope3-dev | 19:08 | |
*** batlogg has joined #zope3-dev | 19:12 | |
*** oferw has joined #zope3-dev | 19:20 | |
*** volvox has joined #zope3-dev | 19:23 | |
*** oferw has quit IRC | 19:46 | |
*** rocky|away has quit IRC | 19:48 | |
*** ktwilight has quit IRC | 19:51 | |
*** ktwilight has joined #zope3-dev | 19:52 | |
*** mexiKON has joined #zope3-dev | 20:24 | |
*** philiKON has quit IRC | 20:32 | |
*** batlogg has quit IRC | 20:40 | |
*** batlogg has joined #zope3-dev | 20:41 | |
*** rocky has joined #zope3-dev | 20:41 | |
*** ignas has quit IRC | 20:48 | |
*** rock1 has joined #zope3-dev | 20:53 | |
*** rocky has quit IRC | 20:58 | |
*** rock1 is now known as rocky | 20:58 | |
*** ignas has joined #zope3-dev | 21:28 | |
*** whit__ has quit IRC | 21:32 | |
*** rocky has quit IRC | 21:40 | |
*** rocky has joined #zope3-dev | 21:40 | |
*** rock1 has joined #zope3-dev | 21:50 | |
*** pcardune has quit IRC | 22:03 | |
*** rocky has quit IRC | 22:04 | |
*** rock1 is now known as rocky | 22:04 | |
*** srichter has quit IRC | 22:15 | |
*** rock1 has joined #zope3-dev | 22:27 | |
*** vlado has quit IRC | 22:41 | |
*** rocky has quit IRC | 22:42 | |
*** dunny has joined #zope3-dev | 22:45 | |
*** romanofski has quit IRC | 22:52 | |
*** rocky has joined #zope3-dev | 22:53 | |
*** rock1 has quit IRC | 23:09 | |
*** rock1 has joined #zope3-dev | 23:09 | |
*** whit has joined #zope3-dev | 23:13 | |
*** rocky has quit IRC | 23:17 | |
*** mgedmin has quit IRC | 23:18 | |
*** russf has joined #zope3-dev | 23:19 | |
*** dunny has quit IRC | 23:20 | |
*** ignas has quit IRC | 23:45 | |
*** rocky has joined #zope3-dev | 23:49 | |
*** ignas has joined #zope3-dev | 23:51 | |
*** russf_ has joined #zope3-dev | 23:52 | |
*** dobee has joined #zope3-dev | 23:54 | |
*** rock1 has quit IRC | 23:56 | |
*** zagy has quit IRC | 23:57 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!