Google

Google Code University

Tagged:  

If you're interested in learning more about Ajax development, distributed systems, web security, or C++/Java/Python and you haven't checked out Google Code University, you're missing out on a valuable educational resource on these topics and more.

Here's a sample video from the site:
Web 2.0 - AJAX - Creating a Rich User Experience

    Description: Incorporated AJAX is enabling the creation of applications with better functionality, usability, and an overall better user experience. This panel will discuss how desktop-like applications can be delivered via the browser with Ajax, the efficiency of developing such applications, and the importance of the GUI. They will also share their thoughts on highly successful applications and the shortcomings of using Ajax.

Also on the site, you'll find a series of Web Programming lecture slides provided by the University of Washington.



For these and other great resources, visit the Google Code University

YouTube Data API Changes and Player API

If you haven't heard the big news yet, the YouTube Data API has been updated and the YouTube Player APIs have been released. The APIs look very interesting with some much wanted features.

The below is the big news from the YouTube Blog.

Here's the sound byte: We now support upload, other write operations, and internationalized standard feeds. (And there was much rejoicing!) We're also introducing player APIs and a chromeless player -- a barebones player SWF that's fully customizable and controllable using the player APIs.

The Data API now allows for reading (nothing new), writing and uploading of data (the latter two are the big news). The API allows for you to do many things that can be done in YouTube, such as add comments about a video or upload videos to YouTube. Libraries for the API are available for Java and PHP (sorry Ruby developers at least for now).

You can read more about the Data API here.

The Player APIs now offer a Flash (Actionscript 2.0) API and a JavaScript API to allow more control over the player. The JavaScript API and Flash API are very similar (which makes since as they are both based on ECMA Script). The APIs have some very powerful hooks into the videos. My personal favorite hook is player.getPlayerState() which returns the state of the player. Possible values are unstarted (-1), ended (0), playing (1), paused (2), buffering (3), video cued (5).

You can read about the JavaScript API here and the Flash API here (note that the Flash API is almost exactly the same as the JavaScript API, so you will need to read both references if you are going to use the Flash API).

Perhaps Even bigger news is the release of the chromeless player. Below is an excerpt about the chromeless player from reference.

Getting Started

First off, you need a developer key. To register for one, visit the registration page.

The chromeless player consists of two SWF files. apiplayer.SWF contains the actual video playing functionality. cl.SWF is a loader SWF that loads apiplayer.SWF and exposes the player's API functions. It also provides security sandbox restrictions for the apiplayer.SWF, so loading SWFs cannot access elements inside the player directly.

The player can be controlled via two methods — by loading the SWF into another SWF (or Flash website, etc.), or by embedding it directly in an HTML page and using JavaScript to control the player. The JavaScript controls are identical to the embedded player's JavaScript API.

The URL to load the chromeless player SWF is:

http://gdata.youtube.com/apiplayer?key=DEV_KEY

Functions

The following operations are available in addition to the ones listed in the JavaScript API documentation.

loadVideoById(videoId:String, startSeconds:Number):Void
Load the specified video and starts playing the video. If startSeconds (number can be a float) is specified, the video will start from the closest keyframe to the specified time.
cueVideoById(videoId:String, startSeconds:Number):Void
Loads the specified video's thumbnail and prepares the player to play the video. The player does not request the FLV until playVideo() or seekTo() is called. startSeconds accepts a float/integer and specifies the time that the video should start playing from when playVideo() is called. If you specify startSeconds and then call seekTo(), the startSeconds is forgotten and the player plays from the time specified in the seekTo() call. When the video is cued and ready to play, the player will broadcast a video cued event (5).
setSize(width:Number, height:Number):Void
Sets the size of the chromeless player. This method should be used in favor of setting the width + height of the MovieClip directly. Note that this method does not constrain the proportions of the video player, so you will need to maintain a 4:3 aspect ratio. When embedding the player directly in HTML, the size is updated automatically to the Stage.width and Stage.height values, so there is no need to call setSize() when embedding the chromeless player directly into an HTML page. The default size of the SWF when loaded into another SWF is 320px by 240px.

You can read more about the new features at the YouTube API Blog.

