...
OpenSyllabus frontend is essentially organized around the recommended GWT project structure where we have replaced the server side code by a shared package and moved server RPC API definition (i.e. Interfaces files OsylEditorGwtService.java & OsylEditorGwtServiceAsync.java) into the rpc subpackage of the client.
- Frontend project (GWT code)
- client
- controller
- event
- OsylController.java
- OsylRPCController.java
- OsylViewContext.java
- OsylImageBundle
- rpc
- OsylEditorGwtService.java
- OsylEditorGwtServiceAsync.java
- view
- controller
- public
- css
- img
- html
- shared
- api
- events
- model
- client
Package | Purpose |
---|---|
org/sakaiquebec/opensyllabus/ | The project root package contains modules XML files (i.e OsylEditorEntryPoint.gwt.xml) |
org/sakaiquebec/opensyllabus/client/ | Client-side source files and subpackages |
org/sakaiquebec/opensyllabus/client/controller/ | GUI controller and RPC controller, plus GUI's event subpackage and ViewContext utility |
org/sakaiquebec/opensyllabus/client/OsylImageBundle/ | All the images resources to be compressed using the bundle capacity of GWT |
org/sakaiquebec/opensyllabus/shared/ | Server-side code, including Interfaces, Model update events, Model definition |
org/sakaiquebec/opensyllabus/public/ | Static resources that can be served publicly |
...
OpenSyllabus backend is organized as a classical Sakai's tool following a File Structure based on classic Sakai's tool directories, such as : API (interfaces), Impl (implementations) and Tool (webapp) directory. In the Tool directory, there are RPC Servlets and RPC Interfaces for Remote Procedure Call exchanges in the src/Java folder. In addition, the Tool directory contains the Index.jsp and something new : the compiled GWT content (all the generated GWT stuff : pure JavaScript and HTML)in the src/webapp folder.
- Code Structure Frontend project (GWT code)
- client
- public
- shared
- client
- Backend project (Sakai's tool code)
- api dir
- impl dir
- tool dir
- java
- client
- rpc
- OsylEditorGwtService.java (RPC Servlet)
- OsylEditorGwtServiceAsync.java (RPC Async Interface)
- server
- OsylBackingBean.java
- OsylEditorGwtServiceImpl.java
- rpc
- client
- webap
- index.jsp
- org.sakaiquebec.opensyllabus.OsylEditorEntryPoint (all generated JS code + HTML + images)
- osylcoconfigs (configuration files) I18N properties files, skin: images & css, rules.xml)
- java
...
Running GWT Webapp in "Hosted Mode" makes debugging easy
- Edit your source
- Refresh
- Check the results
Tip | ||
---|---|---|
| ||
Your startup file is OsylEditorEntryPoint-shell.cmd (select it, right-click on it + Open With + Default Editor). It should launch a program from the console. |
- Deployment in Web Mode
When you have made a client code update only. In this use case, you have to invoke the JavaScript compilation then move the compiled JavaScript to the backend code. Also if your backend code is already deployed in Tomcat, just replace the JavaScript code by the new one.
...