[Dev] XML for CPIA

Phillip J. Eby pje at telecommunity.com
Wed Aug 10 12:58:24 PDT 2005


At 11:08 AM 8/10/2005 -0700, Alec Flett wrote:
>I feel like folks are leaning towards pje's python .update mechanism as 
>the GUT of item declaration.. and I think that's a mistake and I think its 
>because people feel burned by parcel.xml. Its the underlying API sure, but 
>if we never HAD parcel.xml, I can guarantee you that I wouldn't be the 
>first one to say ".update() is really tedious for the UI - lets find a 
>simpler way to declare this stuff.. what about xml?"

Actually, from my experimental porting of snippets of views/main to Python 
code, it seems to me that the actual complexity is in CPIA's API.

I would imagine that if we were using Python to create items in the first 
place, the evolutionary pressure would've been towards providing simpler 
constructors or utility functions as part of the CPIA API, because those 
could be done by just writing new methods or functions, not by needing to 
change an XML format.

In other words, I'm suggesting that the verbosity of defining blocks in 
Python comes from CPIA-defined features, not from Python.  The simplest way 
to improve this would be to enhance the CPIA API -- and not to define 
another data format.  (Which doesn't make anything you still have to do in 
Python any easier.)

Also, certain features of CPIA (such as blockName vs. itsName) might be 
able to go away if we're not copying items -- or the constructors might be 
changed to set blockName=itsName.  There are lots of possibilities for 
simplifying object creation and reducing redundancy that are available in 
Python, as Bryan has also pointed out.



More information about the Dev mailing list