I think that these new feature really make it possible to make some great mash-ups with YouTube. If you create a cool mash-up using some of the new features of the API or use the the Player APIs or use the chromeless player then I would love to hear about it (you can leave it in the comments or you can write a blog post about it using your free Ajaxonomy account.

OpenSocial Videos

Tagged:  

With all the buzz about OpenSocial (especially with MySpace jumping on board) you probably are interested in using the API. Well if you are anything like me you find it easier to learn by watching a video than reading a boring post. Well the OpenSocial API blog has posted a few videos to help you in your development.

AdSense for Video now in Beta

Tagged:  

We've been hearing that it was coming, but Google's AdSense for Video is finally released in beta form. People will now be able to easily advertise on their YouTube videos.

Below is an excerpt regarding the release from the Official Google blog.

Enter, stage left: the AdSense for video beta. This approach takes the same non-intrusive InVideo ad format used on YouTube and extends it across video partner sites on the Google Content Network. This enables advertisers to run a single campaign across the largest network of online video content.

Unique to AdSense for video are text overlay ads contextually targeted to a combination of signals in your videos and on your site. With these overlay ads, the user's experience is not interrupted; users determine how much they want to interact with the ad.

We have two major goals: to make it easier for publishers to monetize video online, and for advertisers to learn how to reach the video community. Towards these ends, today we're also launching a single destination with an overview of various options to expand online video opportunities called Google Video Advertising Solutions. We hope this will be your starting point to understand how to leverage the Google Content Network and YouTube to make the most out of the online video experience. You can also see our overview videos for advertisers and publishers -- because isn’t video the best way to experience video?

We've been working with a number of video partners (e.g. popular destinations like BobVila.com, eHow, MyDamnChannel, ExpertVillage, PinkBike, TheNewsRoom, and social video aggregators like Revver, blip.tv, and GodTube). And we're also working with several key video platform solution solutions like Brightcove, Yume, Tremor Media, and Eyespot Network, who have plugged our ads into their platforms.

There are some criteria that publishers have to meet to participate in AdSense for video, which you can learn about on the Inside AdSense blog.

You can read the full post here.

The thing that sounds very interesting is how the ads will be placed in the video. This will be very interesting to see in action. It am looking forward to seeing how this catches on and if popular videos start making decent money.

From Google's stand point it is a great way to increase their ad revenue as they already have a strong hold on sites like this blog (look at the ads on the right hand side of this page). It is possible that with Google's purchase of FeedBurner that they could rule that ad space in Web Sites/Blogs, RSS Feeds and On-line Videos.

Google's Oregon Data Center Blueprints

Tagged:  

Today I ran across an interesting article from Harper's Magazine regarding the blue prints of the Google data center at The Dalles, Oregon. The article mainly focuses the amount of energy that the data center uses and the methods of getting the energy.

You can see the blue prints of the data center here.

You can read the article here.

It is interesting to see how one of the Google data centers is laid out. The next time you search on Google (and you know that almost everybody uses the Google search engine) perhaps your search will go through Google's data center at The Dalles, Oregon.

Accessing JSON Web Services with the Google Web Toolkit

Over at GWT Site they have written a good post about using the Google Web Toolkit with JSON Web Services. Since JSON is fast becoming a standard for web services that are cross domain and GWT is a heavily used development tool this is a useful post.

below is an excerpt from the post.

The main difficulty when trying to talk to some web service on another server is getting past your web browser’s Same-Origin Policy. This basically says that you may only make calls to the same domain as the page you are on. This is good for security reasons, but inconvenient for you as a developer as it eliminates the use of GWT’s HTTP library functions to achieve what we want to do. One way to get around this is to call a web service through a javascript <script> tag which bypasses this problem. In his book, Google Web Toolkit Applications, Ryan Dewsbury actually explains this technique in more detail and provides a class called JSONRequest which handles all the hard work for us. JSON is one of the more popular data formats, so most web services support it. Lets leverage Ryan’s code and take a quick look at how it works.

public class JSONRequest {
  public static void get(String url, JSONRequestHandler handler) {
    String callbackName = "JSONCallback"+handler.hashCode();
    get( url+callbackName, callbackName, handler );
  }	
  public static void get(String url, String callbackName, JSONRequestHandler handler ) {
    createCallbackFunction( handler, callbackName );
    addScript(url);
  }
  public static native void addScript(String url) /*-{
    var scr = document.createElement("script");
    scr.setAttribute("language", "JavaScript");
    scr.setAttribute("src", url);
    document.getElementsByTagName("body")[0].appendChild(scr);
  }-*/;
  private native static void createCallbackFunction( JSONRequestHandler obj, String callbackName)/*-{
    tmpcallback = function(j) {
      obj.@com.gwtsite.client.util.JSONRequestHandler::onRequestComplete(Lcom/google/gwt/core/client/JavaScriptObject;)(j);
    };
    eval( "window." + callbackName + "=tmpcallback" );
  }-*/;
}

To make our request we call the get method with the web service url, and an implementation of the JSONRequestHandler interface. This interface has one method called onRequestComplete(String json). This is where you’ll handle the JSON formatted data once it comes back from the server. When calling a service from within a script tag, we need to specify the name of a callback function in the request. Most services let you specify the name yourself, so the first get method generates a callback name for you. The createCallback method is a JSNI method that simply calls your JSONRequestHandler implementation when the call returns via the callback name. Note, if you use this class, to make sure and change the package name for the JSONRequestHandler call to the correct location. Finally, the get method will call the addScript function which is responsible for embedding the <script> tag on your page and setting its src attribute to the web service url.

You can read the full post here.

Since I am a fan of both JSON and GWT I enjoy seeing good posts about using these two technologies. I recommend this post for any Java developer that wants to make Ajax applications using Web Services.

Building User Interfaces Using Google Web Toolkit (GWT) : Video

Tagged:  

Today I found an interesting video about building user interfaces using the Google Web Toolkit (GWT). This was taken from a presentation at the IndicThreads.com Conference on Java Technology held in Pune, India (I found the video over at IndicThreads.com).

Below is an excerpt from the post:

Chris Schalk's session on 'Building User interfaces using GWT' presented at the IndicThreads.com Conference On Java Technology 2007 held in Oct 2007 in Pune, India.

This session serves as an up to date review of the latest technologies and methodologies for "Building User interfaces using GWT". Specifically covered is - What is Google Web Toolkit (GWT), the potential of Ajax, what GWT brings to Ajax, what GWT focuses on, the Ajax Architectural Shift, building Ajax apps with Java(TM) technology and important GWT applets.

The GWT Mission is to radically improve the web experience for users. This is achieved by allowing developers to use existing Java tools to build no-compromise Ajax for modern browser users.

Speaker- Chris Schalk is a Developer Advocate for Google and helps promote Google Ajax technologies around the world. He is also one of the original members of the OpenAjax Alliance. Prior to Google, Schalk was a Principal Product Manager and Java Evangelist for Oracle's application server and development tools division. While at Oracle, he worked to define the overall Web development experience for Oracle JDeveloper and ADF Faces (Trinidad). He is also the co-author of JavaServer Faces: The Complete Reference published through McGraw-Hill Osborne

To read the full post click here and you can watch the video below.


It is always nice to see more information on the GWT as it is a great tool for Java developers that would like to make Ajax applications.

Tatami integrates the Google Web Toolkit and the DOJO framework

The Tatami project is an attempt to integrate the Google Web Toolkit (GWT) and the DOJO JavaScript framework. Tatami pulls in DOJO's rich widgets and utilities (like fisheye, slider, drag and drop functionality) and makes them accessible to the GWT as widgets and helpers. Tatami is compatible with the GWT 1.4 final version.

Check out the demo (may run slowly because files are being served from SVN)

Last month's release of Tatami-1.1 contained some new features, they are:

* DOJO 1.0 wrapped

* DropdownDatePicker and DropdownTimePicker with validation.

* Slider with labels an rule mark.

* The GFX package of DOJO wrapped. (Circle, Rectangle, Path, scaling...)

Visit the Tatami project homepage.

iGoogle Themes API is Now Available

Tagged:  

You've all used (or heard of) the iGoogle portal and probably have seen its many cool themes. Google has now opened up a Themes API to allow designers to build their own themes.

3 Steps to Building a Theme
1) designing images for the header and footer
2) entering metadata and color information in an XML file
3) and submitting the theme.

