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

Richard Jones r1chardj0n3s at gmail.com
Thu Nov 13 04:13:30 UTC 2014


Gabriel has responded saying very much what I would have said, so I won't
repeat that. I would like to note though that bower and npm are two
separate beasts entirely. The dependency trees in bower are very limited
indeed (only two additional components are installed beyond the list below)
which is in stark contrast to npm. The xstatic question only applies to the
bower components - the npm stuff is all tool chain; tools that I believe
should be packaged as such by packagers.

I would like to address one specific point Thomas raised though:

On 13 November 2014 12:29, Thomas Goirand <zigo at debian.org> wrote:

> I just don't understand why all of this is needed. I did some JS
> programming myself back in the days (10 years ago, using PHP...). I
> could do Ajax by hand, without using a single library. What is it that
> you're doing in Horizon that needs so many libs? When I see Horizon in
> Juno, I don't even get it. Or is it because you just want to have fancy
> animation? Frankly, I don't care these. I care a lot more that we're not
> adding new potential security problems.
>

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.


     Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141113/984fe830/attachment-0001.html>


More information about the OpenStack-dev mailing list