Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-26 Thread Imre Farkas

On 11/22/2013 06:13 PM, Julie Pichon wrote:

Imre Farkas ifar...@redhat.com wrote:

On 11/22/2013 02:49 PM, Maxime Vidori wrote:

It seems a bit crazy to me to introduce NodeJS as a dependency just for
the sake of an easy way to run jslint. There are other options
available that run without NodeJS as a dependency.


Sadly, the only solutions which try to implement jslint in pure python are
in alpha or abandoned. If you have a python library which has the same
quality as jslint (which is written by Douglas Crockford himself), I will
be glad to take a look at it.


There's a jslint fork called jshint which is able to run in the browser
without any node.js dependency.

I created a POC patch [1] long time ago to demonstrate its capabilities.
It's integrated with qunit and runs automatically with the horizon test
suite.


Thanks Imre, this is interesting. Would you mind restoring the patch? If
you don't have time to work on it please indicate so (I don't think it's
possible to pick up a patch if the status is 'Abandoned') and someone else
can look into the test failures.


Julie, Matthias,
I restored the patch, rebased, fixed the tests, added the test files as 
Radomir suggested and removed the .jshintrc file.


The original patch was WIP and I left the failing tests intentionally, 
so that it was easier to compare the two solutions (node.js vs pure 
qunit). But as I wrote, it's cleaned up by now and only contains the latter.


Imre




The patch also contains a .jshintrc file for the node.js package but you
can remove it since it's not used by the qunit+jshint test at all.


Sounds good.

Julie


Imre

[1] https://review.openstack.org/#/c/41087/


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




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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-26 Thread Maxime Vidori
I made a little POC about Nodejs integration with its task runner Grunt 
https://review.openstack.org/58525

It is easy to configure and override, we have more flexibility with this 
solution.

Running Selenium which will run Firefox which will launch an html page with js 
embedded seems really overkill. It provides a lot of complexity and we have to 
manipulate the file launched by Firefox if we want a little modification or 
just test a single file. 
Currently all files are tested together with all the tests without any control. 
Imagine testing the backend this way, launching all the tests just for looking 
at your modifications. No command line support in development implies a lack of 
automatisation, and a lack of automatisation lead to a lose of time. 

In the other hand, grunt allows us to launch tests on a specific file or all 
libraries. We can make specific tasks really fast with a better readability. I 
encourage you to think of the further developments and to think of all the pro 
and cons of these solutions. Just test it and look at the documentation with 
all the plugins (unit testing, less compilation, jshint checking, angular 
testing), this is just configuration and no development, with a great community 
which will allow us to focus on the Horizon development and not wasting times 
on external tools.

Horizon will need more and more development on the client side, currently 
javascript is a mess and we need great tools to improve our work. Developing 
our tools will take time and during this time developers will continue 
developing with no tools to automate or check their work.

Maxime

- Original Message -
From: Imre Farkas ifar...@redhat.com
To: openstack-dev@lists.openstack.org
Sent: Tuesday, November 26, 2013 1:42:26 PM
Subject: Re: [openstack-dev] [horizon] Javascript development improvement

On 11/22/2013 06:13 PM, Julie Pichon wrote:
 Imre Farkas ifar...@redhat.com wrote:
 On 11/22/2013 02:49 PM, Maxime Vidori wrote:
 It seems a bit crazy to me to introduce NodeJS as a dependency just for
 the sake of an easy way to run jslint. There are other options
 available that run without NodeJS as a dependency.

 Sadly, the only solutions which try to implement jslint in pure python are
 in alpha or abandoned. If you have a python library which has the same
 quality as jslint (which is written by Douglas Crockford himself), I will
 be glad to take a look at it.

 There's a jslint fork called jshint which is able to run in the browser
 without any node.js dependency.

 I created a POC patch [1] long time ago to demonstrate its capabilities.
 It's integrated with qunit and runs automatically with the horizon test
 suite.

 Thanks Imre, this is interesting. Would you mind restoring the patch? If
 you don't have time to work on it please indicate so (I don't think it's
 possible to pick up a patch if the status is 'Abandoned') and someone else
 can look into the test failures.

Julie, Matthias,
I restored the patch, rebased, fixed the tests, added the test files as 
Radomir suggested and removed the .jshintrc file.

The original patch was WIP and I left the failing tests intentionally, 
so that it was easier to compare the two solutions (node.js vs pure 
qunit). But as I wrote, it's cleaned up by now and only contains the latter.

