<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">+1000 Excellent<br>
      <br>
      I am really excited about having a heavily tested proper
      client-side layer. This<br>
      is very needed, given that amount of javascript in Horizon is
      rising. The hacked <br>
      together libraries in JQuery, that are there now are very hard to
      orient in and will <br>
      be hard to maintain in the future.<br>
      <br>
      Not sure what the Horizon consensus will be, but I would recommend
      writing<br>
      new libraries only in Angularjs with proper tests. In the meantime
      we can practise<br>
      Angularjs by rewriting the existing stuff. I am really looking
      forward to picking<br>
      something to rewrite. :-)<br>
      <br>
      Also I am not sure how the Horizon community feels about 'syntax
      sugar' libraries<br>
      for Javascript and Angular. But from my experience, using
      Coffeescript and Sugarjs <br>
      makes programming in Javascript and Angular a fairy tale (you
      know, rainbows and <br>
      unicorns everywhere you look). :-D<br>
      <br>
      Thanks for working on this.<br>
      <br>
      Ladislav<br>
      <br>
      On 11/11/2013 08:21 PM, Jordan OMara wrote:<br>
    </div>
    <blockquote cite="mid:20131111192149.GS39851@redhat.com" type="cite">Hello
      Horizon!
      <br>
      <br>
      On November 11th, we submitted a patch to introduce AngularJS into
      <br>
      Horizon [1]. We believe AngularJS adds a lot of value to Horizon.
      <br>
      <br>
      First, AngularJS allows us to write HTML templates for interactive
      <br>
      elements instead of doing jQuery-based DOM manipulation. This
      allows
      <br>
      the JavaScript layer to focus on business logic, provides easy to
      <br>
      write JavaScript testing that focuses on the concern (e.g.
      business
      <br>
      logic, template, DOM manipulation), and eases the on-boarding for
      new
      <br>
      developers working with the JavaScript libraries. <br>
      Second, AngularJS is not an all or nothing solution and integrates
      <br>
      with the existing Django templates. For each feature that requires
      <br>
      JavaScript, we can write a self-contained directive to handle the
      DOM,
      <br>
      a template to define our view and a controller to contain the
      business
      <br>
      logic. Then, we can add this directive to the existing template.
      To
      <br>
      see an example in action look at _workflow_step_update_member.html
      <br>
      [2]. It can also be done incrementally - this isn't an
      all-or-nothing
      <br>
      approach with a massive front-end time investment, as the Angular
      <br>
      components can be introduced over time.
      <br>
       
      <br>
      Finally, the initial work to bring AngularJS to Horizon provides a
      <br>
      springboard to remove the "DOM Database" (i.e. hidden-divs) used
      on
      <br>
      the membership page (and others). Instead of abusing the DOM, we
      can
      <br>
      instead expose an API for membership data, add an AngularJS
      resource
      <br>
      (i.e. reusable representation of API entities) for the API. The
      data
      <br>
      can then be loaded data asynchronously and allow the HTML to focus
      on
      <br>
      expressing a semantic representation of the data to the user.
      <br>
        Please give our patch a try! You can find the interactions on
      <br>
      Domains/Groups, Flavors/Access(this form does not seem to work in
      <br>
      current master or on my patch) and Projects/Users&Groups. You
      should
      <br>
      notice that it behaves...exactly the same!
      <br>
        We look forward to your feedback.  Jordan O'Mara & Jirka
      Tomasek
      <br>
      <br>
      [1] [<a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/55901/">https://review.openstack.org/#/c/55901/</a>] [2]
[<a class="moz-txt-link-freetext" href="https://github.com/jsomara/horizon/blob/angular2/horizon/templates/horizon/common/_workflow_step_update_members.html">https://github.com/jsomara/horizon/blob/angular2/horizon/templates/horizon/common/_workflow_step_update_members.html</a>]<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>