Activate your free membership today | Log-in

Tuesday, July 1st, 2008

SEO and RIA get closer together with Flash indexing news

Category: Adobe, Google

Google and Adobe have been working on improving the indexing of Flash applications. In the past we could simply look at the SWF files and try to grab strings out of them, but there was zero context.

To go further Google uses the SWF Searchable work from Adobe to be more of a ‘human’ actor on the application.

This is what it doesn’t do:

  1. Googlebot does not execute some types of JavaScript. So if your web page loads a Flash file via JavaScript, Google may not be aware of that Flash file, in which case it will not be indexed.
  2. We currently do not attach content from external resources that are loaded by your Flash files. If your Flash file loads an HTML file, an XML file, another SWF file, etc., Google will separately index that resource, but it will not yet be considered to be part of the content in your Flash file.
  3. While we are able to index Flash in almost all of the languages found on the web, currently there are difficulties with Flash content written in bidirectional languages. Until this is fixed, we will be unable to index Hebrew language or Arabic language content from Flash files.

This is good news for all rich applications. One of the common worries when it comes to richer application development is “what do search engines see” and we sometimes see people go back to the simpler world just to make that happier. With the search engines stepping up themselves, we can go back to writing applications that make sense for our human users, and hope that the computers catch up. Of course, we always have to do so in a practical way.

Posted by Dion Almaer at 2:05 pm
7 Comments

++---
2.8 rating from 20 votes

Thursday, June 12th, 2008

Gears 0.3 Released, and Google I/O videos on Ajax related content available

Category: Ajax, GWT, Gears, Google, JavaScript, Presentation

Some good stuff came out from my employer. First, we have the Gears 0.3 release which includes support for Firefox 3! I have been using it for awhile, and it has been great. The team wanted to get it out before the Firefox 3 launch (planned for June 17th). A plugin like Gears can get deep into browser internals, so it is a challenge to keep up to date as APIs change in beta releases, so it is great to be out there now and I we will take a close look at the final release!

As well as Firefox 3 support, Gears 0.3 includes:

Then, all of the videos from Google I/O sessions have been published.

I put together a playlist that includes Ajax and Gears related content:

Check out the great talks such as:

Gears

GWT

General Ajax

Wow, a lot of material there!

Posted by Dion Almaer at 3:53 pm
6 Comments

++++-
4 rating from 11 votes

Tuesday, May 27th, 2008

Announcing AJAX Libraries API: Speed up your Ajax apps with Google’s infrastructure

Category: Ajax, Google, JavaScript, Library

AJAX Libraries API

I just got to announce the Google AJAX Libraries API which exists to make Ajax applications that use popular frameworks such as Prototype, Script.aculo.us, jQuery, Dojo, and MooTools faster and easier for developers.

Whenever I wrote an application that uses one of these frameworks, I would picture a user accessing my application, having 33 copies of prototype.js, and yet downloading yet another one from my site. It would make me squirm. What a waste!

At the same time, I was reading research from Steve Souders and others in the performance space that showed just how badly we are doing at providing these libraries. As developers we should setup the caching correctly so we only send that file down when absolutely necessary. We should also gzip the files to browsers that accept them. Oh, and we should probably use a minified version to get that little bit more out of the system. We should also follow the practice of versioning the files nicely. Instead, we find a lot of jquery.js files with no version, that often have little tweaks added to the end of the fils, and caching is not setup well at all so the file keeps getting sent down for no reason.

When I joined Google I realised that we could help out here. What if we hosted these files? Everyone would see some instant benefits:

  • Caching can be done correctly, and once, by us... and developers have to do nothing
  • Gzip works
  • We can serve minified versions
  • The files are hosted by Google which has a distributed CDN at various points around the world, so the files are "close" to the user
  • The servers are fast
  • By using the same URLs, if a critical mass of applications use the Google infrastructure, when someone comes to your application the file may already be loaded!
  • A subtle performance (and security) issue revolves around the headers that you send up and down. Since you are using a special domain (NOTE: not google.com!), no cookies or other verbose headers will be sent up, saving precious bytes.

This is why we have released the AJAX Libraries API. We sat down with a few of the popular open source frameworks and they were all excited about the idea, so we got to work with them, and now you have access to their great work from our servers.

Details of what we are launching

You can access the libraries in two ways, and either way we take the pain out of hosting the libraries, correctly setting cache headers, staying up to date with the most recent bug fixes, etc.

The first way to access the scripts is simply be using a standard <script src=".."> tag that points to the correct place.

