Nuxeo/Blogs

Product & Development / All about the Nuxeo Platform, from strategy to feature highlights to dev tricks

Product & Development

ElementTree, serialization and namespace prefixes

without comments

The way ElementTree
outputs namespaces in serialized output can be a problem with some
applications.

Here is an example of such an ouput :

>>> import cElementTree as etree
>>> stream = """<?xml version="1.0" encoding="UTF-8" ?>
... <doc xmlns="http://bar"
... xmlns:foo="http://foo/">
... <foo:sub/>
... </doc>""
>>>
>>> doc = etree.XML(stream)
>>> print etree.tostring(doc, encoding="UTF-8")
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:doc xmlns:ns0="http://bar">
<ns1:sub xmlns:ns1="http://foo" />
</ns0:doc>
>>>

We can see that the declared namespaces are now given an alias and all
prefixes are now changed using those defined aliases. This is absolutley
correct in a XML point of view but you can be in trouble sometimes with some
applications for which you are outputing XML from elementtree based Python programs because they do not support
this properly on their side.

Here is a workaround I found but I don’t know if others exist :

>>> import cElementTree
>>> import elementtree.ElementTree
>>>
>>> …

Written by

February 27th, 2006 at 4:30 pm

Choosing a Javascript library for Zope

without comments

Choosing a Javascript library for Zope

Background

What’s AJAX ?

(If you know it, you should skip this section)

Wikipedia says:

Asynchronous JavaScript and XML, or Ajax, is a web development technique for
creating interactive web applications using a combination of:
- XHTML (or HTML) and CSS for marking up and styling information
- The Document Object Model manipulated through JavaScript to dynamically
display and interact with the information presented
- The XMLHttpRequest object to exchange data asynchronously with the web
server. (XML is commonly used, although any format will work, including
preformatted HTML, plain text, JSON and even EBML)
Like DHTML, LAMP, or SPA, Ajax is not a technology in itself, but a term
that refers to the use of a group of technologies together. In fact,
derivative/composite technologies based substantially upon Ajax, such as
AFLAX, are already appearing.

(full definition here: What’s AJAX ?)

In other words,

Written by

February 27th, 2006 at 9:23 am

CPS Ajaxification, round #1

without comments

In my
last blurg
I said I would select some toolkit out there to compare the
result, but after some mails exchanged on Z3 mailing list (
Ajax in Zope 3 Thread
), I agreed with what Benji York and Gary Poster said
in this subject:

“I’m very interested in coming up with a one or more relatively simple
server-side proposals to make Ajax stuff easier, but I think the Ajax
stuff (and even the whole JavaScript world) is too immature to settle on
one client-side implementation. Therefore we should concentrate on doing
things that help most or all of the JS toolkits be more usable with Z3.”

So I have started the work over CPS with Scriptaculous, focusing on
uses cases and when doable, on the server-side infrastructure.

Written by

February 27th, 2006 at 9:14 am

Funkload-related talk at PyCon 2006

without comments

Tres Seavers (of CMF fame), has put online the slides of his talk at PyCon “New Tools for Testing Web Applications with Python“, which covers both Selenium and our own Funkload (functional and load tester for web applications).

Thanks Tres!…

Written by

February 27th, 2006 at 9:05 am

Guido and Webframeworks

without comments

Guido van Rossum has started to
look for web frameworks
. Now, he doesn't seem to enthusiastic about
using Zope. And at first it looks like he is making the right choice,
because his stated requirement list is too small:

  • Independence from web server technology.
  • Templating with reuse.
  • Cookie handling.
  • Query parsing.
  • URL dispatch.

Note especially the lack of any kind of data storage, authentication/access
control, forms and session handling. Well, with these requirements, he
shouldn't use Zope, that's for sure. But does he really not want any
storage, or access control?

Wel….in his second
post
he extends the requirements quite lot, and suddenly it seems like
persistence, acces control and session is in the game again:

"Maybe we need more standardization efforts like WSGI, that let you plug
in different animals, or roll your own, for various pieces of useful web
functionality: for example URL dispatch, templates, persistence,

Written by

February 26th, 2006 at 12:10 am

Reminder : OOo Developpers Article Contest

without comments

The first
session of the Developpers Article Contest is running
and will end at
the end of the month.

As announced, this contest is to generate new documentation to developpers
and everybody can participate. Developpers and technical writers are
welcomed to propose articles. The subject has to cover a technical aspect of
OOo such as building, patching, addon, extensions or OOo scripting
aso.

Submissions have to be sent as attachments in the OASIS OpenDocument file
format to the mailing list contest@development.openoffice.org

The
contest rules
can be found on the OOoWiki. Each
month, an article will be elected and the winner author will earn 750 euros.
He will also be member of the comitee for three months if he wants The
remaining articles will stay in the contest for the next month so you have
many chances to win :-)

So, write your articles and submit them. We are all …

Written by

February 23rd, 2006 at 11:18 pm

JavaScript to become more pythonic

without comments

Read on
Brendan Eich blog
:

Given the years of development in Python and similarities to ECMAScript in
application domains and programmer communities, we would rather follow than
lead. By standing on Python’s shoulders we reuse developer knowledge as
well as design and implementation experience. The trick then becomes not
borrowing too much from Python, just enough to gain the essential benefits:
structured value-generating continuations and a general iteration
protocol.

And:

The wiki in which I typed that brief “let’s be Pythonic” argument quoted
above is a docuwiki
instance set up for ECMA TG1 by Graydon
Hoare
, who (I’m thrilled to report) has joined us at Mozilla recently.
We hope to make this wiki world-readable at some point not too far off. In
the mean time, I will blog with more details about the emerging ES4
language design, and about what features from it will show up when in

Written by

February 23rd, 2006 at 6:11 pm

OOoCon2006 : Results … After Koper, let’s go to …

without comments

Lyon has been choosen by votes

The official annoucement by Jacqueline, marketing lead

http://www.openoffice.org/servlets/ReadMsg?list=announce&msgNo=272

After the good work of Cédric at INSA, lets help him now organizing this
event.
All the energies are welcomed to make this event as successfull as the
previous years

You”ll surely be called for help – Stay tuned !!

(Post originally written by Laurent Godard on the old Nuxeo blogs.)…

Written by

February 23rd, 2006 at 1:57 pm

CPS chez Areva: alternative à Documentum pour la GED

without comments

Une petite recherche sur Google sur le thème “areva nuxeo”, fait ressortir des slides de Christophe Le Cannellier, de la DSI du groupe Areva, sur le thème “retour d’expériences sur le logiciel libre”, correspondant à une présentation donnée il y a 6 mois.

On peut y lire notamment (slide 7): “L’identification d’axes de développement prioritaires :
- GED : alternative à Documentum avec CPS de Nuxeo.”.

L’Histoire (avec un grand “H”) était deja en marche… :)…

Written by

February 22nd, 2006 at 2:47 pm

Bugday going on for CPS 3.4.0

without comments

The bugday is going ont now. There are 25 people registered on the #cps IRC channel (on freenode.net), 50% from Nuxeo and 50% from “the community” which is great. I think it’s our record attendence so far. The timeline should hopefully show many bug closes by the end of the day.…

Written by

February 22nd, 2006 at 2:44 pm