[Openstack] Fwd: Nodejs in horizon

Thierry Carrez thierry at openstack.org
Mon May 28 14:21:12 UTC 2012


John Postlethwait wrote:
> Sorry if I've missed anything below, this thread has become rather
> fragmented and messy (at least in my email clients) but I will try to
> address the main points I have seen so far:

Thanks for your answers !

>   * Just so that everyone is aware, the lessc parser that is bundled in
>     Horizon, while executable, is NOT a binary. It is, in fact, just a
>     140 line JS file, you can see the code
>     here: https://review.openstack.org/#/c/7367/4/bin/less/lessc

I think the concern is not about binary bundling, it's more about
bundling code from another project (code duplication). Less is more
(haha) than 3500 lines of code. Javascript is often duplicated to be
included in pages that get executed client-side... But here it is
server-side code, so this is as bad as duplicating (and having to
maintain) 3500 lines of C code from another project in your source code.

That said, if this code duplication is seen as a stop-gap, temporary
measure until "enough" distros catch up and package it correctly, as
Gabriel suggested, I think that's acceptable.

>   * As to the concerns about "it not being Python" or  "JavaScript has
>     been abused." Well, all I can say to that is no, it is not Python,
>     and yes, some developers write terrible and abusive code with
>     JavaScript. I'm sure I could find horrid/abusive Python somewhere as
>     well, but doing so would not preclude our reasons to use it in
>     OpenStack. Misuse of a tool is not a reason to fear the tool itself,
>     if that were so none of us would use any language, ever. Not to
>     mention, we already use a ton of JS in Horizon... I'm not
>     introducing JavaScript to Horizon for the first time or anything here.

The difference here is that it is server-side. So far we only had Python
as a server-side language, while obviously more languages were accepted
for client-side scripts. IMHO we should try to converge towards Python,
but if this precise featureset is not covered by any Python alternative
and the best tool for the job is JS...

-- 
Thierry Carrez (ttx)
Release Manager, OpenStack




More information about the Openstack mailing list