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. 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
4. JSP & Servlets
● Is the common choice is java based
platforms
● Provides a solid platform to build UIs
● Have a rich toolset
5. Carbon UI
● In combination provides the UI for the
underlying services layer
● Modular
● Separates the concerns
● Plugable
6. 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
7. Solution & Alternatives
● Use a light weight frontend
● No deployment hassle
● Simply vi in the source
● PHP ? Python ? JavaScript ?
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. 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. ● 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. How its been built
● Based on Mozilla Rhino
● Deployed as same as an exploded .war file
12. Hello World in Jaggery
/helloworld.jag
<%
print('Hello World');
%>
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. 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
17. Jaggery Editor
● For now only support IntelliJ Idea
● Full fledge web based IDE - Coming Soon with UES
● Developer Studio Based IDE - Coming Soon