WSO2 Presentation Layer                 - Nuwan Bandara
What is the presentation layer ?● The place where data becomes information● Where all underneath complexities are given  a...
What it means to be the presentationlayer of a middleware platform● A lot of data● A lot of data formats● Plenty of apis i...
JSP & Servlets● Is the common choice is java based  platforms● Provides a solid platform to build UIs● Have a rich toolset
Carbon UI● In combination provides the UI for the  underlying services layer● Modular● Separates the concerns● Plugable
Limitations of the currentpresentation platform● The pluggable UI components are in .jar  archives● Not flexible for chang...
Solution & Alternatives● Use a light weight frontend● No deployment hassle● Simply vi in the source● PHP ? Python ? JavaSc...
Advantages of Javascript● One language across the board● Wide developer community adoption● A rich data format● Plenty of ...
Javascript in the server● No mismatches of data back and forth● One language at the client and at the server● Share librar...
● A runtime that process javascript at the  server● easy of application development deployment  lifecycle● A useful tool s...
How its been built● Based on Mozilla Rhino● Deployed as same as an exploded .war file
Hello World in Jaggery  /helloworld.jag    <%         print(Hello World);    %>
Additional Helpers●   Log●   Require●   <%= %>●   get/post/put/del●   Include●   File●   Database●   etc
JSON/person.json{    "person":{               "name":"nuwan",               "tg":"development"             }}
How JSON makes it all easy/data.jag<%var person = {"name":"nuwan", "company":"wso2"};print(person);%>/display.html<script>...
Jaggery and APIs● Content negociation  ○ Can send the page or the data based on the requested content       type● Natively...
Jaggery Editor●   For now only support IntelliJ Idea●   Full fledge web based IDE - Coming Soon with UES●   Developer Stud...
Jaggery Debugger
Questions ?Answers are at - http://jaggeryjs.org/documentation.jag                       :)
Upcoming SlideShare
Loading in …5
×

WSO2 Presentation Layer

801 views

Published on

WSO2 Trainings

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
801
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

WSO2 Presentation Layer

  1. 1. WSO2 Presentation Layer - Nuwan Bandara
  2. 2. 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
  3. 3. What it means to be the presentationlayer of a middleware platform● A lot of data● A lot of data formats● Plenty of apis in various formats
  4. 4. JSP & Servlets● Is the common choice is java based platforms● Provides a solid platform to build UIs● Have a rich toolset
  5. 5. Carbon UI● In combination provides the UI for the underlying services layer● Modular● Separates the concerns● Plugable
  6. 6. Limitations of the currentpresentation 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
  7. 7. Solution & Alternatives● Use a light weight frontend● No deployment hassle● Simply vi in the source● PHP ? Python ? JavaScript ?
  8. 8. Advantages of Javascript● One language across the board● Wide developer community adoption● A rich data format● Plenty of rich libraries for front end development
  9. 9. 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
  10. 10. ● 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
  11. 11. How its been built● Based on Mozilla Rhino● Deployed as same as an exploded .war file
  12. 12. Hello World in Jaggery /helloworld.jag <% print(Hello World); %>
  13. 13. Additional Helpers● Log● Require● <%= %>● get/post/put/del● Include● File● Database● etc
  14. 14. JSON/person.json{ "person":{ "name":"nuwan", "tg":"development" }}
  15. 15. 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>
  16. 16. Jaggery and APIs● Content negociation ○ Can send the page or the data based on the requested content type● Natively support JSON (whos 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
  17. 17. Jaggery Editor● For now only support IntelliJ Idea● Full fledge web based IDE - Coming Soon with UES● Developer Studio Based IDE - Coming Soon
  18. 18. Jaggery Debugger
  19. 19. Questions ?Answers are at - http://jaggeryjs.org/documentation.jag :)

×