Imre


 The patch also contains a .jshintrc file for the node.js package but you
 can remove it since it's not used by the qunit+jshint test at all.

 Sounds good.

 Julie

 Imre

 [1] https://review.openstack.org/#/c/41087/

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



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

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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-22 Thread Maxime Vidori
I will start reading documentation in order to integrate node in development, 
we also want to integrate its testing into the existing ones. I think a 
blueprint will be necessary.

- Original Message -
From: Jiri Tomasek jtoma...@redhat.com
To: openstack-dev@lists.openstack.org
Sent: Thursday, November 21, 2013 1:55:48 PM
Subject: Re: [openstack-dev] [horizon] Javascript development improvement

Hi,

I also don't see an issue with using nodejs in Horizon development 
environment. Is the problem in Django not differentiating the 
development and production environments by default?
Could the problem be resolved by having two different environments with 
the two requirements files etc. similar as Rails does?

Regarding less, I don't really care what compiler we use as long as it 
works. And if we need to provide uncompiled less for production, then 
let's use Lesscpy.

Jirka

On 11/21/2013 09:21 AM, Ladislav Smola wrote:
 Hello,

 as long as node won't be Production dependency, it shouldn't be a 
 problem, right? I give +1 to that

 Regards
 Ladislav

 On 11/20/2013 05:01 PM, Maxime Vidori wrote:
 Hi all, I know it is pretty annoying but I have to resurrect this 
 subject.

 With the integration of Angularjs into Horizon we will encounter a 
 lot of issues with javascript. I ask you to reconsider to bring back 
 Nodejs as a development platform. I am not talking about production, 
 we are all agree that Node is not ready for production, and we do not 
 want it as a backend. But the facts are that we need a lot of its 
 features, which will increase the tests and the development. 
 Currently, we do not have any javascript code quality: jslint is a 
 great tool and can be used easily into node. Angularjs also provides 
 end-to-end testing based on nodejs again, testing is important 
 especially if we start to put more logic into JS. Selenium is used 
 just to run qUnit tests, we can bring back these tests into node and 
 have a clean unified testing platform. Tests will be easier to perform.

 Finally, (do not punch me in the face) lessc which is used for 
 bootstrap is completely integrated into it. I am afraid that modern 
 javascript development can not be perform without this tool.

 Regards

 Maxime Vidori


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


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


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

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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-22 Thread Julie Pichon
Maxime Vidori maxime.vid...@enovance.com wrote:
 Hi all, I know it is pretty annoying but I have to resurrect this subject.
 
 With the integration of Angularjs into Horizon we will encounter a lot of
 issues with javascript. I ask you to reconsider to bring back Nodejs as a
 development platform. I am not talking about production, we are all agree
 that Node is not ready for production, and we do not want it as a backend.
 But the facts are that we need a lot of its features, which will increase
 the tests and the development. Currently, we do not have any javascript code
 quality: jslint is a great tool and can be used easily into node. Angularjs
 also provides end-to-end testing based on nodejs again, testing is important
 especially if we start to put more logic into JS. Selenium is used just to
 run qUnit tests, we can bring back these tests into node and have a clean
 unified testing platform. Tests will be easier to perform.

It seems a bit crazy to me to introduce NodeJS as a dependency just for
the sake of an easy way to run jslint. There are other options
available that run without NodeJS as a dependency.

There are more implications to running NodeJS even only for
development. It will likely have an impact on our infrastructure as
well, since we'll want these checks running on patches up for
review. Then if it's there for development it increases the risk it
will creep in as a dependency for our runtime.

As for Selenium, are you talking about rewriting our existing Selenium
tests in Javascript? If so I am opposed to this. The strength of our
community is in Python, if we want to encourage people to write more
tests we should make it easy for them to do so.

I think you bring up great points, we do need to control our Javascript
quality better especially as we bring in more of it into our
codebase. But, style checks, CSS, and unit testing, shouldn't require
NodeJS.

Julie
 
 Finally, (do not punch me in the face) lessc which is used for bootstrap is
 completely integrated into it. I am afraid that modern javascript
 development can not be perform without this tool.
 
 Regards
 
 Maxime Vidori
 

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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-22 Thread Matthias Runge
On 11/21/2013 01:55 PM, Jiri Tomasek wrote:
 Hi,

 
 Regarding less, I don't really care what compiler we use as long as it
 works. And if we need to provide uncompiled less for production, then
 let's use Lesscpy.
 

