Home discussions products about writing Projects

Open Source for Collaborative Knowledge Development and Learning

Note: This site's content is accessible to all versions of every browser. However, this browser may not support basic Web standards, preventing the display of our site's design details. We support the mission of the Web Standards Project in the campaign encouraging users to upgrade their browsers.


Blog Entry [details and replies]

KNotations :: Documentation and development plans from the KnowNet development team Weblog 84 entries 23-June-2006 1 authors
show or hide details for this item KNSin (early development report) plone portal feeds from knotes Blog Entry 1 reply 20-June-2005 Mike Malloch
Kind:
Blog Entry
Created:
20-June-2005 07:25:36
Last Updated:
20-June-2005 09:31:38
Author:
Mike Malloch
Status:
visible
Last week we put together the beginnings of a Plone product geared to providing efficient but flexible aggregations of knotes posts and discussion for use in Plone site content. KNSin will be ready to use in some of our own sites within 2 weeks.

Knotes can deliver RSS and atom feeds quite flexibly and efficiently. This makes it easy for savvy readers to create aggregate feeds in their news readers which assemble content from knotes weblogs and disucssions in flexible and efficient ways.

But a major use for aggregating discussion and weblog content is to use it within the same Plone sites in which the content 'lives'. A common motif in Plone sites not 'built with knotes' is to have the front of site aggregate some content sources, and a few other main site actions display other aggregations: news, events, etc. It is also common to include aggregate summaris in portlets. In our own sites, we have begun to do both of these things using knotes as the source and sql-tool queries instead of z-catalogue searches. This works fine except for two drawbacks:

'Chinese menu' aggregations are difficult
If what is desired is a combination of several sources, then the straightforward method of getting a list of dictionaries with one of the knsql methods breaks down. A more general sql method is needed which can let the administrator define complex aggragations with writing python.
Efficiency
In the straightforward technique, the portal pages display totally up to the instant aggregations, and every pageload triggers an sql search. For fronts of busy sites this is a bad idea and pretty wasteful of resources. We wanted a simple tool that would allow administrators to reliably control the caching of aggregation lists

KNSin addresses both of these problems: It has a simple lines-field property in which a skilled editor can define just about any possible combination of content sources, and it also allows the editor to define a cache-control expiry for the feed data.

For instance, the following specification in the lines-field for a KNSin object asks for all the entries from 3 blogs dotted around the vetnet site, as well as entries from one category in a weblog on another site (the other site is in the same KNSQL database). See the attached screenshot as well

parentuid = 'vetnet/Members/pkamarainen/blog/entries'
parentuid = 'vetnet/collaborate/news/entries'
parentuid = 'vetnet/collaborate/vet-talk/entries'
(parentuid = 'knownet/writing/weblogs/Graham_Attwell/entries' and exists (select 1 from metadata where kndiscussion.uid = metadata.uid and category='Blogging/'))

screenshot of editing a KNSin object If the editor of a KNSin object uses the Update Period and Update Frequency integer fields to determine when data should be refreshed. If a request is made for the data before the expiry duration since it was last refreshed, cached data is returned. Otherwise, the data is refreshed. If no requests are made, nothing happens (the product does not refresh its data unless it is asked for data). The objects of this product's type are mainly intended to be sources of data, but if viewed they display a terse panel of that data. We'll be adapting our indexFolder template to make this a built-in behaviour of indexFolders with embedded KNSin objects. I'malso thinking of makinga knotes sidebar which displays summary listing of any embedded KNSin objects in the sidebar links of a weblog.

Did we have other options? We had thought to address these issues with a pure RSS tool that would digest the XML from some feeds and produce python dictionaries from them for use in portal content. We had too much trouble parsing the XML though, and since XML parsing is expensive we asked ourselves 'why parse xml for data we already have in sql'? KNSin is meant to fill the niche where within-instance data need to be assembled in flexible ways, with rich information about the items for flexible displays (for instance, branching the display based on the dc:source of the items. We had also experimented with literally serving the unparsed RSS items but transforming them in the client and on the fly with XSLT. But this seemed a flakey an inaccessible solution for embedded content ( ie xml data ilands within xhtml content ). One of these days we will write a pure-RSS tool, like CMFSin, but for the time being KNSin is what we need.

We'll be using an early version of KNSin to improve the front pages of the vetnet and NGRF sites quite soon. I'll be back with more news about this later.

Comments please

If you are already registered here, please click the "Login" button to send your username/password with the comment. Click the "Anonymous" button to leave a comment without logging in.

Please tell us who you are

E-Mail Address (Required)
We need a valid email address in order for you to post a comment. You will recieve an email containing a special validation link. The comment will not be published until validated
Name
Please leave your name
Title
Lead-in
Body Text ( HTML tags are allowed )
Validation
Please enter the text from the image above
Preview your comment


An example of KNSin in action is in my other weblog 'c-Learning' Discussion Topic 0 replies1 resource 07-September-2005 Mike Malloch
Kind:
Discussion Topic
Created:
07-September-2005 16:34:16
Last Updated:
Never Modified
Author:
Mike Malloch

Resources and Links:

c-Learning c-Learning [ Go there ]
Link to Mike's other weblog
I've just made a KNSin aggregator to provide a feed for all by blogging across the blogs and portals, and have this feed being sucked into my cLearning blog as a javascript include in my About content.

See the About sidebar in my non-techie blog, c-Learning, for an example of KNSin in action. I made a very simple KNSin aggregator to fetch my recent entries from across the blogs and portals I contribute to. I seldom get a chance to post in c-Learning and wanted visitors there to get some idea that I was still alive and writing :o)

I adopted the convention in that blog of fetching profile-ish extra feeds into the About sidebar by javascript ( this allows mashing in my delicious and flickr zeitgeists, andalso saves pageload time ). We have not had much chance to do anything with KNSin - in fact this is the first in-anger use we've made of it. I hope to get some more features and uses out of it soon, especially for generating front-of-site content and cross-site default feeds.