[openstack-dev] [Horizon] the future of angularjs development in Horizon

Thomas Goirand zigo at debian.org
Thu Nov 13 15:04:56 UTC 2014


On 11/13/2014 12:13 PM, Richard Jones wrote:
> the npm stuff is all tool chain; tools
> that I believe should be packaged as such by packagers.

npm is already in Debian:
https://packages.debian.org/sid/npm

However, just like we can't use CPAN, "pear install", "pip install" and
such when building or installing package, we wont be able to use NPM.
This means every single dependency that isn't in Debian will need to be
packaged.

> Horizon is an incredibly complex application. Just so we're all on the
> same page, the components installed by bower for angboard are:
> 
> angular
>   Because writing an application the size of Horizon without it would be
> madness :)
> angular-route
>   Provides structure to the application through URL routing.
> angular-cookies
>   Provides management of browser cookies in a way that integrates well
> with angular.
> angular-sanitize
>   Allows direct embedding of HTML into angular templates, with sanitization.
> json3
>   Compatibility for older browsers so JSON works.
> es5-shim
>   Compatibility for older browsers so Javascript (ECMAScript 5) works.
> angular-smart-table
>   Table management (population, sorting, filtering, pagination, etc)
> angular-local-storage
>    Browser local storage with cookie fallback, integrated with angular
> mechanisms.
> angular-bootstrap
>    Extensions to angular that leverage bootstrap (modal popups, tabbed
> displays, ...)
> font-awesome
>    Additional glyphs to use in the user interface (warning symbol, info
> symbol, ...)
> boot
>    Bootstrap for CSS styling (this is the dependency that brings in
> jquery and requirejs)
> underscore
>    Javascript utility library providing a ton of features Javascript
> lacks but Python programmers expect.
> ng-websocket
>    Angular-friendly interface to using websockets
> angular-translate
>    Support for localization in angular using message catalogs generated
> by gettext/transifex.
> angular-mocks
>    Mocking support for unit testing angular code
> angular-scenario
>    More support for angular unit tests
> 
> Additionally, angboard vendors term.js because it was very poorly
> packaged in the bower ecosystem. +1 for xstatic there I guess :)
> 
> So those are the components we needed to create the prototype in a few
> weeks. Not using them would have added months (or possibly years) to the
> development time. Creating an application of the scale of Horizon
> without leveraging all that existing work would be like developing
> OpenStack while barring all use of Python 3rd-party packages.

I have no problem with adding dependencies. That's how things work, for
sure, I just want to make sure it doesn't become hell, with so many
components inter-depending on 100s of them, which would become not
manageable. If we define clear boundaries, then fine! The above seems
reasonable anyway.

Though did you list the dependencies of the above?

Also, if the Horizon project starts using something like NPM (which
again, is already available in Debian, so it has my preference), will we
at least be able to control what version gets in, just like with pip?
Because that's a huge concern for me, and this has been very well and
carefully addressed during the Juno cycle. I would very much appreciate
if the same kind of care was taken again during the Kilo cycle, whatever
path we take. How do I use npm by the way? Any pointer?

Cheers,

Thomas Goirand (zigo)




More information about the OpenStack-dev mailing list