There is at least one bug open against Ubuntu[1], asking to install
python-lesscpy as well, as customers often need to re-create or change
stylesheets.

This would imply nodejs in a production environment, when going back to
less.

Just naming the n word here, makes people bite, for whatever reason ;-)

Matthias

[1]
https://bugs.launchpad.net/ubuntu/+source/openstack-dashboard/+bug/1071276

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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-22 Thread Matthias Runge
On 11/22/2013 11:10 AM, Maxime Vidori wrote:
 I will start reading documentation in order to integrate node in development, 
 we also want to integrate its testing into the existing ones. I think a 
 blueprint will be necessary.
 
Since it was such a pain to get rid of nodejs, I'd love to see other
options here.

Matthias

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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-22 Thread Sascha Peilicke
On Friday 22 November 2013 13:13:29 Matthias Runge wrote:
 On 11/21/2013 01:55 PM, Jiri Tomasek wrote:
  Hi,
  
  
  Regarding less, I don't really care what compiler we use as long as it
  works. And if we need to provide uncompiled less for production, then
  let's use Lesscpy.
 
 There is at least one bug open against Ubuntu[1], asking to install
 python-lesscpy as well, as customers often need to re-create or change
 stylesheets.

I asked chuck months ago to package it :-) 

 This would imply nodejs in a production environment, when going back to
 less.
 
 Just naming the n word here, makes people bite, for whatever reason ;-)
 
 Matthias
 
 [1]
 https://bugs.launchpad.net/ubuntu/+source/openstack-dashboard/+bug/1071276
 
 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-- 
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] Javascript development improvement

2013-11-22 Thread Maxime Vidori
There is at least one bug open against Ubuntu[1], asking to install
python-lesscpy as well, as customers often need to re-create or change
stylesheets.

This would imply nodejs in a production environment, when going back to
less.

As long as the css will be the only one included into the package, we cannot 
run into this issue. If someone wants to modify the less file he could compile 
it and just copy paste the result into the proper directory.

It seems a bit crazy to me to introduce NodeJS as a dependency just for
the sake of an easy way to run jslint. There are other options
available that run without NodeJS as a dependency.

Sadly, the only solutions which try to implement jslint in pure python are in 
alpha or abandoned. If you have a python library which has the same quality as 
jslint (which is written by Douglas Crockford himself), I will be glad to take 
a look at it.

There are more implications to running NodeJS even only for
development. It will likely have an impact on our infrastructure as
well, since we'll want these checks running on patches up for
review. Then if it's there for development it increases the risk it
will creep in as a dependency for our runtime.

That is a good point, but Selenium also provides external dependencies, like a 
browser to run into. I do not really know the infrastructure used by jenkins 
and how we can integrate our solution into, but I do not think it is impossible 
(I have never got any trouble with the installation of node with the sources in 
any distro). 

As for Selenium, are you talking about rewriting our existing Selenium
tests in Javascript? If so I am opposed to this. The strength of our
community is in Python, if we want to encourage people to write more
tests we should make it easy for them to do so.

Currently we have two Selenium tests in pure python, and all the others are 
running in a page with qUnit, which is a javascript unit testing framework.

Lastly, we will start using angularjs as a front-end framework, it provides an 
advanced testing framework which allows us to get rid of selenium.

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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-22 Thread Matthias Runge
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11/22/2013 02:19 PM, Sascha Peilicke wrote:
 On Friday 22 November 2013 13:13:29 Matthias Runge wrote:
 On 11/21/2013 01:55 PM, Jiri Tomasek wrote:
 Hi,
 
 
 Regarding less, I don't really care what compiler we use as
 long as it works. And if we need to provide uncompiled less for
 production, then let's use Lesscpy.
 
 There is at least one bug open against Ubuntu[1], asking to
 install python-lesscpy as well, as customers often need to
 re-create or change stylesheets.
 
 I asked chuck months ago to package it :-)
 
AFAIK it is packaged already.

I was not speaking about lesscpy (which might raised your attention
here), but about less compiler in general (or other tools, probably
useful for maintainers/customizers tasks).

