Activate your free membership today | Log-in

Wednesday, September 26th, 2007

jMaki 1.0 Final Release: Ajax for Java and PHP

Category: Java, Library, jMaki

Greg Murray has put the stake in the ground and released jMaki 1.0. The release comes with “bundles” for PHP and Java which you can choose on the download area.

Included in the bundles:

  • The core jMaki framework.
  • Sample applications.
  • Ant task for creating applications and adding widgets and necessary dependencies to those applications.
  • All the scripts and widget libraries.

To see more, check out the jMaki Samples.

jMaki 1.0

Posted by Dion Almaer at 8:47 am
6 Comments

+++--
3.6 rating from 29 votes

Monday, July 30th, 2007

jMaki Actions: Communicating between toolkits

Category: Java, jMaki

jMaki Actions are a declarative way of associating widget behavior. The goal here is a holy grails of grabbing a Dojo widgets and a Prototype based one, and having them talk together.

Greg shows an example:

Consider a case where you have a Dojo Fisheye and you simply want it to select a tab or URL when an item is clicked. The Dojo Fisheye is in essence provides the same behavior as a menu. You may notice that the models for the Fisheye Model and the jMaki Menu Model are very similar.”

jMaki models uses general conventions for behaviors and properties you can easily swap widgets. For example you could easily use a Dojo Tabbed View or even swap the FishEye for a menu or tree widget.

jMaki actions are great for general interactions like this and makes it really easy to do basic things like this. More advanced interactions should still be done in glue code as described in Widgets talking to Widgets.

Widgets talking to Widgets

Posted by Dion Almaer at 5:00 am
5 Comments

+++--
3.1 rating from 63 votes

Tuesday, June 12th, 2007

jMaki Extension for Google Gears

Category: Java, Library, Gears, jMaki

Greg Murray has posted his jMaki Extension for Google Gears.

He details the steps required to create an extension for jMaki, and then showed an example of mapping the save button for the Dojo Editor and Dojo Inline Edit components which publish to the topic "*onSave".

JAVASCRIPT:
  1.  
  2. jmaki.addGlueListener("*onSave", function(args) {
  3.     // publish to the google gears
  4.     jmaki.publish("/google/gears/execute",
  5.     { query : 'insert into jmaki values (?, ?)',
  6.       args : [args.value, new Date()],
  7.      callback : function() {
  8.          jmaki.log("Saved " + args.value);
  9.      }
  10.     });
  11. });
  12.  

The returned value is assigned to the global variable window.editorData which you can then assign to your widget. For a Editor you can assign a JavaScript variable as the value using a client side value binding which starts with an '@{' and contains the package and variable name and ends with an '}'. For this window.editorData the client side value binding is @{window.editorData}. With a JSP / JSF widget the tag in a JSP page would look like the following:

JAVASCRIPT:
  1.  
  2. <a :widget name="dojo.editor" value="@{window.editorData}" />
  3.  

Posted by Dion Almaer at 5:44 am
5 Comments

++++-
4.4 rating from 14 votes

Wednesday, March 14th, 2007

Sun Web Developer Pack

Category: Java, Library, PHP, jMaki

The Sun Web Developer Pack isn't a sexy name, and having 'Sun' start it out often doesn't help a technology.... but there is some good technology here.

The Sun Web Developer Pack helps you to leverage emerging web technologies and techniques to create interactive and dynamic web applications for the enterprise. This toolkit is a collection of technologies for Ajax, Scripting and REST-based services development supported by a NetBeans plugin that simplifies the design and development of Rich Internet Applications.

If you look past the marketing-speak you see that Sun has packaged technology such as Project jMaki and Project Phobos.

jMaki is a lightweight, client/server framework for creating JavaScript-centric Web 2.0 applications. You can use jMaki when developing with PHP, Portlets, Facelets, Java, and JavaScript.

Do you see that? Since when did Sun create something that lets you develop with PHP :)

Phobos is a lightweight, scripting-friendly web application environment that runs on the Java platform.

Phobos allows you to write with JavaScript on the server side, which can be very powerful indeed.

There are a vast number of demos available including interesting mashups.

Sun Web Developer Pack

Posted by Dion Almaer at 10:14 am
8 Comments

+++--
3.4 rating from 35 votes

Thursday, February 1st, 2007

jMaki Revolver

Category: JavaScript, Java, Component, Examples, jMaki

Greg Murray of Sun has put together a sample jMaki widget revolver that you use like this:

JAVASCRIPT:
  1.  
  2. window.onload = function() {
  3.         var wargs = {uuid : 'jmaki-revolver'};
  4.     wargs.value = [
  5.       {"title" : "jMaki Craigs List Sample", imgSrc : "../images/cl-mashup.jpg", href :"http://ajax.dev.java.net/samples/samples.html#cl-mashup"},
  6.       {"title" : "jMaki Geocoder Map Sample", imgSrc : "../images/mapit.jpg", href :"http://ajax.dev.java.net/samples/samples.html#mapit"},
  7.       {"title" : "jMaki Charting Sample", imgSrc : "../images/jmaki-charting.jpg", href :"http://ajax.dev.java.net/samples/samples.html#charting"},
  8.       {"title" : "jMaki Sample Application", imgSrc : "../images/jmaki-sample-app.jpg", href :"http://ajax.dev.java.net/samples/samples.html#sample-app"}
  9.    ];
  10.    var revolver = new jmaki.widgets.revolver.Widget(wargs);
  11. }
  12.  

Check it out to see animated revolving in action.

jMaki Revolver

Posted by Dion Almaer at 7:55 am
12 Comments

+++--
3.3 rating from 43 votes

Friday, May 19th, 2006

Java Posse Interviews: Google and Sun Toolkits

Category: JavaScript, Java, Toolkit, Google, Recording, jMaki

The Java Posse has been busy at JavaOne and recorded a couple of interviews on the high-profile Java+Ajax toolkits we've mentioned recently.

Two Interviews about AJAX. The First is with Brett Taylor of Google
about the just-announced red-pill project (also known as the Google Web
Toolkit) and the second with Greg Murray of Sun ...

  • Google Web Toolkit - Project Red-Pill
  • Sun Javascript and AJAX resources
  • Greg also mentions JMaki - https://ajax.dev.java.net/ - and the petstore - https://blueprints.dev.java.net/petstore/. [Trivia: We now have at least 3 Ajax petstores :-).]

    Posted by Michael Mahemoff at 2:24 pm
    8 Comments

    +++--
    3.8 rating from 25 votes

    Thursday, May 18th, 2006

    Sun Announces Ajax Widget Wrapping and JavaScript App Server

    Category: Ajax, JavaScript, Java, jMaki

    Over the past week, Sun has made two very interesting announcements. First, at our own Ajax Experience event, Sun announced jMaki. Created by Sun's Ajax guru Greg Murray, jMaki (Maki is Japanese for "wrap") provides a simple API for embedding disparate JavaScript widgets into a Java web application.

    jMaki is all about enabling Java developers to use JavaScript in their Java based applications as either a JSP tag library or a JSF component. jMaki uses the best parts of Java and the best parts of JavaScript to deliver a rich AJAX style widgets.

    jMaki currently provides bootstrap widgets for many components from Dojo, Scriptaculus, Yahoo UI Widgets and DHTML Goodies. This project also includes a set of AJAX widgets with a focus on Web 2.0 such as a RSS widget, a del.icio.us Bookmark widget, a Chat widget, and many more to come.

    We're pretty excited by how jMaki can make it much easier to add Ajax to Java applications.

    The other very interesting announcement is Phobos, a JavaScript-based application server for Java, created by Roberto Chinnici:

    Project Phobos is a lightweight, scripting-friendly, web application environment running on the Java platform, aimed at addressing emerging developer requirements. Scripting and dynamic languages are growing in popularity among developers, especially for building Web applications. These developers place special value on rapid application development and deployment.

    The goal of Project Phobos is to show that Java is an excellent platform for server-side scripting, allowing dynamic-language developers to leverage the power of Java SE and EE. The initial focus for Project Phobos is JavaScript, but the design supports the use of other dynamic languages as well.

    Phobos uses Rhino, a Java-based JavaScript engine, and supports embedding JavaScript inside web page templates much like Ruby in Rails apps or Java in JSP apps. It's a bit of a mind-bender to imagine JavaScript on the page executing in the client along side JavaScript executing on the server; even cooler: having the server-side JavaScript emit JavaScript eval'd on the client at run-time. Yikes!

    Another eyebrow-raiser is that Phobos doesn't reside within a Java EE container; its a stand-alone app server that competes (conceptually) with a servlet container. What is Sun up to?

    We can't help but be intrigued by the idea. So many of us are becoming JavaScript experts because of all the client-side work we're doing; it sure is nice to be able to apply that knowledge to the server-side as well, and gaining tight integration with the rest of the Java platform as well as being able to compile the scripting code to bytecode for JIT compilation by the Java run-time sure is nice too (Phobos supports both interpreting JavaScript and compiling it).

    Phobos is a research project that isn't yet ready for download (because of licensing issues). Sun is also still working out the governance model for it. Look for another posting in a couple of weeks for more details.

    Posted by Ben Galbraith at 1:56 am
    11 Comments

    ++++-
    4 rating from 43 votes