The Ajax Experience 2008 Begins


The Ajax Experience 2008 is about to begin here in Boston. Developers from all over the world have gathered to hear about the latest and greatest from the land of client-side development. I'm attending the jQuery Developer Day session this morning where topics will include "Progressively Enhancing the User Experience Using jQuery" and "An In-Depth Look at jQuery UI". Conference presentations are available for download here.

WebKit Browser Passes Acid 3 Test


The WebKit browser project, upon which the Google Chrome and Apple Safari browsers are based, has just announced that their browser has become the first browser to pass all of the Acid 3 tests.

The third revision of the Acid tests, promoted by the Web Standards Project as a way of ensuring browser compatbility with web standards, includes tests of the following standards:

DOM2: Core, Events, HTML, Range, Style, Traversal, Views
Media Queries
Selectors (:lang, :nth-child(), combinators, dynamic changes, …)
CSS2 (@font-face)
CSS2.1 (’inline-block’, ‘pre-wrap’, parsing…)
CSS3 Color (rgba(), hsla(), …), UI (’cursor’)
data: URIs

The Acid 3-passing version of WebKit is available as a download of the nightly build.

Java API for RESTful Web Services Now Final


The Java API for RESTful Web Services, JAX-RS (also known as JSR-311), has been approved by the final ballot of the SE/EE Executive Committee.

JAX-RS allows you to use @GET, @POST, @PUT, @DELETE, and other annotations to describe RESTful style web services in a manner similar to the way that JAX-WS does for SOAP and WSDL-based web services.

The project page for JSR-311 is here. The reference implementation is called the Jersey project, but other implementations exist in the Restlet framework, JBoss RESTeasy project, and Apache CXF project.

Is Google Spreading Itself Too Thin?


Over at Read Write Web they have written a very interesting post about Google. They ask a great question, Is Google Spreading Itself Too Thin? This is a very interesting question as in recent years Google has expanded way beyond search.

Below is an excerpt from the post.

What About Chrome?

Chrome showed Google's brand power in the market. A pretty geeky story (better performance and sandbox security for plug-ins) got tremendous traction in the media and prompted people who had never even made the jump from Explorer to Firefox to look at Chrome.

But it is very hard to see any strategic advantage for Google in splintering the browser market even further. Surely their interest lies in making sure Firefox gains against Explorer? Why not simply continue helping Mozilla?

This looks like an engineering project (yes, a very cool engineering project) that got out to market with a "oh, well, why not, seems a shame to throw it away" rationale.

Has Boredom Become an Issue Inside the Googleplex?

It is almost as if Google is bored. The cash just keeps rolling in. How do they exercise those amazing minds? This is not an uncommon problem. My first job was with a small publishing company in London that had one amazing cash cow and lots of "loss leaders". I naively asked one of the owners why he did this, why not just have the cash cow? He thought for a while and said "well, what would I do every day?"

You can read the full post here.

So, let me know your thoughts, Is Google Spreading Itself Too Thin?

Bluff - JavaScript Graphs

If you want to display data in a graph dynamically in a web page, you have a few options. You can create your own library to create the Graph or use an existing one. If you decide against using the Google Chart API you may want to look into Bluff. Bluff is a JavaScript library that uses canvas (Google’s ExCanvas is used to allow Internet Explorer support) to create a graph on a web page.

Below is an example of a graph and the code that is used to create it.

        <canvas id="example"></canvas>
        <script type="text/javascript">
          var g = new Bluff.Line('example', 400);
          g.title = 'My Graph';
'Apples', [1, 2, 3, 4, 4, 3]);
'Oranges', [4, 8, 7, 9, 8, 9]);
'Watermelon', [2, 3, 1, 5, 6, 8]);
'Peaches', [9, 9, 10, 8, 7, 9]);
          g.labels = {0: '2003', 2: '2004', 4: '2005'};

You can download Bluff here.

You can read more about Bluff here.

Get cross-site JSON via HTTP with GWT and the GWT Designer by Instantiations


The GWT is a great development tool for designing Ajax applications. Since JSON is a great way to exchange data from the server to the client, in many cases, it is good to find a tutorial combining the two. Well, over at the Giant Flying Saucer blog they have put together a nice tutorial about cross-domain JSON and GWT. The tutorial is written for users of the GWT Designer, but even if you don't use that tool this tutorial has some good information.

Below is an excerpt from the tutorial.

