Dec 26

Interviewed on GWT, Gears, Java, and JavaScript

Ajax, Gears, Google, Tech with tags: , 1 Comment »

I had the pleasure of finally meeting Didier Girard. I seem to run across Didier’s work every week or so, but for some reason we haven’t had a chance to meet face to face, until JavaPolis.

Didier sat down with me to talk about GWT, Gears, Java, and JavaScript, and I gave my honest opinions.

You can listen to my ramblings below. Let me know if you have any thoughts on opinions!

Dec 24

Interviewing Brian McCallister on Ning, OpenSocial, and Apache Shindig

Google, Tech with tags: , , , , 1 Comment »

Steve Yegge just talked about X programmers in his latest rant:

But you should take anything a “Java programmer” tells you with a hefty grain of salt, because an “X programmer”, for any value of X, is a weak player. You have to cross-train to be a decent athlete these days. Programmers need to be fluent in multiple languages with fundamentally different “character” before they can make truly informed design decisions.

When I think about the opposite of the weak player, I think of Brian McCallister. He seems to thrive in many languages. He tinkers in Ruby. Builds a platform in Java. And, even plays a little with PHP. And then he is off playing with Scala, Erlang, LISP, Haskell, etc etc etc.

I always enjoy meeting up at a conference, and now that we live in the same hood, I feel like we should get together more. It is fun to run into each other at the Palo Alto farmers market after all :)

Anyway, when I saw that Brian had proposed Apache Shindig as an open source OpenSocial incubator, I knew that I should get together and have a chat with him.

This interview is the result of that conversation:

Dec 20

Gears Future APIs: Desktop Shortcut API

Gears, Google, Tech with tags: 18 Comments »

Google Gears Desktop API

A common task you see people using AIR and Prism for, is just a wrapper around a Web application that you use all the time such as Gmail, or your Web based calendar or what have you. It would be nice to be able to automate the creation of a shortcut in a very simple way. This is where the Shortcut API comes into play.

The current thinking is that there will be other desktop-y features that people may want to tie into, so the shortcut API sits inside a Desktop module.

It looks like this:

var desktop = google.gears.factory.create('beta.desktop');
desktop.createShortcut("Test Application",
                       "An application at http://www.test.com/index.html",
                       "http://www.test.com/index.html",
                       {"16x16": "http://www.test.com/icon16x16.png",
                        "32x32": "http://www.test.com/icon32x32.png",
                        "48x48": "http://www.test.com/icon48x48.png",
                        "128x128": "http://www.test.com/icon128x128.png"});

Maybe you would use this as an install step. Maybe you give people the ability to export files in some way. What would you like to see here? This is still early stage, and we are thinking about features you would like to add. For example, the ability to say “open this Web application without the URL bar and other browser chrome”.

Other Future APIs

Disclaimer: This is early days, and who knows what the final API will look like, and how far it goes. Do you have ideas for cool Gears that make the Web better? Let us know!.

Dec 19

Gears Future APIs: Image Manipulation API

Ajax, Gears, Google, Tech 10 Comments »

I said in my recent post on Gears being about more than offline that I would talk about some fun future APIs.

The Gears project is open source, and is really being held out in the open, which means that you can check it out and contribute. We want Gears to be community open source, as opposed to just using open source as the way code gets out there. There is a big difference. Poke around the Wiki to see more.

Back to the API. The Image Manipulation API provides a way to manipulate images though client-side JavaScript:

This is a module to give Javascript a way to resize, crop and compose images together on the client side. This will allow, for example, images to be resized into a web-friendly format before being uploaded to a photo album. Another use is for composition of images together as an efficient alternative to server-side composition or CSS layering. Yet another use is for basic photo editing – a user can edit a photo with instantly applied changes before uploading it to the server.

The module is fairly simple, and has the following API:

var image = google.gears.factory.create('beta.image', '1.0');
 