Matthias

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSj2qnAAoJEOnz8qQwcaIWeZcH/jC7RUTUPD+fa9lG92YmYuoU
XiG9xivEVtOrhHlqigb43A6rGVkq7IPEVCnf3nMCwxtVHcoLdy3Pq8QPqFEI9LNv
GrjfoKoFy8R71AuAWVblTWgMxJ/4ffHDny4na4FDiqn02vMCucYvsPAKsNU6m3fU
SaFC1pH0f7/LeVpa13IJuM7XlEKpbPNwKObFfxalIen9ISP+9iQeWlczAr96Z198
tjdPg+2CeXM4Dh+jklYjOQHB5ITxFI3U4ehXCDB+aJS5HnGulL4gF1120zsBScG7
fsTI67n+r0mhMo9rIQdVVJFmK/wpHXzKQi8bsBJctk+hJ1UG9sHNjRJVmmq9SWY=
=7B9B
-END PGP SIGNATURE-

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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-22 Thread Imre Farkas

On 11/22/2013 02:49 PM, Maxime Vidori wrote:

It seems a bit crazy to me to introduce NodeJS as a dependency just for
the sake of an easy way to run jslint. There are other options
available that run without NodeJS as a dependency.


Sadly, the only solutions which try to implement jslint in pure python are in 
alpha or abandoned. If you have a python library which has the same quality as 
jslint (which is written by Douglas Crockford himself), I will be glad to take 
a look at it.


There's a jslint fork called jshint which is able to run in the browser 
without any node.js dependency.


I created a POC patch [1] long time ago to demonstrate its capabilities. 
It's integrated with qunit and runs automatically with the horizon test 
suite.


The patch also contains a .jshintrc file for the node.js package but you 
can remove it since it's not used by the qunit+jshint test at all.


Imre

[1] https://review.openstack.org/#/c/41087/


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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-22 Thread Julie Pichon
Maxime Vidori maxime.vid...@enovance.com wrote:
 There is at least one bug open against Ubuntu[1], asking to install
 python-lesscpy as well, as customers often need to re-create or change
 stylesheets.
 
 This would imply nodejs in a production environment, when going back to
 less.
 
 As long as the css will be the only one included into the package, we cannot
 run into this issue. If someone wants to modify the less file he could
 compile it and just copy paste the result into the proper directory.

This doesn't sound particularly friendly, I think what Matthias was
getting at is that there are requests from users who want to be able to
modify the CSS directly.

 It seems a bit crazy to me to introduce NodeJS as a dependency just for
 the sake of an easy way to run jslint. There are other options
 available that run without NodeJS as a dependency.
 
 Sadly, the only solutions which try to implement jslint in pure python are in
 alpha or abandoned. If you have a python library which has the same quality
 as jslint (which is written by Douglas Crockford himself), I will be glad to
 take a look at it.

Sure, I'll look into it. There seems to be also Javascript-based
solutions that could be viable. If anyone has recommendations based on
past experience, please let me know. The patch Imre linked to looks
like a good start!

 There are more implications to running NodeJS even only for
 development. It will likely have an impact on our infrastructure as
 well, since we'll want these checks running on patches up for
 review. Then if it's there for development it increases the risk it
 will creep in as a dependency for our runtime.
 
 That is a good point, but Selenium also provides external dependencies, like
 a browser to run into. I do not really know the infrastructure used by
 jenkins and how we can integrate our solution into, but I do not think it is
 impossible (I have never got any trouble with the installation of node with
 the sources in any distro).

Selenium is already integrated with our Jenkins gate. I don't think it
hurts either to run the tests in an environment similar to what they
need to work in in the end.

 As for Selenium, are you talking about rewriting our existing Selenium
 tests in Javascript? If so I am opposed to this. The strength of our
 community is in Python, if we want to encourage people to write more
 tests we should make it easy for them to do so.
 
 Currently we have two Selenium tests in pure python, and all the others are
 running in a page with qUnit, which is a javascript unit testing framework.
 
 Lastly, we will start using angularjs as a front-end framework, it provides
 an advanced testing framework which allows us to get rid of selenium.

I don't think Selenium is going away, and efforts have started around
using it as well for our integration tests [0]. Looking at the current
AngularJS patch up for review, it is testable without requiring
NodeJS. From the initial mailing list discussion [1], my understanding
is that we're planning on using a specific AngularJS feature, not
rewriting everything with it. Changing our build system to accommodate
this seems like getting a bit ahead of ourselves.

Julie