For example, to load Prototype version 1.6.0.2 you would place the following in your HTML:

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

The second way to access the scripts is via the Google AJAX API Loader's google.load() method.

Here is an example using that technique to load and use jQuery for a simple search mashup:

HTML:
  1.  
  2. <script src="http://www.google.com/jsapi"></script>
  3.   // Load jQuery
  4.   google.load("jquery", "1");
  5.  
  6.   // on page load complete, fire off a jQuery json-p query
  7.   // against Google web search
  8.   google.setOnLoadCallback(function() {
  9.     $.getJSON("http://ajax.googleapis.com/ajax/services/search/web?q=google&;v=1.0&;callback=?",
  10.  
  11.       // on search completion, process the results
  12.       function (data) {
  13.         if (data.responseDate.results &&
  14.             data.responseDate.results.length>0) {
  15.           renderResults(data.responseDate.results);
  16.         }
  17.       });
  18.     });
  19. </script>
  20.  

You will notice that the version used was just "1". This is a smart versioning feature that allows your application to specify a desired version with as much precision as it needs. By dropping version fields, you end up wild carding a field. For instance, consider a set of versions: 1.9.1, 1.8.4, 1.8.2.

Specifying a version of "1.8.2" will select the obvious version. This is because a fully specified version was used. Specifying a version of "1.8" would select version 1.8.4 since this is the highest versioned release in the 1.8 branch. For much the same reason, a request for "1" will end up loading version 1.9.1.

Note, these versioning semantics work the same way when using google.load and when using direct script urls.

By default, the JavaScript that gets sent back by the loader will be minified, if there is a version supported. Thus, for the example above we would return the minified version of jQuery. If you specifically want the raw JavaScript itself, you can add the "uncompressed" parameter like so:

JAVASCRIPT:
  1.  
  2. google.load("jquery", "1.2", {uncompressed:true});
  3.  

Today we are starting with the current versions of the library, but moving forward we will be archiving all versions from now onwards so you can be sure they are available.

For a full listing of the currently supported libraries, see the documentation.

Here I am, talking about what we are doing in two short slides:

The Future

This is just the beginning. We obviously want to add more libraries as you find them useful. Also, if you squint a little you can see how this can extend even further.

If we see good usage, we can work with browser vendors to automatically ship these libraries. Then, if they see the URLs that we use, they could auto load the libraries, even special JIT'd ones, from their local system. Thus, no network hit at all! Also, the browser could have the IP addresses for this service available, so they don't have the hit of a DNS lookup. Longer lived special browser caches for JavaScript libraries could also use these URLs.

The bottom line, and what I am really excited about, is what this could all mean for Web developers if this happens. We could be removed of the constant burden of having to re-download our standard libraries all the time. What other platform makes you do this?! Imagine if you had to download the JRE everytime you ran a Java app! If we can remove this burden, we can spend more time flushing out functionality that we need, and less time worrying about the actual download bits. I am all for lean, but there is more to life.

Acknowledgements

I want to acknowledge the other work that has been done here. Some libraries such as jQuery and Dean Edwards Base were already kind of doing this by hot linking to their Google Code project hosting repository. We thought this was great, but we wanted to make it more official, and open it up to libraries that don't use our project hosting facilities.

Also, AOL does a great job of hosting Dojo already. We recommend using them for your Dojo needs, but are proud to also offer the library. Choice is good. Finally, Yahoo! placed the YUI files on their own CDN for all to use.

Posted by Dion Almaer at 9:42 am
72 Comments

++++-
4.8 rating from 161 votes

Thursday, May 15th, 2008

Doctype: You want tests with your copy?

Category: Google, JavaScript

Doctype is an exciting beast, and for many reasons. Having a place to collect this data is key, and as I said yesterday, I can't wait to see it grow as an open resource.

The other cool part of Doctype is that there are tests to backup claims. This seems like a "no brainer" as some of my 'sherman' friends would put it, as it is the corner stone of science.

The tests are shown through the corpus itself, but you can also go directly to the tests as they live in the Google Code project.

Take a peak at say the document tests and you will start to see how much work Mark has put into this, to give us a solid base to go on from.

You will also see that the tests use a goog.* set of JavaScript libraries that are interesting in their own right.

Simon Willison has already found some interesting things such as:

The Goog library includes code to detect the user’s installed version of iPhoto, based on reverse engineering the Mac.com Gallery RSS feeds.

There is a lot of great code in there, so do some archeology if you have a spare cycle or two. And, let us know what you find!

Posted by Dion Almaer at 5:47 am
1 Comment

