[Cubicweb] cubicweb-bootstrap 0.6.0

Rémi Cardona remi.cardona at logilab.fr
Wed Apr 2 11:32:03 CEST 2014


Le 02/04/2014 10:45, Christophe de Vienne a écrit :
> If the former UI is becoming legacy code, isn't it a risk to implement
> the bootstrap & squareui cubes by monkeypatching this legacy code so
> heavily ? (just wondering).

It's a legitimate concern which we all share.

Last year, I did try splitting out the views part out into a separate 
cube (the short-lived legacyui cube) which would have been forked into a 
bootstrap cube. However, this approach failed miserably as there is 
UI-related code everywhere in the CubicWeb code base. Heavy use of 
monkeypatching was still necessary even with a 14k SLOC move.

CubicWeb's API for views revolves around inheriting from base views 
(PrimaryView, CtxComponent, etc) and registering those new views with a 
higher selector.

We could provide new implementations using vreg.register_and_replace() 
however all cubes would have to chose explicitly which UI (current or 
bootstrap/squareui) they inherit from.

The current bootstrap cube (with all the monkeypatching) OTOH allows 
cubes ­— such as file, tag, comment, vcsfile, … — to work reasonably 
well with or without the bootstrap cube, since views in cubes continue 
to inherit from classes provided directly by cubicweb.web.

Hope that provides some insights into where we're running with this :)

Cheers

-- 
Rémi Cardona - LOGILAB, Paris (France).
Tél: 01.45.32.03.12
Formations - http://www.logilab.fr/formations
Développements - http://www.logilab.fr/services
Gestion de connaissances - http://www.cubicweb.org/



More information about the Cubicweb mailing list