[openstack-dev] [horizon] BootstrapV3 and lessc

2013-11-04 Thread Maxime Vidori
Hi,

I talked with Jiri Tomasek who is currently in charge of the integration of 
Bootstrap V3 into Horizon. The integration is currently stuck and was waiting 
for almost two month that lesscpy could parse the Bootstrap v3 less template. I 
know that Nodejs was removed because of some dependencies issues in production 
environment, but we do not need Node in production environment. When node was 
removed it was compiling the less template at runtime, this is useful in 
development but not in production. Maybe it is possible to perform a dist task 
which will compile the less template for the package target. 

If we keep lesscpy we will have to maintain it every time less pre processor 
will upgrade, it is a lot of work in addition for few benefits. Currently, a 
review is waiting for the integration of bootstrap 
https://review.openstack.org/#/c/49710/ using lessc (node compiler). 

I need your reviews on this topic because a lot of work is currently done for 
the ui of Horizon and the integration of Bootstrap v3 is a huge bottleneck for 
further development. 


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [horizon] BootstrapV3 and lessc

2013-11-04 Thread Sascha Peilicke
On Monday 04 November 2013 10:52:21 Maxime Vidori wrote:
 Hi,
 
 I talked with Jiri Tomasek who is currently in charge of the integration of
 Bootstrap V3 into Horizon. The integration is currently stuck and was
 waiting for almost two month that lesscpy could parse the Bootstrap v3 less
 template. I know that Nodejs was removed because of some dependencies
 issues in production environment, but we do not need Node in production
 environment.

Well, not really. As long as COMPRESS_OFFLINE isn't set in your 
local_settings.py, django_compressor will check if it has compiled CSS files 
in it's cache and generate them if not. So for a horizon deployment that is 
setup with the defaults, the very first HTTP request will just trigger the 
LESS compiler...

Regardless of that, nodejs is a huge dependency of which not that many people 
have long experience with. While I know that nodejs is the new fancy of web 
development, things where radically different less than 2 years ago. It will 
the same in 2 years from now. That's why distros want to avoid it if they can. 
You simply don't know how reliable upstream is. What happens if they need to 
fix a security issue in that crappy old release that happens to be shipped in, 
say, openSUSE-12.2.

On the other hand. using a pure-Python implementation has countless advantages 
in our context. It can be handled inside pip requirements files, whereas you 
need to interact with the underlying distro to get nodejs installed. Also, we 
where able to drop a pile of bit-rotting Javascript files that we had to copy 
from nodejs' codebase just because no distro provided less.js so far.

 When node was removed it was compiling the less template at
 runtime, this is useful in development but not in production. Maybe it is
 possible to perform a dist task which will compile the less template for
 the package target.

We discussed this on IRC and I'd say compiling static assets (such as CSS) 
during sdist / bdist can't really hurt.

 If we keep lesscpy we will have to maintain it every time less pre processor
 will upgrade, it is a lot of work in addition for few benefits. Currently,
 a review is waiting for the integration of bootstrap
 https://review.openstack.org/#/c/49710/ using lessc (node compiler).

Where do you get these numbers? So far, fixing up Lesscpy wasn't such a big 
task. For bootstrap3 support, the only thing missing was variable support in 
CSS media queries. I already added some quick hacks to unblock people for the 
time being (See [0]). LESS the language doesn't change that much, it's CSS3 
that adds a ton of new features.

 I need your reviews on this topic because a lot of work is currently done
 for the ui of Horizon and the integration of Bootstrap v3 is a huge
 bottleneck for further development.

[0] https://github.com/robotis/Lesscpy/issues/22
-- 
With kind regards,
Sascha Peilicke
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nuernberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 16746 (AG Nürnberg)

signature.asc
Description: This is a digitally signed message part.
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [horizon] BootstrapV3 and lessc

