Blogging Roller
Dave Johnson on social software, open source and Java
Dave Johnson on social software, open source and Java
Over the holidays I avoided doing anything directly related to my current set of work tasks. Sun went quiet, which helped, and I ignored the messages that piled-up in the Roller user and dev lists. It was so quiet that I had time for a fun little project: a JMaki plugin for Roller.
JMaki makes it easy to use JavaScript widgets (Dojo, Google, YUI, etc.) from PHP, JSP, JSF and now Roller. To use a widget, all you have to do is call a method or include a tag and JMaki takes care of including the right JavaScript files and generating the right HTML for you. That's not all JMaki does, there's also a pub/sub facility to make it easy to wire widgets together via events, there's a proxy for fetching remote resources common table and tree data models. The theme is cool widgets with ease-of-development and that's what I'd like to see in Roller. You can read more about the JMaki value proposition on the Why Use JMaki page.
Here's an example. Below is a Roller page template that uses two JavaScript widgest, the Dojo Clock and the YUI Data Table. All it takes is a single line of template code to include each widget, and one widget is dynamic i.e. the table is populated via an RSS feed.
<html>
<head><title>JMaki test page</title></head>
<body>
<h1>JMaki test: dojo.clock</h1>
$jmaki.addWidget("dojo.clock")
<h1>JMaki test: yahoo.dataTable</h1>
$jmaki.addWidget("yahoo.dataTable", "/roller/xhp?id=rss","","")
</body>
</html>
And here's what that page looks like when displayed by Roller:
I'll write more about the plugin once I install it on this site. If you want some details about how the plugin was developed, you can read the email that I sent to the JMaki dev list: JMaki for Roller issues and suggestions. It links to the Java source code for the plugin.
Tags: jmaki java javascript roller
Tags: jruby groovy javascript roller scripting
Alexis Moussine-Pouchkine has taken my Generating JSON for your Roller blog post a few steps further down the road. He created a screen-cast to show how easy it is to use Netbeans 5.5 and the JMaki widget wrappers to serve up Roller data in a a Dojo table. Cool stuff. I really need to find the time to take JMaki for a spin.
And BTW, I'm still working on my Dojo table example, which will be similar to what Alexis has done but it will use Dojo directly within a Roller blog -- no IDEs or JSPs required.
Tags: dojo blogging javascript ajax roller