++++-
4.1 rating from 15 votes

Wednesday, May 14th, 2008

Google Doctype: Documenting the Open Web

Category: Google

Mark Pilgrim has released Google Doctype, an open encyclopedia and reference library. Written by web developers, for web developers. It includes articles on web security, JavaScript DOM manipulation, CSS tips and tricks, and more.

The reference section includes a growing library of test cases for checking cross-browser and cross-platform compatibility.

This is just the beginning for the ambitious project, which is open source, and open licensed (Creative Commons). Now it is out there we, the developers, have the option to add valuable data to grow the corpus.

Congrats to Mark on the launch. I know that it has been a huge amount of work for him, and I am excited to see it out there. Below is Mark talking about the project:

You may also notice the document reader application, which is driven by GWT.

Posted by Dion Almaer at 12:20 pm
6 Comments

+++--
3.1 rating from 20 votes

Tuesday, May 6th, 2008

Ajax Pioneer Week: Bruce Johnson of GWT

Category: GWT, Google, Interview, Podcasts

Today we have Bruce Johnson of the GWT team talking to us about GWT 1.5. He discusses the new features, such as the long awaited Java 5 language support, performance improvements, and much more.

It is very nice to take an application, run it through the new GWT 1.5 compiler, and get an instantly faster running application "for free".

Previously on Ajax Pioneer Week...

Posted by Dion Almaer at 9:27 am
3 Comments

++++-
4.4 rating from 27 votes

Tuesday, April 22nd, 2008

Google offers Search, Feed, and Translation APIs to Non Ajax Usage

Category: Google, JSON, JavaScript, Library

The Google Ajax API team has been offering great services that you can use from JavaScript in the browser. I have talked about some of them on Ajaxian before (Feed API, Feed Discovery API, and the recent Language API) but now we have a great new release that enables you to access these APIs from Flash or the server side.

In fact, as long as your program can speak HTTP, you can have access to the services.

For example, you could now call this an REST API to Google Search.

To see it in action, point to something like http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=Ajaxian and you will see the JSON output that is documented.

There are terms of use that you should abide by, and some other comments:

An area to pay special attention to relates to correctly identifying
yourself in your requests. Applications MUST always include a valid and accurate http referer header in their requests. In addition, we ask, but do not require, that each request contains a valid API Key. By providing a key, your application provides us with a secondary identification mechanism that is useful should we need to contact you in order to correct any problems.

Check out the updated documentation for more details on each API:

Including code snippets. For example, here is how you would access the search results in ActionScript:

JAVASCRIPT:
  1.  
  2. var service:HTTPService = new HTTPService();
  3. service.url = 'http://ajax.googleapis.com/ajax/services/search/web';
  4. service.request.v = '1.0';
  5. service.request.q = 'Paris Hilton';
  6. service.resultFormat = 'text';
  7. service.addEventListener(ResultEvent.RESULT, onServerResponse);
  8. service.send();
  9.  
  10. private function onServerResponse(event:ResultEvent):void {
  11.   try {
  12.     var json:Object = JSON.decode(event.result as String);
  13.     // now have some fun with the results...
  14.   } catch(ignored:Error) {
  15.   }
  16. }
  17.  

If you are interested in this kind of thing, as well as Gears, OpenSocial, AppEngine, or Android, check out the Google Developer Days coming to cities around the world or our big Google I/O event on May 28-29 in San Francisco.

Posted by Dion Almaer at 9:07 am
2 Comments

++++-
4.7 rating from 16 votes

Monday, April 14th, 2008

Appcelerator on App Engine

Category: Google, JavaScript, Showcase

I had a funny feeling that we would see frameworks and tools starting to support Google App Engine. Appcelerator has added support into their SDK, so you can now create an App Engine project.

They just ported Tejus’s appTunes demo to the App Engine and deployed it at http://apptunes.appspot.com.

The example uses embedded Flex components and sound.

If you take a look at the source, you will see the declarative markup that Appcelerator goes for:

