google wave pune_gtug

Download Google wave pune_gtug

Post on 06-May-2015




0 download

Embed Size (px)


  • 1.Programming on Google Wave By Rohit Ghatol FromPune Google Technology User Group

2. What is Pune-GTUG? GTUG stands for Google Technology User Group 3. Google Wave 4. Topics

    • What is Wave?
    • Anatomy of a Wave
    • What can be done on GoogleWave?
    • Extending Google Wave
    • Writing Gadgets
    • Writing Robots 5. What is Wave?

  • A wave is equal parts conversation and document.
    • People can communicate and work together with richly formatted text, photos, videos, maps, and more.
  • A wave is shared.
    • Any participant can reply anywhere in the message, edit the content and add participants at any point in the process. Then playback lets anyone rewind the wave to see who said what and when.
  • A wave is live.
    • With live transmission as you type, participants on a wave can have faster conversations, see edits and interact with extensions in real-time.

6. What is Wave? Lets see Wave in action! 7. Topics

    • What is Wave?
    • Anatomy of a Wave
    • What can be done on GoogleWave?
    • Extending Google Wave
    • Writing Gadgets
    • Writing Robots 8. Anatomy of a Wave

  • Wave
  • A wave is a threaded conversation, consisting of one or more participants (which may include both human participants and robots ). The wave is a dynamic entity which contains state and stores historical information. A wave is a living thing, with participants communicating and modifying the wave in real time. A wave serves as a container for one or more wavelets defined below. 9. Anatomy of a Wave

  • Wavelet
  • A wavelet is a threaded conversation that is spawned from a wave (including the initial conversation). Wavelets serve as the container for one or more messages, known as blips . The wavelet is the basic unit of access control for data in the wave. All participants on a wavelet have full read/write access to all of the content within the wavelet. 10. Anatomy of a Wave

  • Blip
  • A blip is the basic unit of conversation and consists of a single messages which appears on a wavelet. Blips may either be drafts or published (by clicking "Done" within the Wave client). Blips manage their content through their document , defined below. Blips may also contain other blips as children, forming a blip hierarchy. Each wavelet always consists of at least one root blip. 11. Anatomy of a Wave

  • Document
  • A document is the content attached to a blip. This document consists of XML which can be retrieved, modified or added by the API. Generally, you manage the document through convenience methods rather than through direct manipulation of the XML data structure. 12. Topics

    • What is Wave?
    • Anatomy of a Wave
    • What can be done on GoogleWave?
    • Extending Google Wave
    • Writing Gadgets
    • Writing Robots 13. What can be done on Google Wave?

  • Real time Chat
  • Editing as a Document
  • Real time collaboration
  • Robots participating 14. Topics

    • What is Wave?
    • Anatomy of a Wave
    • What can be done on GoogleWave ?
    • Extending Google Wave
    • Writing Gadgets
    • Writing Robots 15. Extending Google Wave?

  • Gadgets
    • Runs on the client.
    • Multiple instances per wave.
    • Not able to modify the wave, and has limited visibility into the wave. Is only able to detect changes in the wave's participants.
    • Not only can't modify a robot, has no way to know that the robot exists.
  • Robots
    • Runs in the cloud.
    • One instance of a given robot per wave. Remember that a robot is like a participant on a wave, so each participant/robot is a unique instance, but a wave can have many participants/robots.
    • Able to modify a wave and perform the same operations as a human participant.
    • Can modify a gadget. 16. Topics

    • What is Wave?
    • Anatomy of a Wave
    • What can be done on GoogleWave?
    • Extending Google Wave
    • Writing Gadgets
    • Writing Robots 17. Writing Gadgets

  • Polling Gadget
    • Allows the host to set the title
    • All the participants can add Options
    • Everyone can vote on the Options

18. 19. Writing Gadgets function renderPoll(){ . } Events Event Callback State Event Participant Event Polling Gadget 20. Writing Gadgets Central State Update State Notify via callbacks Polling Gadget Polling Gadget Polling Gadget Polling Gadget 21. Interacting with waveparticipants and state 22. Writing Robots

  • Steps
    • Get Google App Engine Account
    • Get Google App Engine Eclipse plugin
    • Get Web Application Project

23. Robot Architecture 24. Writing Robots

  • Robot is a Java Web Application deployed on GAE
  • Contains
    • A Servlet
    • capabilities.xml
    • web.xml
    • appengine-web.xml

25. Robot Servlet public class IterationServlet extends AbstractRobotServlet { public void processEvents(RobotMessageBundle context) { TextView textView = context.getWavelet().getRootBlip().getDocument(); //Condition to check if Robot was recently added if(context.wasSelfAdded()){ //Example of adding a Text textView.append("Robot: I have been just added to this wave"); //Example of adding a Form textView.appendElement(new FormElement(ElementType.LABEL, "NAME_LABEL", "What is your name? :")); textView.appendElement(new FormElement(ElementType.INPUT, "NAME_INPUT")); textView.appendElement(new FormElement(ElementType.BUTTON, "SUBMIT_BUTTON", "Submit")); //Example of adding a Gadget Gadget gadget = new Gadget(""); gadget.setField("country", "India"); textView.appendElement(gadget); } } } 26. capabilities.xml 27. Robot API Overview 28. Robots + Gadget

  • Further we will talk about how to use Robots and Gadgets in conjunction with each other
  • Here is a Product Idea

29. Account of 30. Account of 31. Account of 32. Account of 33. Account of 34. Account of 35. Robot wrote the updates from the Gadget to a Google Spreadsheet 36. Robots + GadgetCreate Wave Add Robot Present a Form Submit Form CreateNew Wave Add Participants Add Gadget Add State to Gadget Interacts with Gadget Get Gadget State Store data on Spreadsheet User Action Robot kicks in 37. Questions? ?