2013-11-04 Thread Matthias Runge
On 11/04/2013 11:41 AM, Sascha Peilicke wrote:
 On Monday 04 November 2013 10:52:21 Maxime Vidori wrote:
 Hi,

 I talked with Jiri Tomasek who is currently in charge of the integration of
 Bootstrap V3 into Horizon. The integration is currently stuck and was
 waiting for almost two month that lesscpy could parse the Bootstrap v3 less
 template. I know that Nodejs was removed because of some dependencies
 issues in production environment, but we do not need Node in production
 environment.
 
We didn't had nodejs for a long time in fedora, because it used to
bundle a lot of code from other projects.
The other issue is, that is a quite fast moving project. When you want a
stable platform, you probably don't want to update every two to four
weeks to a newer minor-version, and probably want to avoid new major
versions at all.

So, it ended up in: we compiled LESS code offline and combined that with
the package. That is not ideal at all for folks changing the style to
give their dashboard another look. I assume, that's a pretty common
situation.

 Regardless of that, nodejs is a huge dependency of which not that many people 
 have long experience with. While I know that nodejs is the new fancy of web 
 development, things where radically different less than 2 years ago. It will 
 the same in 2 years from now. That's why distros want to avoid it if they 
 can. 
 You simply don't know how reliable upstream is. What happens if they need to 
 fix a security issue in that crappy old release that happens to be shipped 
 in, 
 say, openSUSE-12.2.
 
Exactly, just compare the binary size with the size of less sourcecode
in horizon sourcecode at all.

So, that being said, dropping lesscss in favor of re-integrating node.js
is a big step backwards. If there's something missing in lesscpy, we
should fix that.

Matthias


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [horizon] BootstrapV3 and lessc

2013-11-04 Thread Sascha Peilicke
On Monday 04 November 2013 13:49:20 Matthias Runge wrote:
 On 11/04/2013 11:41 AM, Sascha Peilicke wrote:
  On Monday 04 November 2013 10:52:21 Maxime Vidori wrote:
  Hi,
  
  I talked with Jiri Tomasek who is currently in charge of the integration
  of
  Bootstrap V3 into Horizon. The integration is currently stuck and was
  waiting for almost two month that lesscpy could parse the Bootstrap v3
  less
  template. I know that Nodejs was removed because of some dependencies
  issues in production environment, but we do not need Node in production
  environment.
 
 We didn't had nodejs for a long time in fedora, because it used to
 bundle a lot of code from other projects.
 The other issue is, that is a quite fast moving project. When you want a
 stable platform, you probably don't want to update every two to four
 weeks to a newer minor-version, and probably want to avoid new major
 versions at all.
 
 So, it ended up in: we compiled LESS code offline and combined that with
 the package. That is not ideal at all for folks changing the style to
 give their dashboard another look. I assume, that's a pretty common
 situation.

Just to give people an impression, this is a RPM spec file stripped of 
everything except the nodejs / offline compression parts: 
http://paste.opensuse.org/view/raw/8915603 (as seen in [0])

Of course you can bet that your usual consultancy-based PoC deployment won't 
care about such details o:-)

  Regardless of that, nodejs is a huge dependency of which not that many
  people have long experience with. While I know that nodejs is the new
  fancy of web development, things where radically different less than 2
  years ago. It will the same in 2 years from now. That's why distros want
  to avoid it if they can. You simply don't know how reliable upstream is.
  What happens if they need to fix a security issue in that crappy old
  release that happens to be shipped in, say, openSUSE-12.2.
 
 Exactly, just compare the binary size with the size of less sourcecode
 in horizon sourcecode at all.
 
 So, that being said, dropping lesscss in favor of re-integrating node.js
 is a big step backwards. If there's something missing in lesscpy, we
 should fix that.
 
 Matthias

[0] 
https://build.opensuse.org/package/view_file/Cloud:OpenStack:Grizzly/openstack-dashboard/openstack-dashboard.spec?expand=1
-- 
With kind regards,
Sascha Peilicke
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nuernberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 16746 (AG Nürnberg)

signature.asc
Description: This is a digitally signed message part.
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev