Grails Google Chart Designer

I wanted to give y’all a little preview of what I’ve been working on: a designer for the Google Chart Plugin.  It’s always been a minor annoyance to have to remember which attributes are required for each chart type. Hopefully, this helps.

Right now, it’s very alpha and there isn’t a lot implemented. The designer bit uses the ZK plugin so I’m debating whether making it a hard dependency or creating a script install the plugin if the user wants to design a chart.

I didn’t feel like waiting forever and ever for Viddler to upload/encode the video so the quality is quite low. Viewing in full screen mode is advised.

If you’re a company in the SF Bay Area looking for a Java/Groovy/Grails developer, let’s talk. I'm moving out there next week. 

Previewing Pivot

One of the cool things about being a Groovyist is the fact that the Java ecosystem seems to be mostly our own playground, full of areas where we can decorate it with Groovy syntactic sugar. When looking at the Pivot framework, bunches of possible Groovyisms flooded my mind.

Pivot is a framework that allows developers to build cross-platform applications for the web and desktop using Java and XML. The “write once, run anywhere” mantra is something that never did quite take hold because previous efforts (namely applets) were a little before their time. But applets have been primed to make a comeback and GWT, Android, and Echo2 have brought Swing-like flows to the web and mobile spaces. But each of those use the familarity of one paradigm to target another, they aren’t trying to be all things to all paradigms as Pivot does.

That being said, I do like some of the features of Pivot. It uses very XUL-like XML files to create its models though they can also be specified using Java code. The structure of those files aligns very well with Groovy’s various builders and parsers. My one point of disappointment was seeing that they implement the web side using applets. I have nothing against applets but I would have preferred a solution that generated HTML à la GWT or ZK. Such an approach would play to the lowest common denominator and deal with the fact that the JRE plugin is not yet a default install in most browsers but I can understand why the applet path was taken. The project is in a developer preview state with only binary files available at the moment and only a handful of demos so that may change in the future. Pivot looks promising but I reserve full judgment until they release the source and I can root around a bit.

Are we foolish for wanting one framework to target all platforms ? Besides the ZUL-like model files/clear separation of MVC, what does this bring to the table that you couldn’t do with AWT/Swing already?

Pivot http://pivot.dev.java.net/

Greg Brown's article on Dzone: Introducing Pivot

Groovy on the JavaPosse

This past weekend, the Java Posse released an episode of impromtu interviews conducted on the JavaOne Pavilion floor. If you want to hear me try to be a good surrogate for Groovy, Check out episode #191.

Friend Feed on your blog

Given that Twitter is flaky as of late, I’ve decided to replace the Twitter badge on my blog to a Friend Feed badge. Friend Feed does has less users but the aggregation of services gives you a better feel for the personality and likes/dislikes of your friends. After a quick google search to confirm there wasn’t one out there already, I decided to take the afternoon and make one so I can flex my newly acquired jQuery skills.

It’s inspired by the many "put your twitter feed on your blog" posts there are floating around. 

Edit: There is a FF-sponsored widget, wonder why Google didn't find it. I prefer simplicity and not all out gradienty-web2.0-ness anyways

To install: 

1. Download the friendfeed.js script.

2. Include the following call in your document.ready(...) script:
  

 getFeed("your-username",number-of-entries-to-list); 

3. Include this div somewhere in you layout code:
 

<div id="friendfeed_div">
  <h3 class="ff-title">Friend Feed Updates</h3>
   <ul style="list-style-image:none;list-style-type:none"                         id="ff_update_list"></ul>
</div>

See bottom of page to see it running live.

Bearish on Wikia Search

Full of AJAX-y goodness, Wikia tries to reinvent search with a community aspect with Wikia Search. I can’t help but think it’s a good-intentioned bad idea. It’s already bad enough when someone engages in Wiki-vandalism. It sucks but it’s somewhat self-contained. Wikia Search IMHO increases the power of the would-be vandalists. It’s not unconceivable for rival companies to hire outside contractors to bury results from competitors and spotlight their own. Also, the ability to delete search results is not exactly a feature I would enable.

TechCrunch reported that "[Jimmy] Wales is relying on the community that grows up around Wikia Search to ban anyone trying to game the system." That thought works in the altrustic confines of Wikipedia but all bets are off when it comes to SEO. Be it imperfect and captialist, the source of the targeted/spotlighted results from Google Search is clear. The company paid some dinero to get highlighted and you can accordingly align your view of the claims made.

How do the general rules of Wikipedia work in the search space? It’s generally frowned upon to edit your own Wikipedia entry. But on the other hand, in search, you would be the best person to know if a filter the wheat from the chaff.

It doesn’t exactly telegraph confidence when you give users the option to see results from another search engine BEFORE you display your own search results.

