Schalk: Hello, my name is Chris Schalk.
I'm a Google Developer Advocate.
And I'm here with Yoichiro Tanaka,
the creator of OSDE,
which is an Eclipse plug-in
that allows you to do Open Social Development
entirely within Eclipse.
So let's go ahead and do a demonstration
of how to use the OSDE plug-in inside of Eclipse.
So, first of all, after I've installed the Eclipse plug-in,
I can create a new project.
And you'll notice the project type here
is an Open Social project now.
And so I'll click "Next,"
and I'll just give it a basic name like "OSDE Test."
And I'll give it a title, like say, the same thing,
"OSDE Test," as well as--
I'll just fill in the author e-mail.
You'll also notice that I can specify other features,
such as the Open Social Version,
as well as other just general gadget features.
But I'll just accept the default and click on "Next."
And now on this page, I can create different views
for canvas, profile, preview, home, etc.
So, in this case, I'm gonna create two views--
one for canvas of type HTML, and I'm going to go ahead
and create external JavaScript in a separate file,
as well as generate a little bit of JavaScript file
in the form of an init function.
And I'll do the same thing for the profile view.
So you have type HTML and generate some JavaScript.
And then at this point, I'll click "Finish."
And this will create
our new Open Social Developer environment project.
So I can open this up,
and so you can see I have our gadget.xml,
so that's our gadget spec,
as well as two JavaScript files
that contain the code for each view.
Now, you'll notice the gadget.xml file
is already open,
and we're looking at an editor.
It's like a simplified editor,
so I can just enter in the fields directly here.
Likewise, I can open up
and specify the different options.
And now if I--Also, on the bottom, I can tab through.
So, for example, if I wanted to access the different views
directly through here,
I can edit the views inside here.
Likewise, I can change the locale
or add internationalization for my gadget application,
same thing for user preference.
And then finally, if I want to just edit
the source code directly for my gadget,
I can just click on "Source" and edit this way.
So, in this case, the code that's defined here
is--as a default is actually pretty easy.
It's just a simple div.
I'm gonna actually replace the code
with some of my own code.
And I happen to have some code handy here.
So, first of all, I'll just create, like, my own div,
where I'm going to display my friends,
instead of what's generated here.
And then, likewise, I'm going to go into the canvas.js file.
I'm gonna open that into a Text Editor.
And right now it's just an empty init file--
init function, that is.
So let me switch back over
to my ready-to-go JavaScript code.
And I'll--all I'm doing is I'm loading in two functions--
"load friends" and then "unload friends."
And then I'm actually replacing the init function here.
And what this code does is it simply goes and fetches
a set of friends and displays it into the gadget body itself.
Okay?
So let me just paste that in there.
And now I'll hit "Save."
So now I'm ready to run the application.
But before I run it,
I'll actually have to start up the local--
local server,
the local Apache server.
And so, in this case, as you notice here on the menu bar,
there's a little icon there that looks like the Open Social icon,
and it says, "Launch Apache Shindig Server."
So let's go ahead and click on that.
And that will launch essentially Apache Shindig right here.
And you can see the progress of it in the console.
And then once the server is ready to go,
I'll be able to launch my application.
And I do that by clicking on the gadget,
and I can do a right-click and then, as you notice here,
I've got OSDE and then "run application."
What this actually does
is fires up a separate Jetty Server process
that allows the gadget to be accessed
from the Shindig Server.
Okay?
So I click "run this application."
And likewise, I can change various default--
or various settings.
So like, what's the owner, what's the viewer,
as well as the country and language,
or if I wanted to see it in an external Web browser.
So, for this one, because I already have sample data
in the database--
and that's a feature as well that's provided--
I'll just select the viewer as John Doe
and click "Okay."
And so now I'm running the application entirely locally,
and it's fetching the gadget, and there we go.
I can see the actual friends of John Doe
working directly within the gadget.
So now I have created my gadget.
I can go ahead and test it further.
But at this point, I can say,
"Okay, great, I want to go ahead and create, say, a Java--
an Open Social Java client application."
And so we have this feature here in OSDE
that allows you to create a Java project
for the restful protocol
that will create a sample bit of code.
So I'll just create this rest project.
And at that point, I can just accept the defaults
and hit "Finish."
And that will create a new project,
and I can click "Yes."
That will allow us to jump into the Java perspective.
So here we are.
We actually have a new sample Java client code
that will go against our local server,
which is still running, by the way.
And I can go through and specify--
Instead of, like, CSchalk, I can say,
"Let's go ahead and keep it John.Doe,"
which is part of the sample data.
And at this point, I can run the application,
since it has a main method in here.
So I'll just go ahead, click...
"run as Java application."
And then we'll watch the console.
And as you notice here in the console,
it actually cre-- you went out and fetched
these same friends directly from the server,
but this time it was using the rest protocol.
And that pretty much concludes the demonstration.
The only other thing I wanted to show
is that you have, like, a nice menu option here.
You can also create the sample data.
So this is actually a first step that you'd want to do.
I can show you the public certificate for OAuth.
And I would say that concludes the demonstration of OSDE,
an Eclipse plug-in
that allows you to do Open Social Development
entirely inside of Eclipse.
Thank you.