To find out more about the API, start with the developer guide.

Also check out these example themes, which, along with themes you submit, will be available in the new themes directory for the millions of iGoogle users:

Earth-light by Yves Behar, founder of the San Francisco design studio fuseproject:

Adventures in Lollipopland by Mark Frauenfelder, writer, illustrator, co-founder of Boing Boing, and editor-in-chief of Make Magazine:

Supermoto Mayhem by Troy Lee, designer and founder of Troy Lee Designs:

Simplicity is Complex by John Maeda, graphic designer, artist, Associate Director of Research at the MIT Media Laboratory, and recently named as the next President of the Rhode Island School of Design (RISD):

Visit the Themes API Homepage

Top 5 GWT Libraries

Tagged:  

GWTSite held a contest asking users to vote for their favorite GWT third-party library, and as a result have compiled their own list of the top five most popular GWT third-party libraries.

Here they are:

5. Hibernate4gwt
Bruno Marchesson
For any Hibernate users out there, Hibernate4gwt allows you to painlessly use your Hibernate POJOs with GWT.

4. Gwittir
Robert Cooper and Charlie Collins
The Gwittir project provides a lot of interesting modules for your GWT projects including data-binding, animation, introspection, and more.

3. GWT-SL
George Georgovassilis
As the name implies, the GWT Server Library is it is a server-side library for GWT that focuses on providing Spring Framework integration by allowing you to expose your Spring beans as RPC services. It also provides integration with the hibernate4gwt library.

2. GWT-Ext
Sanjiv Jivan
GWT-Ext is a really nice looking GWT widget library that is closely integrated with the Ext JS library. Take a look at the GWT-Ext Showcase Demo.

1. MyGWT
Darrell Meyer
mygwt
MyGWT was the overwhelming favorite in the contest with almost half the vote. It is a pure GWT widget library which shares the Ext JS L&F to create a polished set of widgets for use in your GWT applications. Take a look at the MyGWT Explorer Demo.

Honorable mentions: gwt-dnd, gwt-log, gwt-maven, gwtwindowmanager, gwt-math

Click here to read the original post on GWT Site.

Let us know which GWT library you prefer.

Syndicate content