Thursday, December 24, 2009

GWT with Google Gadget

Hi All,

Yesterday I came across Google Gdget API, I thought to do a little sample with that. It was really nice and ease too. I felt like Google has brought programming and availability of resource to our door-step.

If you wasn to know more about Google Gadget API's please visit their website here
A Little Introduction about Google Gadget API

    You can use your cerated gadget in the places like website, googlesites, blogs etc... Its in XML form so there are no restriction in the tag formation. Please see below a sample Hello word Google Gadget .

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs title="hello world example" />
  <Content type="html">
     <![CDATA[
       Hello, world!
     ]]>
  </Content>
</Module>

That's it , your First gadget is ready.  All you have to do is to enter your HTML and Javascript skills inside

<![CDATA[
       Hello, world!
     ]]>
like this.... Create your Gadget using notepad or gedit or any other text editor. save the file in .xml format. You need to host the xml file public hosting but luckily google has given us that too. Please go to and you can host your xml. click FILE->upload-> (upload your xml file) once done. Click file->publish thats it.

GWT with Google Gadget

This blog always have a post regarding GWT. I decided to integerate GWT with Blogspot but in vain I could not do it(If any one know the way please post it here). So I decided to write a GWT project and integerate with it. Make a sample GWT project and build the project and copy the build data from your build project source and upload it in any hosting site.

Once you are done, create a new google gadget work as seen below

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs title="hello world example" />
  <Content type="html">
     <![CDATA[
      <div>
<iframe src = "your gwt project HTML file" />
</div>
     ]]>
  </Content>
</Module>

Thats it, while publishing your gadget you will get a .xml url(thats it your Gadget url.). Add the gadget url in blogspot. Thast all.

Here in this blog you can see a new section "AdBrite Code Convertor". This is the gwt project I did. If you want to add AdBrite ad code to your blog into your HTML, it would reject for formatting error. Post your adBrite code and it would format the way the blogspot would accept it.

Thats it.....

Please post your comments and opinions regarding my blog and this post. By the way Android exploration is going good and I amy post a nice android tutorial here.

Thanks & Regards,

Venkat

1 comment:

Anonymous said...

nice one