subscribe to this blog

CubicWeb Blog

News about the framework and its uses.

data.bnf.fr gets the Stanford Prize for Innovation in Research Libraries

2013/03/01 by Nicolas Chauvat

data.bnf.fr and Gallica just got awarded the Stanford Prize for Innovation in Research Libraries 2013. The CubicWeb community is very pleased to see that data.bnf.fr, which is built with CubicWeb, is being recognized at the top international level as leading innovation its domain! Read the comments of the judges for more details.


CubicWeb at Data Tuesday on Feb 26th 2013

2013/02/15 by Nicolas Chauvat

CubicWeb was showcased at Data Tuesday on Feb 26th 2013. The other presentations were interesting, especially shacache.org, the soon-to-be-launched OpenMeteoData and the very useful scikit.learn.


CubicWeb rewarded at Dataconnexion 2013

2013/02/06 by Nicolas Chauvat

CubicWeb got rewarded yesterday at the award ceremony of the Dataconnexions 2013 contest.

http://www.cubicweb.org/2710848?vid=download

Dataconnexions is a contest organized by Etalab, the organization part of the French State that is in charge of data.gouv.fr, that catalogs the open data published by the french administration.

Congratulations to all the developers and users of CubicWeb and welcome to the people who will join the CW community thanks to the media coverage we are now experiencing.

Read the announce to the press and the slides.


Logilab's roadmap for CubicWeb as of February 2013

2013/02/04 by Nicolas Chauvat

The Logilab team now holds a roadmap meeting every two months to plan its CubicWeb development effort. Here are the decisions that were taken on Feb 1st, 2013.

Version 3.17

This version should be published before the end of March and will finish all the things that are work in progress. It will include:

  • the refactoring necessary to introduce persistant sessions,
  • the shrinking of web/views: everything that does not deserve its own cube (like sioc, embed, geocoding, etc) will go into a cube named legacyui (this will open the door to squareui),
  • stop serving pages with "content-type: application/xhtml",
  • handling postgresql schemas (will require a new version of logilab.database),
  • a new logo.

Squareui

Once the cube legacyui extracted (in version 3.17), it will be possible to move forward swiftly with squareui. Due to its other duties, one can not expect the core CW team to develop squareui. People interested will be in charge and ideally the squareui cube could be released when cubicweb 3.17 will be published.

Cleaning up the backlog

The lead CW developers will spend about 20% of their time cleaning up the ticket backlog at the forge (900 open tickets and 50 in progress !)

The first step will be to reduce the number of tickets "in progress", then to organize the open tickets and merge the duplicates.

Version 3.18

This version is due at the end of may 2013. It will include:

  • persisting sessions,
  • WSGI,
  • RESTfulness: support for HTTP verbs PUT / DELETE, enforcement of the semantics of GET / POST (may be difficult to maintain backward-compatibility)

Mid-term goals

The mid-term goals are:

  • possibility to add new base types (Array, HStore, Geometry, TSVector, etc.) that would use extensions from the SQL backend

  • FROM clause in rql queries

  • websockets

  • defining attribute on relations and defining "virtual" relations or rules:

    class Contribution(EntityType):
        author = SubjectRelation('Person', cardinality='1*', inlined=True)
        book = SubjectRelation('Book', cardinality='1*', inlined=True)
        role = SubjectRelation('Role', cardinality='1*', inlined=True)
    
    preface_writer = VirtualRelation('C is Contribution, C author S, C book O, '
                                     'C role R, R name "preface writer"')
    

    And:

    Any P WHERE B is Book, P preface_writer B
    

    Will we need a materialized view in the database, a standard relation maintained by hooks, rewrite the RQL on-the-fly ? Time will tell.

  • cards with logic (mustache js templates for example)

  • coffeescript ? brython ? javascript ? prototype something with CubicDB + WebService that outputs json + user interface in full javascript

  • package separately Cubic(Web)DB et CubicWeb ?

  • think about the overall architecture (using WSGI, persistent sessions, etc.), and find solutions that fit a distributed architecture (look at paste.deploy, circus, etc.)

  • clean up the javascript en web/data/*.js

  • configurable metadata, managing the size of the entities table

  • more SPARQL

  • namespaces for the data models of the cubes

As already said on the mailing list, other developers and contributors are more than welcome to share their own goals in order to define a roadmap that best fits everyone's needs.

Logilab's next roadmap meeting will be held at the beginning of April 2013.


What's new in CubicWeb 3.16

2013/01/23 by Aurelien Campeas

What's new in CubicWeb 3.16?

New functionalities

  • Add a new dataimport store (SQLGenObjectStore). This store enables a fast import of data (entity creation, link creation) in CubicWeb, by directly flushing information in SQL. This may only be used with PostgreSQL, as it requires the 'COPY FROM' command.

API changes

  • Orm: set_attributes and set_relations are unified (and deprecated) in favor of cw_set that works in all cases.

  • db-api/configuration: all the external repository connection information is now in an URL (see #2521848), allowing to drop specific options of pyro nameserver host, group, etc and fix broken ZMQ source. Configuration related changes:

    • Dropped 'pyro-ns-host', 'pyro-instance-id', 'pyro-ns-group' from the client side configuration, in favor of 'repository-uri'. NO MIGRATION IS DONE, supposing there is no web-only configuration in the wild.
    • Stop discovering the connection method through repo_method class attribute of the configuration, varying according to the configuration class. This is a first step on the way to a simpler configuration handling.

    DB-API related changes:

    • Stop indicating the connection method using ConnectionProperties.
    • Drop _cnxtype attribute from Connection and cnxtype from Session. The former is replaced by a is_repo_in_memory property and the later is totaly useless.
    • Turn repo_connect into _repo_connect to mark it as a private function.
    • Deprecate in_memory_cnx which becomes useless, use _repo_connect instead if necessary.
  • the "tcp://" uri scheme used for ZMQ communications (in a way reminiscent of Pyro) is now named "zmqpickle-tcp://", so as to make room for future zmq-based lightweight communications (without python objects pickling).

  • Request.base_url gets a secure=True optional parameter that yields an https url if possible, allowing hook-generated content to send secure urls (e.g. when sending mail notifications)

  • Dataimport ucsvreader gets a new boolean ignore_errors parameter.

Unintrusive API changes

  • Drop of cubicweb.web.uicfg.AutoformSectionRelationTags.bw_tag_map, deprecated since 3.6.

User interface changes

  • The RQL search bar has now some auto-completion support. It means relation types or entity types can be suggested while typing. It is an awesome improvement over the current behaviour !
  • The action box associated with table views (from tableview.py) has been transformed into a nice-looking series of small tabs; it means that the possible actions are immediately visible and need not be discovered by clicking on an almost invisible icon on the upper right.
  • The uicfg module has moved to web/views/ and ui configuration objects are now selectable. This will reduce the amount of subclassing and whole methods replacement usually needed to customize the ui behaviour in many cases.
  • Remove changelog view, as neither cubicweb nor known cubes/applications were properly feeding related files.

Other changes

  • 'pyrorql' sources will be automatically updated to use an URL to locate the source rather than configuration option. 'zmqrql' sources were broken before this change, so no upgrade is needed...
  • Debugging filters for Hooks and Operations have been added.
  • Some cubicweb-ctl commands used to show the output of msgcat and msgfmt; they don't anymore.

December 2012 CubicWeb Sprint Report

2012/12/21 by Nicolas Chauvat

For two days, on dec 13th/14th 2012, ten hackers gathered at Logilab to improve the user interface of CubicWeb. This hackathon was initiated by Crealibre. About a year ago, they started the Orbui project, a new user interface for CubicWeb based on the Bootstrap HTML/CSS framework.

http://www.orbui.com/images/itisa960.png

Several projects at Logilab and Crealibre proved that Orbui was heading in the right direction, but that it had to fight with the default user interface of Cubicweb. Orbui makes different design/ergonomic choices and needs different HTML/CSS structure and Javascript components.

Sylvain published a roadmap back in may with a section titled "on the road to Bootstrap". After more than half a day of heated debate on the firts day, it was decided to follow the direction he pointed to. We started extracting from CubicWeb the default user interface and turning it into a set of cubes:

  • cubicweb-legacyui: css, views and templates extracted from CubicWeb 3.16, so as to provide full backward compatibility
  • cubicweb-bootstrap: empty cube with only bootstrap version 2.2.2 in data/
  • cubicweb-squareui: bootstrapified version of legacyui (slightly altered to benefit from the bootstrap css without breaking backward compatibility too hard)

At the end of the sprint, one could add_cube('squareui') on an existing application and keep it usable... and get "some kind of responsiveness" for free, thus proving that we were on the right track.

A lot of work is still ahead of us, but we have moved a few step forward towards the goal of making it easier to implement different UIs on top of CubicWeb 3.17.

For the curious, here is what the skeleton of legacyui.views.maintemplate (aka cw.web.views.maintemplate) looks like:

<body> (MainTemplate.template_body_header)
  <table id="header"> (HTMLPageHeader.main_header)
    for header in self.headers:
       <td id="header-{left,center,right}">
           render selected components(ctxcomponents, header-{left,center,right})
       </td>
  </table>
  <div id="stateheader"> HTMLPageHeader.call
     <div class="stateMessage"> HTMLPageHeader.state_header
  </div>
  <div id="page"> MainTemplate.template_body_header
    <table id="mainLayout"> MainTemplate.template_body_header
      if boxes (selected components(ctxcomponents, left): MainTemplate.nav_column
        <td id="navColumnLeft">
          <div class="navboxes">
             render boxes
          </div>
        </td>
      <td id="contentColumn"> MainTemplate.template_body_header
         render selected components(rqlinput)
         render selected components(applmessages)
         if navtop (selected components(ctxcomponents, navtop): HTMLContentHeader.call
           <div id="contentheader">
             render components
           </div>
           <div class='clear'/>
         <div id="pageContent"> MainTemplate.call
           if vtitle:
              <div class="vtitle" />
           if etypenavigation:
              render etypenavigation
           view pagination
           <div id="contentmain">
              render view
           </div>
           view pagination
         </div>
         if navbottom (selected components(ctxcomponents, navbottom): HTMLContentFooter.call
           <div id="contentfooter">
             render components
           </div>
      </td>
      if boxes (selected components(ctxcomponents, right): MainTemplate.nav_column
        <div id="navColumnRight">
          <div class="navboxes">
             render boxes
          </div>
    </table>
  </div>
  <div id="footer"> HTMLPageFooter.call
     render actions selected (actions, 'footer')
  </div>
</body>

and here is what the skeleton from squareui.views.maintemplate looks like:

<body>
<div class="container-fluid">
  <div id="header" class="row-fluid">
    <!-- .header -->
  </div>
  <div class="row-fluid">
    <div id="navColumnLeft" class="span3">
      <!-- .leftcolumn -->
    </div>
    <div id="contentColumn" class="span6">
      <!-- .contentcol -->
      <div class="row-fluid">
        <div id="contentheader" class="span12">
          <!-- .contentheader -->
        </div>
      </div>
      <div class="row-fluid">
        <div id="contentmain" class="span12">
          <!-- .contentmain -->
        </div>
      </div>
      <div class="row-fluid">
        <div id="contentfooter" class="span12">
          <!-- .contentfooter -->
        </div>
      </div>
    </div>
    <div id="navColumnRight" class="span3">
      <!-- .rightcolumn -->
    </div>
  </div>
  <div id="footer" class="row-fluid">
    <!-- .footer -->
  </div>
</div>
</body>

Stay tuned for the updates on this (important) topic!


Candidature au concours dataconnexions#2

2012/12/20 by Nicolas Chauvat

Au nom de la communauté des utilisateurs et développeurs de CubicWeb, je viens de déposer la candidature suivante au concours dataconnexions#2.

1. Questionnaire de description du Projet

Intitulé du projet

CubicWeb - plate-forme libre de développement pour le web sémantique

Catégorie de concours choisie

Choisir parmi: Grand public / Professionnel / Utilité publique / Mobilité et territoires

Utilité publique (?)

Quel problème tentez-vous de résoudre ?

Décrivez le (ou les) problème(s) que votre projet tente de résoudre, ainsi que son (leur) importance : taille du marché, fréquence d’utilisation potentielle, population concernée, bénéfices éventuels de service public, etc. (maximum 1000 signes).

L'avènement du web sémantique et de l'Open Data nécessite de disposer d'outils adaptés pour développer des applications centrées sur les données.

Ces outils doivent permettre d'importer des données facilement, de les mettre en relation lorsqu'elles proviennent de sources disjointes, de les republier et de faciliter leur interrogation et leur visualisation.

Idéalement, ces outils doivent utiliser et respecter les standards ouverts d'internet afin de simplifier les communications et les échanges, mais aussi faciliter le développement pour les terminaux multiples (ordinateur, tablette, smartphone).

Comment tentez-vous de le résoudre ?

Décrivez votre produit, service ou visualisation, dans sa forme actuelle et le cas échéant après les développements futurs éventuels que vous envisagez. Précisez le ou les jeux de données publiques que vous utilisez à cet effet (maximum 1000 signes).

CubicWeb est une plate-forme libre de développement pour le web sémantique.

CubicWeb permet aux développeurs de se concentrer sur les spécificités de leur application plutôt que d'avoir à réinventer les briques essentielles de l'import, la fusion, la publication, l'interrogation et la visualisation de données.

CubicWeb est un logiciel libre développé ouvertement sur internet par une communauté réduite mais déjà internationale. CubicWeb est disponible sous licence LGPL, respecte les standards du W3C (RDF, SPARQL, HTML5, CSS3, Responsive Design) et sait gérer nativement plusieurs modèles de données faisant office de standards de fait (FOAF, SIOC, DOAP, etc).

Quel est votre modèle d’affaire ?

Décrivez le modèle d’affaire de votre projet, c’est-à-dire les conditions de sa pérennité et de son développement : plan d’affaires et projections commerciales dans le cas d’un projet entrepreneurial ; objectifs, donneurs clés, partie prenantes dans le cas d’un projet d’ordre civique (maximum 1000 signes).

Plusieurs sociétés commerciales s'appuient aujourd'hui sur CubicWeb pour vendre des services informatiques. L'objectif de cette communauté est de croître pour bénéficier d'une audience plus large et d'une mutualisation plus importante des coûts de maintenance et de développement de la plate-forme CubicWeb.

Parmi les utilisateurs de CubicWeb, on compte à ce jour la Bibliothèque nationale de France, EDF, GDF-Suez, le Commissariat à l'Energie Atomique, le Centre National d'Etudes Spatiales, l'Institut Radioprotection et Sûreté Nucléaire, l'INRIA, des laboratoires de recherche médicale et des entreprises du domaine informatique.

Quel est l’état d’avancement de votre projet ?

Décrivez les étapes que vous avez franchies, les ressources mobilisées, les indicateurs et métriques déjà établies, etc. (maximum 1000 signes).

Le projet CubicWeb est issu d'un effort de R&D commencé en 2001 par la société Logilab, qui avait comme objectif de se doter d'un outil permettant le développement d'applications centrées sur les données et respectant les standards du web sémantique en cours d'élaboration au W3C.

Depuis 2008, CubicWeb est un logiciel libre dont le développement est mené ouvertement sur internet.

Qui vous accompagne sur ce projet ?

Décrivez l’équipe qui vous accompagne dans votre projet (le cas échéant), vos compétences, expériences et réalisations, ainsi que les partenaires éventuels qui vous soutiennent (maximum 1000 signes).

N/A.

Comment DataConnexions peut-­il vous aider ?

Détaillez toutes les précisions additionnelles que vous souhaiteriez apporter au sujet de votre projet, et expliquez en quoi DataConnexions peut contribuer à pérenniser son développement (maximum 1000 signes).

Plusieurs sociétés commerciales s'appuient aujourd'hui sur CubicWeb pour vendre des services informatiques. Les utilisations industrielles de CubicWeb sont variées et concernent des applications importantes, voire critiques.

CubicWeb est un outil peu (re)connu et sa communauté est aujourd'hui réduite, malgré ses solides références et le récent engouement pour l'Open Data.

DataConnexions pourrait être une tribune et une vitrine permettant à CubicWeb de trouver de nouveaux développeurs d'applications préférant bénéficier de l'expérience capitalisée dans cet outil libre plutôt que de rédécouvrir et déjouer un par un les pièges rencontrés au cours des dix ans qui ont été nécessaires à sa réalisation.

L'objectif de cette candidature est donc de faire croître la communauté des utilisateurs et contributeurs de CubicWeb.

2. Vidéo de présentation

Lien permettant de télécharger une vidéo décrivant le Projet et ses fonctionnalités, d’une durée maximale de 3 minutes

Ce n’est pas la qualité de la vidéo qui est jugée, mais le projet lui-même. La vidéo doit permettre de rendre compte des fonctionnalités du projet. Les candidats sont encouragés à réaliser une capture d’écran ou un « screencast » (par exemple avec des outils tels que CamStudio, Jing ou Screenr).

Démonstration de l'utilisation de CubicWeb pour importer et visualiser la liste des gares françaises téléchargée depuis data.gouv.fr. Sélection des gares par le filtre à facettes et affichage sur fond de carte openstreetmap, puis export en RDF, JSON et CSV.

CubicWeb est une plate-forme libre de développement pour le web sémantique, qui permet aux développeurs de se concentrer sur les spécificités de leur application plutôt que d'avoir à réinventer les briques essentielles de l'import, la fusion, la publication, l'interrogation et la visualisation de données.

Lien vers vidéo sur youtube. Miroir de la vidéo sur vimeo.com.

3. Accès en ligne au projet

Lien permettant d’accéder au Projet, ou au code informatique compilé et interprétable du Projet

Par exemple : URL permettant de consulter, ou, le cas échéant, de télécharger l’application, accompagnée, si nécessaire, d’instructions à cet effet. L’application devra être facile à installer et aisément démontrable sur sa plateforme de destination.

http://www.cubicweb.org

4. Supports de communication

Description Non Confidentielle

Décrivez le Projet dans des termes compatibles avec une diffusion au grand public : non confidentiels, compréhensibles par le plus grand nombre, et mettant en avant l’intérêt du projet (maximum 1000 signes).

cf "comment tentez-vous de le résoudre"

Elément visuel de description

Lien vers un élément visuel décrivant et mettant en valeur le projet et ses fonctionnalités (capture d’écran, page d’accueil, schéma de description).

/file/2544364?vid=download

Logo du projet

Lien vers le logo du projet.

/file/2544362?vid=download

Links roundup from dotjs.eu

2012/12/05 by Arthur Lutz

A few people from Logilab attended the dotjs conference in Paris last week. The conference wasn't exactly what we expected, we were hoping for more technical talks. Nevertheless, some of the things we saw were quite interesting. Some of them could be relevant to CubicWeb.

http://www.cubicweb.org/file/2532779?vid=download

Here is a raw roundup of links collected last friday :


CubicWeb sprint in Paris - 2012/12/13-14

2012/11/11 by Nicolas Chauvat

Topics

To be decided. Some possible topics are :

  • Work on CubicWeb front end : Anything related to Themaintemplate, primaryview, reledit, tables handling etc.
  • Share the Evolution and more integration of the OrbUI project for CW
  • Things to do for HTML5 and bootstrap integration
  • Work on ideas from Thoughts on CubicWeb 4
  • ...

other ideas are welcome, please bring them up on cubicweb@lists.cubicweb.org

Location

This sprint will take place in decembre 2012 from thursday the 13th to friday the 14th. You are more than welcome to come along, help out and contribute. An introduction is planned for newcomers.

Network resources will be available for those bringing laptops.

Address : 104 Boulevard Auguste-Blanqui, Paris. Ring "Logilab" (googlemap)

Metro : Glacière

Contact : http://www.logilab.fr/contact

Dates : 13/12/2012 to 14/12/2012

Participants

  • Celso Flores (Crealibre - Mexico)
  • Carine Fourrier (Crealibre - Mexico)
  • ...

Building your URLs in cubicweb

2012/09/25 by Stéphane Bugat

Building your URLs in cubicweb

Aim

In cubicweb, you often have to build url's that redirect the current view to a specific entity view or allow the execution of a given action. Moreover, you often want also to fallback to the previous view once the specific action or edition is done, or redirect also to another entity's specific view.

To do so, cubicweb provides you with a set of powerful tools, however as there is often more than one way to do it, this blog entry is here to help you in choosing the preferred way.

Tools at your disposal

The universal URL builder: build_url()

build_url is accessible in any context, so for instance in the rendering of a given entity view you can call self._cw.build_url to build you URLs easily, which is the most common case. In class methods (for instance, when declaring the rendering methods of an EntityTableView), you can access it through the context of instantiated appobject which are usually given as argument, e.g. entity._cw.build_url. For test purposes you can also call session.build_url in cubicweb shells.

build_url basically take a first optional, the path, relative to the base url of the site, and arbitrary named arguments that will be encoded as url parameters. Unless you wish to direct to a custom controller, or to match an URL rewrite url, you don't have to specify the path.

Extra parameters given to build_url will vary according to your needs, however most common arguments understood by default cubicweb views are the followings:

  • vid: the built view __regid__;
  • rql: the RQL query used to retreive data on which the view should be applied;
  • eid: the identifier of an entity, which you should use instead of rql when the view apply to a single entity (most often);
  • __message: an information message to display inside the view;
  • __linkto: in case of an entity creation url, will allow to set some specific relations between both entities;
  • __redirectpath: the URL of the entity of the redirection;
  • __redirectvid: the view id of the redirection.

__redirectvid and __redirectpath are used to control redirection after posting a form and are more detailed in the cubicweb documentation, chapter related to the edition control (http://docs.cubicweb.org/devweb/edition/editcontroller.html).

Exploring entities associated URLs

Generally, an entity has two important methods that retrieve its absolute or relative urls:

  • entity.rest_path() will return something like <type>/<eid> where <type> corresponds to the entity type and <eid> the entity eid;
  • entity.absolute_url() will return the full url of the entity http://<baseurl>/<type>/<eid>. In case you want to access a specific view of the entity, just pass the vid='myviewid' argument. You can give arbitrary arguments to this method that will be encoded as url parameters.

Getting a proper RQL

Passing the rql to the build_url method requires to have a proper RQL expression. To do so, there is a convenience method, printable_rql(), that is accessible in rset resulting from RQL queries. This allows to apply a view to the same result set as the one currently process, simply using rql = self.cw_rset.printable_rql().

Getting URLs from the current view

There are several ways to get URL of the current view, the canonical one being to use self._cw.relative_path(includeparams=True) which will return the path of the current view relative to the base url of the site (otherwise use self._cw.url(), including parameters or not according to value given as includeparams).

You can also retrieve values given to individual parameters using self._cw.form, eg:

  • self._cw.form.get('vid', '') will return only the view id;
  • self._cw.form.get('rql', '') will return only the RQL;
  • self._cw.form.get('__redirectvid', '') will return the redirection view if defined;
  • self._cw.form.get('__redirectpath', '') will return the redirection path if defined.

How to redirect to non-entity view?

This case often appears when you want to create a link to a startup view or a controller. It the first case, you simply build you URL like this:

self._cw.build_url('view', vid='my_view_id')

The latter case appears when you want to call a controller directly without having to define a form in your view. This can happen for instance when you want to create a URL that will set a relation between 2 objects and do not need any confirmation for that. The URL construction is done like this:

self._cw.build_url('my_controller_id', arg1=value1, arg2=value2, ...)

Any extra arguments passed to the build_url method will be available in the controller as key, values pairs of the self._cw.forms dictionary. This is especially useful when you want to define some kind of hidden attributes but there is not form to put them into.

And, last but not least, a convenient way to get the root URL of the instance:

self._cw.base_url()

Some concrete cases

Get the URL of the outofcontext view of an entity:

link = entity.absolute_url(vid='outofcontext')

Create a link to a given controller then fall back to the current view:

  • In your entity view:
self.w(u'<a href="%s">Click me</a>' % xml_escape(
        self._cw.build_url('mycontrollerid',
                arg1=value1, arg2=value2,
                rql=self.cw_rset.printable_rql(),
                __redirectvid=self._cw.form.get('vid',''))))
  • In your controller:
def publish(self, rset):
     value1, value2 = self._cw.form['arg1'], self._cw.form['arg2']
     # do some stuff with value1 and value2 here...
     raise Redirect(self._cw.build_url(rql=self._cw.form['rql'],
         vid=self._cw.form['__redirectvid'],
         __message=_('you message')))

Create a link to add a given entity and relate this entity to the current one with a relation 'child_of', then go back to the current entity's view:

entity = self.cw_rset.get_entity(0,0)
self.w(u'<a href="%s">Click me</a>' % xml_escape(
        self._cw.build_url('add/Mychildentity',
                __linkto='child_of:%s:object' % entity.eid,
                __redirectpath=entity.rest_path(),
                __redirectvid=self._cw.form.get('vid', ''))))

Same example, but we suppose that we are in a multiple rset entity view, and we want to go back afterwards to this view:

entity = self.cw_rset.get_entity(0,0)
self.w(u'<a href="%s">Click me</a>' % xml_escape(
        self._cw.build_url('add/Mychildentity',
                rql=self.cw_rset.printable_rql(),
                __linkto='child_of:%s:object' % entity.eid,
                __redirectvid=self._cw.form.get('vid', ''))))

Create links to all 'menuactions' in a view:

actions = self._cw.vreg['actions'].possible_actions(self._cw, rset=self.cw_rset)
action_links = [unicode(self.action_link(x)) for x in actions.get('menuactions', ())]
self.w( u'  |  '.join(action_links))