Web 2.0 and Java 
Web 2.0 and Java
The Zen of jMaki
Greg Murray
Ajax Architect Sun Microsystems
December 12, 2006
Agenda
Web 2.0 and Java What is jMaki jMaki Widget Model jMaki Templates jMaki Injector jMaki Glue XmlHttpProxy for Mashups Building Applications with jMaki
2
Web 2.0
3
What problem are we trying to solve?
4
What our managers want...
5
What developers want...
http://www.isoma.net/games/goggles.html
6
Realities
We don't always have the skill sets We don't have an infinite budget We don't have infinite time
7
End Result
We copy something a web application out there or go with a technology we know. Or we go over the top and over-reach our skill set.
8
Ajax options in Java
Frameworks
– – –
Direct Web Remoting (DWR) Java Server Faces Use all Java Google Web Toolkit
Use JavaScript toolkit on client with:
– Servlets – JSP
9
Dojo Toolkit
Why Dojo?
– Package/build system - Load what you need – dojo.event - Cross browser event handling – dojo.ally - Accessibility – dojo.18n - Internationalization – dojo.lfx Effects – dojo.gfx - SVG/VML abstraction – dojo.io - Common abstraction to Ajax IO – dojo.storage - Storage
10
There are other Options
Faces – Ajax with existing and future JSF * Phobos – Scripting on the server* jMaki – Framework for creating JavaScript centric web applications
Dynamic
* jMaki is supported in both Project Dyanmic Faces and Phobos
11
jMaki
jMaki - Not jMonkey ‘j’ is for JavaScript Maki is to Wrap (Japanese) jMaki == JavaScript Wrappers
12
jMaki Birthplace
Kumamoto, Japan
13
What is jMaki?
jMaki is a Client/Server Framework that provides:
On the Client –Styles and templates –Widget Model –Client Runtime –Client Services On the Server –Server Runtime –XMLHttpProxy
14
https://ajax.dev.java.net/about.html
jMaki
jMaki - Not jMonkey jMaki is not an all or nothing framework ‘j’ is for JavaScript BSD License Supports
– JavaServer Pages – JavaServer Faces – Embedded JavaScript (Phobos) – PHP 5.x
15
jMaki target Audience
Java, PHP, and Phobos developers want to use JavaScript but may want one level of indirection between the script and themselves.
JavaScript developers who want a simple re-usable framework to tie applications together. Designers who want access to CSS
16
jMaki Architecture
17
jMaki Demo
18
jMaki Styles and Templates
19
jMaki Styles and Templates
● ● ● ● ●
We are a cut and paste generation Give you a place to put your widgets Uses standard approach Web Designer friendly Easy to customizing
https://ajax.dev.java.net/source/browse/*checkout*/ajax/ws/lib/css/index.html
20
WYSIRWYG
21
What You See Is REALY What You Get
Template HTML
... ...