void open(blob)
Blob blob(type)
void resize(width, height)
void crop(x, y, width, height)
int width()
int height()
void rotate(degrees)
void flipHorizontal()
void flipVertical()
void drawImage(image, x, y)
void close()

Having this functionality available natively in the browser would be very cool indeed, and could open up the doors for some interesting ideas.

Other Future APIs

Disclaimer: This is early days, and who knows what the final API will look like, and how far it goes. Do you have ideas for cool Gears that make the Web better? Let us know!.

UPDATE: Ray Cromwell of Timepedia thinks that we should be more ambitious. There are some great thoughts in there, and this is the type of feedback that we really look forward too. We haven’t even begun here, so feedback now will hope us having something a lot better when all is said and done..

Dec 18

Ajax Feed Partner Bar

Ajax, Google, JavaScript, Tech with tags: , 5 Comments »

The Google Ajax API team has given us some new magic to sprinkle on our sites. This time we have a PartnerBar, which is “a control designed to enable contextual cross linking and promotion of sites within or across network. You configure the control with an array of Partner objects which include a feed url, partner name, etc. and the PartnerBar takes care of the rest.”

Here is an example:

It is very simple indeed to setup. The bulk of my bar is in the JavaScript:

google.setOnLoadCallback(function() {
var partners = [
        {
          feed: "http://ajaxian.com/index.xml",
          moreTitle: "More Ajaxian news",
          link: "http://ajaxian.com/",
          logo: "logo-aj.png",
          classSuffix: "extra"
        },
        {
          feed: "http://devphone.com/index.xml",
          moreTitle: "More devphone news",
          link: "http://devphone.com/",
          logo: "logo-dp.png",
          classSuffix: "extra"
        },
        {
          feed: "http://google-code-updates.blogspot.com/atom.xml",
          moreTitle: "More Google Code",
          link: "http://code.google.com/",
          logo: "logo-gc.png",
          classSuffix: "extra"
        }
      ];
 
      var options = {
        linkTarget: google.feeds.LINK_TARGET_BLANK,
        numEntries: 3
      }
 
      new PartnerBar("partnerbar", partners, options);
});

There are many options for you to tweak your bar. You can use CSS to entirely change the look, and you can even do really smart things, such as grab the image for the particular section dynamically. You do this by configuring a resolver callback, such as this one that grabs the image from the RSS feed itself:

// tie the option to the resolver: { logoResolver : logoResolverCallback, ... }
 
function logoResolverCallback(partner) {
  var url = "";
  var n = partner.result.xmlDocument.getElementsByTagName("rss")[0];
  if (n) {
    n = n.getElementsByTagName("channel")[0];
    if (n) {
      n = n.getElementsByTagName("image")[0];
      url = n.getElementsByTagName("url")[0].firstChild.nodeValue;
    }
  }
  return url;
}

You can also see this running on Entertainment Weekly’s online presence. It is nice to see that this came out of Mark and his team working with EW.

Dec 17

Google Gears: Upgrading from a 1950’s Chevy in Cuba

Gears, Google, Tech, Web Browsing 2 Comments »

Upgrading the Web with Gears

For obvious reasons, people are often assuming that Google Gears == Offline. To me, this isn’t the case. Gears happens to have three initial APIs (LocalServer, Database, WorkerPool) that can lend themselves to offline work. However, some people are grokking that WorkerPool and even Database are very useful even if your application never goes offline.

Segue: I am really excited to have Brad Neuberg of Dojo, Rojo, and other non-ojo projects fame, working with me at Google. It is a real pleasure to see the group growing, with great new hires such as Joe Gregorio, and others that haven’t made it official yet :)

I was having a chat about Gears with Brad, and he was talking about how he saw it as a way to update the Web in place. He got it.

Let’s use a really corny analogy that breaks down. We get to drive a few makes of cars (browsers) on the (information) highway. When we want new features, we have to wait for a new model to come out, and recently it feels like Cuba. The top selling car is a 1950’s Chevy. As drivers that are passionate about the driving experience, the Gears team is trying give everyone a foundation to replace the engine, even as you drive.