Google IO wrapup

Though it was a smaller affair than JavaOne which took place across the street at the Moscone, Google I/O, IMHO matched the enthusiam.

Registration
One of the quirks about registration was that it was beneficial to have not registered or have a name later in the alphabet. You could just walkup and register right there and the V-Z line was right next to two Googler lines so we were able to overflow into one of them and shorten our wait. I felt really bad for the A-C’s, that line almost wrapped around the escalator. After registration, I turned in my ticket for my conference swag, a t-shirt, water bottle, and an optional branded canvas bag to hold the swag.

The food
Breakfast was your usual continental breakfast conference fare: bagels, danishes, fruit, tea, yogurt, coffee, various juices. Thursday had the special surprise of Krispy Kreme donuts. Lunch was served in 3 cafes, each with a different theme: Deli, Grill, and Texicali. There were no ticket takers and you could get seconds. In the middle of the second floor lounge area, there was a "candy store" with all sorts of sweet and sour gummis, chocolate pretzels, and M&Ms, and chips. This stand was flanked by fridges stocked with juices, Life Water, and sodas. Thursday afternoon brought Haagendaas ice cream in freezers throughout Moscone West.

The sessions
GWT and Android, as expected were centerpieces of the conference. Though one Coldfusion enthusiast I met refered to GWT as not making much sense and "Google cramming it down our throats," I can safely say that the push was not a tenth as much as the constant JavaFX pep rally at JavaOne. To his own discredit, this particular fellow is just learning Java so the Swing-isms of GWT were lost on him. I prefer to think it’s just that both platforms are maturing and people are realizing how awesome they are. Many GWT and Android sessions ended up being standing room only.

Among the highlights was GWT Extreme, presented by Ray Cromwell. First he showed a GWT wrapper for jQuery called GWTQuery where he implemented CSS selectors using Annotations. Next he showed how to create a GWT local app for Android using bootstrapped JSNI (Javascript Native Interface) methods that allowed the GWT application to interact with and access properties on the phone. It’s very very beta right now and a blog post is forthcoming. Another demo he did was Chronoscope, a GWT, Javascript, or HTML+CSS widget that can plot very large datasets while still remaining responsible. He showed a graph of all the buy/sells of Google stock for the past six months, I believe, and was able to zoom down to a precision of seconds without any hiccups at all. It was completely awesome. There was a session on using Ruby with Sketchup, it was very empty. As in tumbleweed empty.

Google hosting AJAX libraries on their infrastructure

Maybe about a year or so ago, I remember listening to some podcast where the issue was raised that Google, Microsoft, or somebody should host the different AJAX libraries so that they are properly cached and versioned therefore lessening load time after the first hit. On the eve of Google I/O, Google has answered that call.

You can reference scripts from their absolute path like:

 <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js"></script>



or you can use the Google AJAX API Loader’s

google.load()

method:

 <script src="http://www.google.com/jsapi"></script>
<script>
    // Load jQuery
    google.load("jquery", "1.2.3");
 ...
</script>


The currently supported libraries are jQuery, Prototype, Scriptaculous, Mootools and Dojo. Google hosts these libraries on servers all over the world so not only will the download be optimized, it’ll will probably be physically near the user. Yahoo reportedly uses a similar scheme for their YUI libraries.

For Grails, this is extra nice because Prototype is the only bundled Javascript library. Maybe the javascript tag should get some love to point to the Google CDN in the appropriate cases...Just a thought.

 

Thy List Shall Not Span Pages

<rant>

I get it. It’s a slow news day or you need filler material. So you decide to compile a list. The old standby when you don’t have enough material for a full entry but can come up with a couple beats to substantiate your thought then move on. However, certain websites have decided that lists are an extension of a slideshow, an opportunity to place one item per page, and bombard you with ads. Don’t make me a pawn in your game to artifically inflate your link count.

Lists are meant to be concise and easily scanned. Unless there are more than twenty items, I shouldn’t have to click a link to see the rest.

</rant>

GroovyBlogs Google Gadget

I’ve been playing around with Google Gadgets a bit and reading up on OpenSocial. Plus there’s a lull in Java news of late. The following GroovyBlogs.org gadget is the fruit of a couple hours labor. Because the built-in function doesn’t account for an aggregrator feed with possibly a different author per item, I had to write a parser for GroovyBlogs’s feed. Click the link below to embed in a webpage or here to embed on your iGoogle page.

EDIT: Something about the GroovyBlogs feed seems to no longer parse correctly.

 

Groovy Swingbuilder technical session

Here’s the video from Danno and Andres’ session at JavaOne. This is my first time using my Flip Video camera so just ignore the shakiness that occurs at some moments. I was trying to adjust the tripod. Enjoy!