r14 - 10 Aug 2007 - 15:05:57 - TedLeungYou are here: OSAF >  Journal Web  >  AnthonyFrancoNotes > AnthonyFrancoParcelWriting
Parcel Writing

I thought writing my own Chandler parcel might be fun. The purpose of this page is to help with ironing out the process of writing a parcel, either by me finding problems, or by others finding problems with the way I'm doing things

ZaoBao Tutorial

I started with the ZaoBao tutorial. I thought finding it in the wiki was a little hard, or maybe I just overlooked it somewhere. I was surprised with how extensive it was considering it's so early; it brought me up to speed with what parcels are and how Chandler interacts with them. When it came to actually start coding, I ran into a few problems. This was probably due to the tutorial being almost two months old. Here are some things I had to learn the hard way.

  • the Parcel tag comes from http://osafoundation.org/parcels/core and if xmln is not set to that then you have to do the whole core:Parcel thing.
  • the main parcel.xml should have a namespace tag
  • I forgot that I had to have a __init__.py file in my parcel directory if I wanted to add python code

While going through the tutorial, I wanted to get something working as early as possible to make sure I was going in the right direction. But the tutorial doesn't suggest you run the code until almost half way through it. Also, in the future, I'd like to see a list of different blocks that are available, like DetailSyncronizedLabledTestAttributeBlock. It'd be nice if ZaoBao was also somehow stored in an external parcel directory (instead of parcels/osaf/examlples/zaobao) since I think most parcel writers wouldn't store theirs within Chandler's directory and it would be nice to have an example of that.

16 Jun 2005: Heikki informed me that there were some older tutorials written on parcel writing. After a little searching I was able to find HookingIntoChandler, BuildingXRC, and BuildingChandlerParcels. Going through these should help me out a bunch.

20 Jun 2005: Having the source code for ZaoBao included in the tutorial would be helpful especially since the current version of Chandler has ZaoBao updated for the new schema, which doesn't match the tutorial. Luckily I have an older version of Chandler that I use. I came across something else I had to learn the hard way:

  • "AttributeError: 'NoneType' object has no attribute 'itsUUID'" probably means that myKindPath is set incorrectly
At this point I've got my parcel loading into Chandler. The next step is to learn about Lobs so I can start actually displaying information.

23 Jun 2005: I decided that writing a bugzilla parcel would be cool (being that I'm the QA intern and all). I got the idea from the Help Us! page. Once I knew how to display information in Chandler, it was downhill from there. At this point I'm able to get it to import new bugs as tasks from bugzilla.osafoundation.org. The next step would be to add better searching capabilities. Here's another thing to add to my list of things I had to learn the hard way:

  • I wasn't able to get Chandler to recognize the library I used for parsing RDF data, so I ended up having to make it it's own mini-parcel

27 Jun 2005: Recently, most of my time has been spent trying to coerce information out of bugzilla. I also started converting some of my code to the new schema implementation. I personally enjoy writing in Python more than in XML, so I welcome the change. And it also just makes a lot more sense since there's no more having to split up the definition of a class in two seperate files and formats.

1 July 2005: Getting items loaded into a collection and displaying them in the summary and detail view was fairly straight forward. What I've been trying to do now is create a new view (like the Block Demo View) where the user will be able to input different search parameters and have them displayed in a table. This has become difficult due to the lack of information I've been able to find. The wiki has some pages on making a Viewer Parcel but it's too old to help me much. I'm resorting to staring at code for now.

7 July 2005: Bryan was kind enough to explain to me how Attribute Editors work. I didn't know how important they really were. I'm going to switch to using them instead of the specific blocks I've been using right now. I'm just a little concerned about having to create a new item in the repository for every thing. When I have a list of bugs I want to display in a table, I think it'll be a waste of resources to create a new item for every bug since most of the time I'll be looking for just a single bug and ignore the rest. I'll have to see how it's done in other parts of Chandler.

14 July 2005: I've put the code I've been working on in my sandbox directory. Recently I've just been improving my Bugzilla API. I'm still thinking of how I'm going to implement the searching capability. At the moment I'm thinking that I'll create a new "search" item for every search. It still feels like a waste, but less of one than if I created a new item for every found bug. I'm going to look into displaying information in a table without having to create items in the repository.

...to be continued

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r14 < r13 < r12 < r11 < r10 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.