If your a web developer then chances are pretty good you've already heard of and possibly used JSON. In a nutshell, JSON is a lightweight way to exchange data. In the second tutorial we did our communications to and from the server via RPC (Remote Procedure Calls). This time we'll modify the code to use JSON instead and call a third-party server (we will simulate this with a Python web server on the same computer).
Assuming you've got everything ready go ahead and open the project now. One of the first things the GWT JSON tutorial shows is how simple the JSON format is:



    "symbol": "BA",
    "price": 87.86,
    "change": -0.41

    "symbol": "KO",
    "price": 62.79,
    "change": 0.49

    "symbol": "JNJ",
    "price": 67.64,
    "change": 0.05

You can see JSON is just name/value pairs and human readable. Its simpler than XML and less verbose (less eyeball noise). Keep in mind though if you do need XML support that GWT offers that as well. Today though we are focusing purely on JSON.
So how do we actually get the JSON from the server to the client? Well, fortunately GWT provides everything we need in the form of the HTTP client classes. There are three items in particular we'll use from there:
1. RequestBuilder and calling the "sendRequest" method

2. RequestCallback which (remember the callback we had in the second tutorial?) will call "onResponseReceived" on a successful callback or "onError" if something goes wrong.
- Note: Toward the end of this tutorial we will replace the RequestBuilder code.

You can read the full tutorial here.

b9j.uri : A JavaScript URI Object

Robert Krimen has created a JavaScript URI Object capable of parsing, manipulating, and generating URIs. It splits up a URI into three objects: the URI, the path, and the query. Changes to the path or query objects are reflected in their respective URI. Armed with a wide array of methods, the b9j.uri object is well equipped to handle even the toughest of URIs.

Here's a overview of b9j.uri.URI from Robert:

  • Parses using Steven Levithan's parseUri 1.2
  • Easy path traversal (ascend to parent, descend to a child)
  • Set or add to the URI query (with proper encoding), get/interrogate the query (with proper decoding)
  • Add arbitrary data (unencoded) to the end of the query string, for extra flexibility
  • Manipulate/interrogate the scheme, user information (username & password), host, port, fragment, and more in a piecewise fashion
  • Add, change or strip the extension (html, js, css, ...) from a given URI

The code is available at (19kb compressed / 5kb gzipped)

My Google Chrome Experience


I've been using Google Chrome for the past few days and have been happily surprised by what I've seen. When you start Chrome you can hear that V8 engine rumbling and pages render extremely quickly. I've loaded many pages on IE7, Firefox 3 and Google Chrome on the same machine and it is incredible how much faster the page renders on Chrome than the other two browsers.

While I really like Firefox, it has some memory management issues that Chrome appears not to have. I've been surfing major sites and haven't had any issues rendering and interacting with pages correctly (while I am assuming that some JavaScript heavy sites may have issues). Like Firefox, Chrome comes with some decent developer tools, out of the box which put IE to shame.

With Chrome being from Google, I can see it having a better chance of competing with IE as Google has the money and resources to try and get more users to start "Chroming". It will be interesting to see what will happen once Chrome is out of beta and how it will compete with IE.

Even though Chrome is still in beta, I've started using it for the majority of my browsing and haven't had any issues (although I'm sure there are many that have found issues). So, if you haven't already, go download Chrome and enjoy a new web browsing experience.

Jumping in Java


Anyone who has ever programmed (hopefully briefly) in some type of assembly language has gone to the bare metal in implementing loops, if statements, and other programming language features. When programming in assembly, these constructs use some form of J* jump instruction together with labels to accomplish the task. In higher-level languages, jump instructions are usually associated with the infamous and properly banned goto statements (which are unrestricted jumps), but restricted jumps are far more common: return statements, the throw keyword (for exceptions), and of course the standard loops, if statements, and the like.

Being mainly a Java programmer, I occasionally miss language features such as continuations and co-routines. I came upon just such a situation recently, and I wondered if it was possible to imitate a continuation in Java without needing to resort to more sophisticated techniques such as Javaflow or RIFE's own continuation library. What I found out was that I could, albeit in a limited way.

Code Snippet: Detect Google Chrome w/JavaScript

With Chrome entering the browser market, you may find a need in the not too distant future to code some exceptions for it. In case that day comes, here's a quick snippet of JavaScript for detecting if your users are Chromed out:

You can detect Chrome using the following:
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;

Chrome's full user agent:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/ Safari/525.13

Syndicate content