[0] https://blueprints.launchpad.net/horizon/+spec/selenium-integration-testing
[1] http://lists.openstack.org/pipermail/openstack-dev/2013-November/018850.html

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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-22 Thread Julie Pichon
Imre Farkas ifar...@redhat.com wrote:
 On 11/22/2013 02:49 PM, Maxime Vidori wrote:
  It seems a bit crazy to me to introduce NodeJS as a dependency just for
  the sake of an easy way to run jslint. There are other options
  available that run without NodeJS as a dependency.
 
  Sadly, the only solutions which try to implement jslint in pure python are
  in alpha or abandoned. If you have a python library which has the same
  quality as jslint (which is written by Douglas Crockford himself), I will
  be glad to take a look at it.
 
 There's a jslint fork called jshint which is able to run in the browser
 without any node.js dependency.
 
 I created a POC patch [1] long time ago to demonstrate its capabilities.
 It's integrated with qunit and runs automatically with the horizon test
 suite.

Thanks Imre, this is interesting. Would you mind restoring the patch? If
you don't have time to work on it please indicate so (I don't think it's
possible to pick up a patch if the status is 'Abandoned') and someone else
can look into the test failures.

 The patch also contains a .jshintrc file for the node.js package but you
 can remove it since it's not used by the qunit+jshint test at all.

Sounds good.

Julie

 Imre
 
 [1] https://review.openstack.org/#/c/41087/

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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-22 Thread Jordan OMara

On 22/11/13 12:06 -0500, Julie Pichon wrote:

I don't think Selenium is going away, and efforts have started around
using it as well for our integration tests [0]. Looking at the current
AngularJS patch up for review, it is testable without requiring
NodeJS. 


While the Angular modules are testable in QUnit, it would be a boon to use the
testing patterns common with most Angular projects.  It would make new
developers, familiar with Angular but not Horizon, immediately familiar with the
workflow.

QUnit is acceptable, but karma/jasmine is preferable


From the initial mailing list discussion [1], my understanding
is that we're planning on using a specific AngularJS feature, not
rewriting everything with it. Changing our build system to accommodate
this seems like getting a bit ahead of ourselves.

[1] http://lists.openstack.org/pipermail/openstack-dev/2013-November/018850.html


To be clear, we're using a specific feature of Angular (the directive) to
introduce it into the existing Django templates; that's not the only feature of
Angular we're using. There are controllers  services behind the directive, but
using a directive is the cleanest way of integrating these features with the
existing templates.

--
Jordan O'Mara jomara at redhat.com
Red Hat Engineering, Raleigh 


pgpVLkAm0WvI6.pgp
Description: PGP signature
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-22 Thread Maxime Vidori
That is a fact all client side development is based on javascript, Node allow 
us to easily execute javascript without a browser. Every time we will have a 
reflexion on the client side, Node will show up, what we are doing is just 
delaying something inevitable and wasting our forces in compromises. Node is 
not the best way, but it is the easiest one, what would we do next time, search 
another alternative in python, if it is buggy we will have to maintain it. You 
are right Node is currently fancy, but less is fancy, angular is fancy but they 
provides some ease and that is why we choose them.

- Original Message -
From: Jordan OMara jom...@redhat.com
To: OpenStack Development Mailing List (not for usage questions) 
openstack-dev@lists.openstack.org
Sent: Friday, November 22, 2013 7:22:12 PM
Subject: Re: [openstack-dev] [horizon] Javascript development improvement

On 22/11/13 12:06 -0500, Julie Pichon wrote:
I don't think Selenium is going away, and efforts have started around
using it as well for our integration tests [0]. Looking at the current
AngularJS patch up for review, it is testable without requiring
NodeJS. 

While the Angular modules are testable in QUnit, it would be a boon to use the
testing patterns common with most Angular projects.  It would make new
developers, familiar with Angular but not Horizon, immediately familiar with the
workflow.

QUnit is acceptable, but karma/jasmine is preferable

 From the initial mailing list discussion [1], my understanding
is that we're planning on using a specific AngularJS feature, not
rewriting everything with it. Changing our build system to accommodate
this seems like getting a bit ahead of ourselves.

[1] 
http://lists.openstack.org/pipermail/openstack-dev/2013-November/018850.html

