JOANNA SMITH: Hey everybody, and welcome to the Google+
Platform Office Hours.
Today it's a special Movember episode.
So why don't we go ahead and introduce our team.
I'm Joanna Smith, and I'm a developer programs engineer
here at Google.
JONATHAN BERI: Jonathan Beri, I'm a developer
advocate for Google+.
GUS CLASS: Gus Class, and I'm a developer
advocate for Google+.
SILVIANO LUCIANI: Silviano Luciani, and I'm a developer
programs engineer for Google+.
JOANNA SMITH: I noticed that before we even started we
already had a question on the YouTube
page which was, Movember?
Jonathan, what do you think you can say about it?
JONATHAN BERI: So Movember is once a year, an annual
fundraiser to raise awareness for men's health issues;
prostate cancer, testicular cancer.
And it starts on November 1.
So guys who grow a mustaches, they shave their face on the
first, and over the course of the month they groom their mo
for people to ask them exactly what that's about.
And of course, there's also mo sisters, who are women who
help support the cause as well.
And I think last year, cumulatively, they've raised
over $300 million for different charities.
JOANNA SMITH: Pretty cool, pretty cool.
SILVIANO LUCIANI: And there's couple of cool contributions
that we can show from Google.
So the first one is a video made from Google Australia.
The movement started in Melbourne, in Australia, 10
years ago, and this one minute video is giving a summary of
what happened in 10 years.
GUS CLASS: All right, let's watch the video.
MALE SPEAKER: For 10 years it's been good
times and great mo's.
MALE SPEAKER: It's mo time.
MALE SPEAKER: Hey there.
MALE SPEAKER: [SPEAKING ITALIAN].
MALE SPEAKER: I lost my grandfather to prostate
cancer, and I'm growing this mo in memory of him.
MALE SPEAKER: I'm a mo mentor.
MALE SPEAKER: Get involved.
MALE SPEAKER: Grow yourself a mo.
MALE SPEAKER: It's Metallica.
GUS CLASS: That's a cool video.
SILVIANO LUCIANI: Pretty cool, huh?
GUS CLASS: Yeah.
SILVIANO LUCIANI: And another cool thing is, if you go to
movembergames.com, you can find four motion sensing games
that will help get your mustache in shape.
Can we show one?
GUS CLASS: Yeah.
So you said motion sensing?
SILVIANO LUCIANI: Motion sensing, yeah.
GUS CLASS: Yeah, yeah.
All right, so it looks like I'm going to have to
authenticate to allow the camera.
So does anyone know what this is using for--
JONATHAN BERI: Yeah, it's actually using an HTML5 API
called getUserMedia.
It's part of a larger spec called WebRTC.
And it essentially allows you to get access to the user's
camera and audio, and do interesting things with it in
JavaScript.
So it's a pretty neat application of that API.
How you doing, Gus?
SILVIANO LUCIANI: I'm doing good.
GUS CLASS: Oh, I got a splendid.
It's really hard to do, and you can't breathe when you do
it, so you have to practice.
You have to strengthen that mo.
SILVIANO LUCIANI: So that was The Lame Mo, and then you have
The Fu Manchu, and next week and the following week there
will be two other games.
GUS CLASS: Awesome.
SILVIANO LUCIANI: Another thing is, if you go to
us.movember.com you can find Google networks.
And so you can donate to members of Google that are
taking part in Movember.
But also on the site you can find, maybe, your friends, or
anyone else that is taking part and donate something.
JOANNA SMITH: And it's a pretty good cause, so
definitely go ahead and get growing.
It's not too late.
And if you're having a little trouble, like I am, you can
always check out freemustache.com to get a
little extra help.
All right, so with all of that, we're going to go ahead
and begin today's demo, where we're going to show a console
starter and then a metro style starter for all of you C# and
.NET people out there.
And as always, as we're doing this, if you have any
questions feel free to post them on the Google+ event, or
on the YouTube page, and we will be monitoring those to
help answer them.
So Gus, why don't you take it away.
GUS CLASS: Awesome.
So Joanna, thanks for the intro.
So I've been working hard on a couple C# starters for all the
C# developers out there.
And the first one I'm going to show is actually a console
based starter, so it's just real basic command line, built
from the Visual Studio default command line project.
So if you look at what I'm running here, when I started
up I've put a break point in.
SILVIANO LUCIANI: Gus, wait.
FEMALE SPEAKER: Can you zoom out a little bit?
Yeah.
GUS CLASS: Zoom out?
JOANNA SMITH: Yeah.
GUS CLASS: Are you having trouble seeing it?
JOANNA SMITH: Yeah.
GUS CLASS: How about now?
JOANNA SMITH: That's better.
GUS CLASS: OK.
So we're having weird issues with my screen, but we'll work
through it.
So here's the starter.
And I put a break point on the authentication step.
SILVIANO LUCIANI: Gus, before going in details into the
[? OAuth ?], would you like to give an introduction on
developing console applications?
GUS CLASS: Sure.
So developing a console application, you just start
with a generic template project from
within Visual Studio.
And so when you actually do the new project dialogue, it
will allow you to select various types of projects.
And the command line project, it's one of
those built in templates.
So it's really easy to start with.
So if you're interested in exploring this, I'm running
this on a virtual machine, and the virtual machine has
Windows 8 on it.
And I've installed Visual Studio
onto my virtual machine.
So if you've interested in doing this, if you have
Windows already you can go to, I believe it's msdn.com, and
you can download a free evaluation
copy of Visual Studio.
Or you can download Visual Studio Express, which is free
to use as long as you want.
SILVIANO LUCIANI: Thank you.
GUS CLASS: Yeah, no problem.
So here's a project starter.
And what I've done is I've wrapped a lot of--
there's actually a library that wraps the Google+
services within C#.
And so what I've done is I've basically written a wrapper
for the generated classes that manages the way that all those
classes work.
So here is my starter project running.
And when I perform an authentication step, it'll
actually bring up the Google authentication dialogue within
a new window, assuming everything is OK.
And so here's my application named One, and I just had it
gain permissions for my user.
And when I say Allow Access, the application will return an
access token, which then is passed to Google's
authentication and C# library.
And then that can be used to perform authenticated queries.
So I've also implemented search and activities in
commons list, but this is probably not as compelling as
anything else out there, because all it is that the
real gist of this project is that it's a great and easy way
to get started with Google+ if you're already using C#, or if
you're interested in doing it with C#.
So let's close that one out, and here's another project
that I've been working on.
This is a metro starter.
And so for this metro starter, what I did was I actually
implemented a number of the API calls using the C# based
libraries for performing JSON and REST requests.
JONATHAN BERI: Gus, can you tell me a little more about
metro style apps?
GUS CLASS: Sure.
So metro style apps is a new design philosophy that was
introduced with Windows 8.
And there's some pillars of metro design.
And in short, it's very simple, very flat UI that's
done in a specific way to be really easy for users and
developers to create with.
And if developers are following the metro style
guidelines, then their applications will be very
consistent with other applications that exist in the
new Windows 8 ecosystem.
JOANNA SMITH: So one thing is, is we just got corrected on
the Google+ page.
The new terminology is now modern UI instead of metro UI.
GUS CLASS: Oh, modern UI, OK.
JOANNA SMITH: But let's say someone hasn't developed with
the modern UI yet.
How is the best way for them to get started with that?
GUS CLASS: The Windows Developer Center has great
getting started documentation, and they cover everything from
getting Visual Studio up to writing your first app.
JOANNA SMITH: OK, cool
GUS CLASS: Yeah, that one is msdn.com/windows/apps.
JOANNA SMITH: OK, awesome.
GUS CLASS: So here's my starter project.
And what I'm doing here is I've put
another break point in.
Hopefully you guys can see this OK.
And so my break point is reached.
Try moving this over, maybe you can see it now.
Better, worse?
JOANNA SMITH: It's running off the edge of the screen, but
that's better.
GUS CLASS: So what you can see is that I'm caching the
refresh token, and I'm using this refresh token to
regenerate an access token.
But this is the first time that I've run the application,
so it's going to use the web authentication broker to
generate the access token and the refresh token
on the first run.
So when I run it, it should bring up the Google sign in
dialogue as set up through, here we go, right in the
middle, Windows 8.
And then I can just log in.
Let's see.
And after I log in, an access token will be
returned from the API.
And then that can be used to perform authenticated calls.
And so what I'm going to be doing is I'm just going to
allow it to know who I am on Google+.
So the first time an application code is generated,
and then this can be used to generate an access token.
JONATHAN BERI: This access token can be used for other
Google APIs as well, right, if you pass in the right scopes?
GUS CLASS: Yes.
So ultimately if there's new scopes that are added, then
these scopes can be used for access.
So that's actually the gist of how this works.
In my demo app I'm doing the same thing that I did in the
console app, where I'm just using activities API, as well
as the plus dot MEscope to retrieve
various data from Google+.
JONATHAN BERI: Cool.
And things like the fonts and the grid layout, that all
comes from the modern UI system?
GUS CLASS: Yeah.
So if you look at the grid that appears here, this is
what's called a grid view.
And it allows you to use templates for rendering those
UI elements.
And a number of styles, such as the animation and the fonts
and stuff are actually pretty much pre set for you, so that
it's consistent with the rest of the apps
that are out there.
JONATHAN BERI: Pretty neat.
JOANNA SMITH: That's pretty cool.
Anyone else have some questions, or should we start
looking at the public questions?
JONATHAN BERI: Let's go to the stream.
JOANNA SMITH: OK.
So some things that we got in advance; we had a question
from someone named Isabella in a language that I can't
actually determine.
So I'm going to go ahead and ask if you wouldn't mind
reposting in either English, Italian, Spanish, or Klingon.
Those are the languages that we're qualified to really
understand.
And if you do, we'd love to answer your question.
And then we got a question from someone named Edward that
says that they keep getting an Error Page 500.
But we're going to need more information, I think, in order
to really get what your question is.
So the most recent one just came in a few minutes ago from
the same person, William, who corrected us on our
terminology.
JONATHAN BERI: Thank you William.
JOANNA SMITH: He wants to know if anyone has been pursuing a
social connector for Google+ for use in Outlook 2013.
And I don't think any of us are really aware of that.
Correct me if I'm wrong.
GUS CLASS: There's nothing that I'm aware of for a social
connector for Outlook.
JOANNA SMITH: You can always check our forum, though.
If you want to really see what other people are up to, that's
probably the best place for you to connect with other
developers for the Google+ platform.
And really ask your questions there, and maybe even find
people to work with.
GUS CLASS: Yeah, and if you have ideas for ways that we
could be integrating using a social connector or something,
we'd love to hear about it.
And we'd also love to hear if you have things that are
missing that are preventing you from being
able to develop that.
JOANNA SMITH: Yeah.
If you ever come across something that you really
need, a resource that is holding you up, definitely go
ahead and put that into our issue tracker from the
developers.googl e.com/plus/support page, I
think is what it is.
And we'll definitely go through that and try to get
those to the right people, and hopefully resolve your problem
as soon as we can.
No other questions yet.
Do you guys have any questions for Gus?
JONATHAN BERI: So Gus, how easy would it be to take what
you've done in C# and move that to the server?
GUS CLASS: Moving to the server side.
So the work that I've done in C# with the console starter is
something that could very easily repurposed into a
server side flow.
The real key piece is understanding how to use the
service wrapper that is generated using Google
discovery documents and so forth.
Once you've figure that out, then implementing any native
C# connectors to Google services is going
to be really easy.
So in the case of metro style, it's slightly different,
because some of the libraries that are used for that service
generator are actually replaced with a super set of
that functionality that's built into metro style.
So for example, parsing JSON and performing RESTful queries
is much easier in metro than it was previously.
And so certain libraries have actually been completely
replaced and pulled from Windows for these specific
types of apps.
So in order to support that, you have to actually use the
metro libraries themselves.
And so that's pretty much what I did in the
case of my demo app.
And so hopefully in the near term we'll be able to open
source that so other people can take advantage of the code
that I've already created.
But yes, the client side flow could pretty easily be applied
to a server side flow.
And that's actually going to be one of the next things that
I will be looking at.
JONATHAN BERI: So Azure in the future, maybe?
GUS CLASS: Azure, that's even further down the line.
Yes, a complete possibility.
JOANNA SMITH: And one thing to take note of is that the open
source process at Google does take a little
while to get through.
So if you are looking to get started with the modern UI in
the very near future, you should always feel free to ask
your questions in our forum or on our Google+ page, because
we'd love to help you until we can actually get this code up
on our site for you to play with on your own.
So definitely feel free to ask those questions at any time.
GUS CLASS: Or +mention me directly, and I'd be happy to
help you if you have a specific problem that I may
actually have a code solution for, anything like that.
I'm always listening.
JOANNA SMITH: And you can always check out Gus's blog
and stalk him there.
GUS CLASS: Yeah.
JOANNA SMITH: He has all kinds of C# .NET knowledge.
GUS CLASS: Yeah.
I've been blogging about .NET since beta for
Windows 8, I guess.
I don't even know.
JOANNA SMITH: All right.
I'm not noticing any other questions right now, so I
think we can go ahead and call this a nice, short and sweet
Google developers live presentation.
But as always, if you post questions in the next few days
we'll definitely come back and take a look at them.
And happy Movember, everybody.
GUS CLASS: Embrace the mo.
Thanks for watching.