Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WSO2 Presentation Layer

WSO2 Presentation Layer

Avatar for Nuwan Bandara

Nuwan Bandara

March 29, 2013
Tweet

More Decks by Nuwan Bandara

Other Decks in Technology

Transcript

  1. What is the presentation layer ? • The place where

    data becomes information • Where all underneath complexities are given a meaning • The place where a first impressions in built
  2. What it means to be the presentation layer of a

    middleware platform • A lot of data • A lot of data formats • Plenty of apis in various formats
  3. JSP & Servlets • Is the common choice is java

    based platforms • Provides a solid platform to build UIs • Have a rich toolset
  4. Carbon UI • In combination provides the UI for the

    underlying services layer • Modular • Separates the concerns • Plugable
  5. Limitations of the current presentation platform • The pluggable UI

    components are in .jar archives • Not flexible for change • Have a strict convention and is limited to the management console UIs
  6. Solution & Alternatives • Use a light weight frontend •

    No deployment hassle • Simply vi in the source • PHP ? Python ? JavaScript ?
  7. Advantages of Javascript • One language across the board •

    Wide developer community adoption • A rich data format • Plenty of rich libraries for front end development
  8. Javascript in the server • No mismatches of data back

    and forth • One language at the client and at the server • Share libraries between the client and the server • Any javascript developer can complete the entire job
  9. • A runtime that process javascript at the server •

    easy of application development deployment lifecycle • A useful tool set perform basic server side functionalities • An extendable platform
  10. How its been built • Based on Mozilla Rhino •

    Deployed as same as an exploded .war file
  11. Additional Helpers • Log • Require • <%= %> •

    get/post/put/del • Include • File • Database • etc
  12. How JSON makes it all easy /data.jag <% var person

    = {"name":"nuwan", "company":"wso2"}; print(person); %> /display.html <script> $.get('data.jag', function(data) { alert('The name is : ' + data.name); }); </script>
  13. Jaggery and APIs • Content negociation ◦ Can send the

    page or the data based on the requested content type • Natively support JSON (who's writing XML based apis anymore ;) ) • For this reason these APIs are inherently mobile friendly • No extra effort to write the API and then the application
  14. Jaggery Editor • For now only support IntelliJ Idea •

    Full fledge web based IDE - Coming Soon with UES • Developer Studio Based IDE - Coming Soon