The goal is to give you the foundation. If it happens through other work too (e.g. other manufacturers step up to the plate), we think that is great. We want to make sure that every car on the road has a base platform to keep the highway performing well though, so we are hear to back you all up, and to keep innovation going.

Alex Russell is talking about innovation as he aims to stop us from going into pure standards hell. We are lucky that with HTML 5, we are pushing forward again. The devil is in the details though, and I am waiting to see what cars come out in 2008. If you are left with an old clanger, we are here to help though.

To make this more obvious, I will start posting about some of the exciting APIs that may be coming!

Dec 16

GWT and Flex at JavaPolis

Adobe, Ajax, Google, Tech with tags: , 3 Comments »

JavaPolis is a fantastic conference. Denver is a city that feels like a town, and JavaPolis is a large conference (3200 this year) that manages to feel like a community. It all comes from Stephan and his great team, all volunteers, at the top.

One advantage of speaking at the conference is that you get to talk in a movie theatre. This year, they perfected the experience by having a picture in picture situation that showed speakers and slides together. Like this:

When you go to the same conference year after year, you get to pick up on memes. This year I was a little surprised by some of them.

GWT

I have seen that GWT is successful (way over 2M downloads now for example), but at last years show most of the people talking to me about it were doing so in a “I think I will check that out soon” manner, with a few users.

This year though, people from all over were talking to me about fine details, and about their many projects in production and development. At this point they had gone through a couple of the GWT releases too, and I was often told something like this:

I love the fact that every few months a new GWT comes out with a compiler that makes my applications significantly faster.

The compiler updates from 1.3 to 1.4 and to the bugging 1.5 are quite impressive. Quite a few folks were running on head and I was told “I am so glad that someone just checked in support for Enums at last!”.

I also found it interesting that the majority of people were using GWT-Ext, and that Mattias Bogaert was funding the update to Ext 2.0, which I am excited about (I worked on an Ext 2.0 toy on the plane trip home that I will blog about shortly).

Now, some of the usual suspects were talking about GWT such as Didier Girard, who I got to finally meet. He is such a nice bloke, and told me about a few GWT related libraries that I need to check out. He also interviewed me on video, where I gave an honest account about my Ajaxian feelings. I also met Cyprien Noel, of JSTM4GWT, which is an interesting object replication framework for GWT. I am interested to see how it would work with Gears.

But apart from these season vets, I also talked to companies that have poo-pooed GWT in the past, and are now picking it up, or thinking about doing so.

This all being said, this is a Java conference, so you would expect to see a higher number of “give me Java not JavaScript” folk, but I was still astounded by the numbers. I really think that GWT has reached a tipping point.

Flex my Java guy

One of the morning keynotes was a split session, with the best piece actually being Stephan and Ben showing off their new Flex/AIR-based parlays.com. I got to interview them about it, and will get it up on Ajaxian at some point soon.

It is really well done, and although Stephan bleeds Java, he realised that for what he wanted, Flex was a good choice. He even tried JavaFX but of course, it is too early.

This wrapup of this keynote tells the story on how truly poor the Sun session was. Wow.

Adobe had a booth, a keynote slot, and lots of talks, but there was no better advertising than seeing this application.

Of course, it was a pleasure seeing the usual suspects in Europe, and having a fun time with all.

Au revoir et voyez-vous l’annĂ©e prochaine.
Het goed tot ziens en ziet volgend jaar u.

Dec 04

Launched Google Open Source Mac Site With New Code

Apple, Google, Open Source, Tech with tags: , 2 Comments »

Today, I was able to launch a new section of Google Code that is focused on open source code related to the Mac. Since I am passionate about both open source AND the Mac, it was a really fun little side project to work on.