HTML:
  1.  
  2. <body style="visibility:hidden" on="l:app.compiled then visible">
  3.     <div id="header">
  4.         <div class="logo" on="click then script[window.location.href='http://www.appcelerant.com/?p=54']"><h1 style="display: none">App Tunes</h1></div>
  5.         <div class="powered_by" on="click then script[window.location.href='http://www.appcelerator.org/']"><h4 style="display: none">Powered By Appcelerator</h4></div>
  6.     </div>
  7.     <div id="body" style="visibility: hidden" on="l:app.compiled then visible">
  8.  
  9.         <app :as_flexflow id="flow" on="r:get.albums.response then execute or r:select.album.response then select"
  10.                 property="covers" img_height="400" img_width="400" label_position="bottom" click_message="r:select.album.request">
  11.         </app>
  12.    
  13.         <app :graphical_music_player id="player" property="tracks" now_playing_message="l:now_playing"
  14.                 on="r:select.album.response then set_playlist and play or r:init.playlist.response then set_playlist">
  15.         </app>
  16.     </div>
  17.     <app :message name="r:init.playlist.request"></app>
  18.     <app :message name="r:get.albums.request"></app>
  19. </body>
  20.  

I expect to see other integration points for libaries, especially those that have server side back ends.

appTunes

Posted by Dion Almaer at 7:19 am
Comment here

++++-
4.1 rating from 23 votes

Tuesday, April 8th, 2008

What does Google App Engine mean for Ajax developers?

Category: Cloud, Google

I have been really looking forward to seeing the Google App Engine launch, and get in the hands of developers. This is just a preview release, and I obviously would like to see more languages and frameworks above and beyond Python and what we have now. The non-Pythonistas will all be saying "what about [insert my language and framework]". Slowly, slowly, catchy, monkey.

What is the Google App Engine?

Google App Engine lets you run your web applications on Google's infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it's ready to serve your users.

You can serve your app using a free domain name on the appspot.com domain, or use Google Apps to serve it from your own domain. You can share your application with the world, or limit access to members of your organization.

App Engine costs nothing to get started. Sign up for a free account, and you can develop and publish your application for the world to see, at no charge and with no obligation. A free account can use up to 500MB of persistent storage and enough CPU and bandwidth for about 5 million page views a month.

During the preview release of Google App Engine, only free accounts are available. In the near future, you will be able to purchase additional computing resources.

You have to understand the limitations, and the model that is being used. In my mind this is very different than other solutions like EC2/S3. There are very different use cases at work choosing between a low level (and hence very flexible!) provisioning system like EC2, and a deployment solution that gives you a sandbox to deploy applications. Google App Engine is a full stack.

The stack gives you access to Bigtable, which also means that you are not in the world of booting up MySQL. You do things "the Google way" and some people will like it, and some will not. That is fine!

What excites me about this, is that I often have a bunch of little applications that need a host. Sometimes it can be a pain to setup. Other times you would like to make the service public but don't want people to go hog wild and give you bandwidth costs and contention for your other apps on your host. Now I have a simple place to put these little apps, and this is where Ajax comes in.

As we develop richer applications with more client side logic, and natural service separations, we can create these modules as Google App Engine apps that do one thing well. There will be a natural fit for applications built with GWT, Flex, and other rich component toolkits.

Google App Engine doesn't give you something that you couldn't do in an Ajax application, but it does give you a place to throw up these services in short order. This is one step on the way to the world of DEPLOY. There are other services with different tradeoffs, such as Heroku.

I would love to see JavaScript on the server as an option, but that is back to language wars....

Posted by Dion Almaer at 8:55 am
7 Comments

++++-
4 rating from 21 votes

Friday, March 21st, 2008

Google AJAX Translation API

Category: Google, JavaScript, Library

Translation API

The game above uses the new Google AJAX Translation API that allows you to do two things via a simple JavaScript API.

Translation

If you want to take a word in one language, and translate it to another, you simply call something like this:

JAVASCRIPT:
  1.  
  2. google.language.translate('Gato', 'es', 'en', function(result) {
  3.   alert(result.translation);
  4. });
  5.  

Here are the languages we support.

What if you need to programatically grok which language a string is written in? You can use the detection algorythm:

JAVASCRIPT:
  1.  
  2. google.language.detect('Questa linea di rilevare che questa è la lingua.',
  3.  function(result) {
  4.   alert(result.language);
  5. });
  6.  

The detector doesn't just tell you the result, it also lets you know how reliable and confident it is.

Posted by Dion Almaer at 1:15 pm
15 Comments

++++-
4.3 rating from 29 votes

Wednesday, March 19th, 2008

Google Visualization joins the Ajax APIs

Category: .NET, Google, JavaScript

Yoah Bar-David & Itai Raz of Google have introduces the latest Ajax API: Google Visualization API, a new API designed for visualizing structured data.

There is a large visualization gallery that can show you some of the visualizations that you can use.

You tie into the API as you do with other Google Ajax APIs:

JAVASCRIPT:
  1.  
  2. google.<