Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Improving UX could also imply more complex GUI and a lot more work for developers. The challenge is to keep happy users, developers and software architects as well

Integration to the Sakai's platform

Exploring Differents Solutions

We want to talk about some of the concerns that we have about the integration of a GWT client to the Sakai's platform and how they have been addressed.

Firstly, we needed to prove the feasibility of the integration of a GWT client with the Sakai's platform. Hopefully, Sakai is based on the Spring framework and the integration of GWT to Spring has already been done by others George Georgovassilis . Anyway, Spring is well known for its integration capabilities, but we have to find the best way.

With the help of people from Sakai Québec (CRIM), we made a proof of concept of the integration of GWT and Sakai. What we did is pretty similar to the work of Luis Filipe Lobo, using servlet extension of GWT servlet, Sakai listener and tool registering into Sakai.

The role of the JSP entry page

Now, we will see what are the roles of the JSP entry page (index.jsp).

  • First it gives access to the GWT compiled JavaScript.

Here is a sample of the script tag you have to put into your jsp page to give access to the GWT compiled JS.

Code Block
xmlExtract from index.jsp
borderStylesolid

<!-- This script loads our GWT compiled module.        -->
<!-- Any GWT meta tags must be added before this line. -->
<script language='javascript' 
src='<%=request.getContextPath() %>/org.sakaiquebec.opensyllabus.OsylEditorEntryPoint/org.sakaiquebec.opensyllabus.OsylEditorEntryPoint.nocache.js'>
</script>
  • With JSP scriptlet you can use specific logic to choose between different compiled GWT applications
  • Provides the CSS Link
Code Block
xmlExtract from index.jsp
borderStylesolid

<link rel="stylesheet" type="text/css" href="osylcoconfigs/default/skin/osylcore.css" />
  • Initializes some META to set the language (I18N)?
Code Block
xmlExtract from index.jsp
borderStylesolid

...<%@ page import="org.sakaiproject.util.ResourceLoader"%>
...
<%
ResourceLoader rb = new ResourceLoader();
Locale sessionLocale = rb.getLocale();
String locale = sessionLocale.toString();
...
%>
<html>
<head>
<meta name="gwt:property" content="locale=<%=locale%>">
... 
  • Controls the tool display size
Code Block
xmlExtract from index.jsp
borderStylesolid

...
<html>
<head>
...
<!-- Headers from Sakai                        -->
<%= request.getAttribute("sakai.html.head") %>
<script> // Size of the JS application
function myLoad() {
setTimeout("<%=request.getAttribute("sakai.html.body.onload") %>", 500);
}
</script>
</head>
<body onload="myLoad()">
...

Client based on the MVC design pattern

...