The core Google Mac team, and other developers at Google, actually have a fair amount of Mac related open source code. From small pieces of helpful code such as the Quartz Composer patches for Leopard, to large projects like MacFUSE to fun tools like iPhoneDisk to a new meta status updater called Statz. This is just the beginning of course, and now there is a home for this code.

One of the pleasures of working at Google is the slew of great people that you get to meet. On this project it was a real pleasure to work with Amit Singh (MacFUSE and much more), Nicholas Jitkoff (Quicksilver), and Dave MacLachlan (Adobe and much more).

Google Mac Developer Playground

Nov 12

Happy Birthday to Android and devphone.com

Android, Google, Java, Mobile, Open Source, Tech, iPhone 3 Comments »

devphone launch

Congratulations to Bob, Cedric, Romain, and the many many engineers that worked on Android.

Today the Android SDK was released, and along with it a raft of video content and documentation.

For all intents and purposes for developers Android == the SDK right now (until killer phones ship in short order). The development experience for Java programmers will be a dream, and I really like the architecture. They have really learned that declarative markup for UI is a Good Thing &tm;.

If you want to get a high level look at what this is about, I would start off by seeing what the phone can do:

Then, if you want to write some code, start by watching Dan build a simple application on Android and then delve deep into the Androidology that shows you the full architecture. Learn what .dex files are. See how cool Intents are. Check out the markup.

devphone.com: phones are decent now

I am really excited to see the bar being pushed by Apple, Google, and other players out there. You know that when the iPhone came out, Nokia had a lot of meetings and engineers got a better budget for doing innovative processes on their phones. With Android pushing the bar too, in a different way, I think that we can safely say that the phone that we hold in a year or two is going to be amazing.

I am quite astounded at how little Emily uses her laptop since she got an iPhone (apart from Scrabulous. She uses her laptop for her scrabble addiction.). You can see the future today by visiting Europe and Asia. Ben and I were so excited about this, that we went looking for a community to rally this excitement, kinda like Ajaxian for mobile. We were surprised that we couldn’t find it. It seems like most developers hang out in the forums and such of the various platforms. Since we are interested in development that transcends one implementation, we decided to start devphone as a place to throw all of the ideas into. It just launched and is very raw, so who knows what will come of it. Check out our welcome, an interview with Joe Hewitt, and subscribe to the feed

Nov 05

Gmail Greasemonkey Macros: Back, and Gmail even has support!

Google, Tech with tags: , No Comments »

Gmail recently got a JavaScript facelift which has subtle new features. For example, calendar attachments, smart top notices when you are disconnected and how the interface is retrying, and more.

However, most Greasemonkey scripts broke. This is bad news for me, as without Mihai’s macros script I feel real pain as I try to vi my way around the interface.

The new Gmail interface did add more keyboard shortcuts such as:

  • shift + i: Mark as read
  • shift + u: Mark as unread
  • shift + 3: Move to trash (not actually new, but not many people seem to know this one)
  • shift + 8 and a, n, r, u, s, t: Select all, none, read, unread, starred, unread

But, this isn’t quite enough. Luckily, Mihai has stepped up and ported over his work.

He has ported over:

  • g: Go to label
  • l: Apply label
  • b: Remove label
  • e: Archive (regardless of view, unlike “y”)
  • d: Discard (mark as read and archive)

and added:

  • f: “Focus” the current view (only show unread, starred or inbox messages)

What is really cool is how Dan Pupius and the team have truly acknowledge the Greasemonkey folk and have given us hooks to help us monkey around with Gmail:

For those of you adventurous enough to look at the script source, you’ll notice that it uses a gmonkey object that is present on the window, which in turn gets you a gmail object with methods like getNavPaneElement() and getActiveViewType(). What this means is that the version of Gmail, in addition to being faster, also has semi-official support for Greasemonkey scripts. I’m pretty sure official docs for this API will be out soon, but in the meantime, feel free to look at the script and use a tool like Firebug to investigate the properties of the gmonkey and gmail objects and play around.

Thanks Mihai and Dan!