To be clear, we're using a specific feature of Angular (the directive) to
introduce it into the existing Django templates; that's not the only feature of
Angular we're using. There are controllers  services behind the directive, but
using a directive is the cleanest way of integrating these features with the
existing templates.

-- 
Jordan O'Mara jomara at redhat.com
Red Hat Engineering, Raleigh 

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

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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-21 Thread Ladislav Smola

Hello,

as long as node won't be Production dependency, it shouldn't be a 
problem, right? I give +1 to that


Regards
Ladislav

On 11/20/2013 05:01 PM, Maxime Vidori wrote:

Hi all, I know it is pretty annoying but I have to resurrect this subject.

With the integration of Angularjs into Horizon we will encounter a lot of 
issues with javascript. I ask you to reconsider to bring back Nodejs as a 
development platform. I am not talking about production, we are all agree that 
Node is not ready for production, and we do not want it as a backend. But the 
facts are that we need a lot of its features, which will increase the tests and 
the development. Currently, we do not have any javascript code quality: jslint 
is a great tool and can be used easily into node. Angularjs also provides 
end-to-end testing based on nodejs again, testing is important especially if we 
start to put more logic into JS. Selenium is used just to run qUnit tests, we 
can bring back these tests into node and have a clean unified testing platform. 
Tests will be easier to perform.

Finally, (do not punch me in the face) lessc which is used for bootstrap is 
completely integrated into it. I am afraid that modern javascript development 
can not be perform without this tool.

Regards

Maxime Vidori


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



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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-21 Thread Jiri Tomasek

Hi,

I also don't see an issue with using nodejs in Horizon development 
environment. Is the problem in Django not differentiating the 
development and production environments by default?
Could the problem be resolved by having two different environments with 
the two requirements files etc. similar as Rails does?


Regarding less, I don't really care what compiler we use as long as it 
works. And if we need to provide uncompiled less for production, then 
let's use Lesscpy.


Jirka

On 11/21/2013 09:21 AM, Ladislav Smola wrote:

Hello,

as long as node won't be Production dependency, it shouldn't be a 
problem, right? I give +1 to that


Regards
Ladislav

On 11/20/2013 05:01 PM, Maxime Vidori wrote:
Hi all, I know it is pretty annoying but I have to resurrect this 
subject.


With the integration of Angularjs into Horizon we will encounter a 
lot of issues with javascript. I ask you to reconsider to bring back 
Nodejs as a development platform. I am not talking about production, 
we are all agree that Node is not ready for production, and we do not 
want it as a backend. But the facts are that we need a lot of its 
features, which will increase the tests and the development. 
Currently, we do not have any javascript code quality: jslint is a 
great tool and can be used easily into node. Angularjs also provides 
end-to-end testing based on nodejs again, testing is important 
especially if we start to put more logic into JS. Selenium is used 
just to run qUnit tests, we can bring back these tests into node and 
have a clean unified testing platform. Tests will be easier to perform.


Finally, (do not punch me in the face) lessc which is used for 
bootstrap is completely integrated into it. I am afraid that modern 
javascript development can not be perform without this tool.


Regards

Maxime Vidori


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



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



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


Re: [openstack-dev] [horizon] Javascript development improvement

2013-11-20 Thread Jordan OMara

On 20/11/13 17:01 +0100, Maxime Vidori wrote:

Hi all, I know it is pretty annoying but I have to resurrect this subject.

With the integration of Angularjs into Horizon we will encounter a lot of issues with javascript. I ask you to reconsider to bring back Nodejs as a development platform. I am not talking about production, we are all agree that Node is not ready for production, and we do not want it as a backend. But the facts are that we need a lot of its features, which will increase the tests and the development. Currently, we do not have any javascript code quality: jslint is a great tool and can be used easily into node. Angularjs also provides end-to-end testing based on nodejs again, testing is important especially if we start to put more logic into JS. Selenium is used just to run qUnit tests, we can bring back these tests into node and have a clean unified testing platform. Tests will be easier to perform. 


Finally, (do not punch me in the face) lessc which is used for bootstrap is 
completely integrated into it. I am afraid that modern javascript development 
can not be perform without this tool.



+1 / I will not punch you in the face

It'd be nice to add in the modern angular testing model, karma /
jasmine, and my JS can *DEFINITELY* use jslint :)
--
Jordan O'Mara jomara at redhat.com
Red Hat Engineering, Raleigh 


pgpLgesTBFHZT.pgp
Description: PGP signature
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev