From: "Vojtech Szocs" <vszocs(a)redhat.com>
To: devel(a)ovirt.org
Sent: Monday, August 25, 2014 11:13:38 AM
Subject: [ovirt-devel] Tools for developing and building oVirt.js project
Hi guys,
last week, we had "oVirt.js PoC" session and I mentioned the possibility
of using Node.js and related tools like npm to develop & build oVirt.js
project.
I'd like to hear your opinion - what do you think about using Node.js in
context of developing & building JavaScript projects? (oVirt.js etc.)
Obviously, I'm strongly biased towards Node.js because of its popularity
and therefore availability of various tools (npm packages) for JavaScript,
for example: grunt (task runner), jslint/hint (code analyzer), uglifyjs
(minify/compress), karma (both one-time & continuous test runner), traceur
(es6 -> es5 compiler), etc.
My understanding is that any special-purpose JavaScript development tool
is typically implemented as module for Node.js (due to its popularity),
so I think it makes sense to use Node.js as a platform for JavaScript
development.
There are also Java-based projects for JavaScript (post)processing like
wro4j, however these tend to be implemented by invoking JS tools (like
uglifyjs) from Java context via Rhino (JS engine for Java), for example:
https://code.google.com/p/wro4j/source/browse/wro4j-extensions/src/main/j...
(To me, developing JavaScript project with Java-centric tooling sounds
quite strange in general.)
There's also webjars repository for hosting popular web resources for
use in Java applications (i.e. Maven artifact for uglifyjs etc.), but
this is just for easier dependency management from Java perspective
(JAR file as a distribution format for web resources):
http://www.webjars.org/
Overall, I'm in favor of using Node.js to manage all tasks related to
JavaScript development and build process. If you have any objections
or suggestions, I'd like to hear them!
(I understand that Node.js essentially means new dependency with all
implications, but in this case, I think it's worth it. But this is
just me, so please share your opinions.)
Thanks,
Vojtech
I think most developers would agree that node.js is the tool of choice for
JavaScript development.
The thing we must carefully consider is that node.js uses its own package
manager (npm -- much like maven), and unlike maven, tooling does not yet
exist to deal with npm packages in an rpm environment.
This isn't on the same level as adding a logging library or a collections
library or something. I'd argue that dependencies don't get any heavier
than this one. That is worrisome to me.
Run 'yum list available |grep nodejs' on your machine to see which node.js
packages are available. Note that I don't see karma or uglify available in
either Fedora or Red Hat SCL (Software Collections) [1].
[1]