Hi Josh,

As for packages, I can't speak to Fedora offhand, but Ubuntu has the "nodejs" 
package which is what we've used internally for development and for the 
devstack gate going forward. The LESS binary itself is being bundled with 
Horizon to alleviate versioning incompatibilities and package differences 
across OS's.

As for why, having been involved in the discussion and decision let me present 
a few components of the reasoning as they relate to Horizon's core values 
(expressed here: http://horizon.openstack.org/intro.html#values):


1.       Manageable: The CSS stylesheet for the OpenStack Dashboard had become 
unmaintainable. It was and (until we split it up after LESS lands) is a 
complete mess, over 1000 lines long. We needed a solution that continues to 
allow us to build in a more reasonable fashion. There are plenty of modern 
tools for this (LESS, SASS, etc.). We can split apart the stylesheet into 
logical modules, define variables, mixins and transformations so we update code 
in one place rather than twenty... so on and so forth.

2.       Extensible: LESS allows third-party developers to import and build 
from the core stylesheet(s) instead of copying and pasting the stylesheet 
wholesale, causing the pain of staying up-to-date with changes, bugfixes, etc.

3.       Consistent: As mentioned above, we can define variables and mixins 
which can be used everywhere, preventing the "I wrote the same styles ten 
places and forgot to update them all" problems that every frontend developer 
knows all too well.

4.       Stable: At this point node.js and LESS are well-proven technologies, 
being leveraged by large companies and large projects all over the globe.

5.       Usable: From a developer standpoint, LESS and SASS are light-years 
ahead of static CSS in terms of writing code. The end product to the consumer 
is more-or-less identical.

We did evaluate a number of other implementation options for meeting these 
needs (develop with LESS and commit both the .less and final .css files, using 
SASS which is built on Ruby, etc.) but came to this as the best long-term 
solution.

All the best,


-          Gabriel

From: [email protected] 
[mailto:[email protected]] On 
Behalf Of Joshua Harlow
Sent: Thursday, May 24, 2012 10:34 AM
To: openstack
Cc: Yahoo Openstack Developers
Subject: [Openstack] Nodejs in horizon

Hi all,

I was seeing that node.js is now being used in horizon. Is there any details on 
why that was needed, the reasoning, the technical docs on where it is used.

Are there packages available in fedora/ubuntu for this?

Such a change seems like it should have a little more reasoning/explanation 
that what I found @ 
https://github.com/openstack-dev/devstack/commit/0c2891558122aa9d030811109536caf5c81cfb75
 or https://blueprints.launchpad.net/horizon/+spec/transition-to-lesscss

Do we really need to have that ?? :-/

-Josh
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to