SPEAKER 1: Sean, hi.
GDG is a very interesting development community.
SPEAKER 2: I'm glad somebody has asked this question.
SPEAKER 3: This is where the magic happens.
SPEAKER 4: This is primarily a question and answer show.
So if any of you would like to ask questions.
CLAUDIO: Hi, everyone.
Welcome back to Google Developers Live.
My name is Claudio and this is Vic.
We are two engineers in the Google Drive SDK team.
Today we're going to review on an app that is on the Chrome
Web Store and that integrates with Google Drive.
We decided for today we wanted to show something that might
be useful for students going back to school.
So what is this app, Vic?
VIC: So the app is called the Desmos Graphing Calculator.
And it's a very popular app in the Chrome Web Store.
I have their homepage open here.
And we can just take a look through the core application.
So essentially what it allows you to do is write a series of
equations that come up with a graphical representation.
So if we scroll down here, here's some recent graphs that
people have made.
Here's Batman.
So somebody wrote some equations that
created a bat symbol.
CLAUDIO: How does that help with school?
VIC: Well learning must be fun, right?
CLAUDIO: OK.
VIC: So if you create Batman, you'll probably learn a lot
about these equations because these
are not trivial equations.
There's some other ones here that are a
little bit more relevant.
So here's a couple of waves and linear equations.
So essentially this application is targeted at
anybody who needs to make graphs very often, which, I
think, is largely students working on classes.
So this is an app that integrates with Google Drive
by the Chrome Web Store.
So to take a look today at this app and then review it,
we're going to install it from the Chrome web store.
So here I am in Drive, and I'm going to get more apps.
And then when the Chrome Web Store comes up, we're going to
see all of the Google Drive apps.
CLAUDIO:So when you click on Get More Apps, you're brought
to a specific collection inside the Chrome Web Store
where you can see all the applications that integrate
with Drive?
VIC: Yeah, so there's a lot.
But the one that we're looking for today is Desmos Graphing
Calculator, which is right here.
So if you click Add to Chrome, this is going to install it.
Here we see that it came up in the Chrome New Tab page.
I'm going to come back to Drive, and we'll be able to
create more Graphing Calculator by Desmos.
So if I create this, the first thing that we have to do is
authorize the application, and tell it that it can create
graph files on our behalf, and store them in Drive.
So we're going to allow access.
And then, finally, we're taken into Desmos.
So here the graph is currently empty
because we have no equations.
But if I enter some equations here, like here's one for a
circle, it graphs instantly.
And we can add more equations, like x plus y equals 2 just
for a line.
So we could continue doing this, and then save it to
Desmos or to Drive.
So here if we click Save, it's asking us to create a new
account or to log in.
VIC: This is a new account on Desmos, right?
This is not a Google account.
VIC: Yeah.
The one difference is that we can sign in
with OpenID on Google.
And then you'll notice it asks us to authorize again.
And we come back, and now we're
actually saving the graph.
So we'll say line and circle.
And we'll just share it with the world for now and click
Save Graph.
So here we get a permalink and some ways to share it.
Take me back to my graph.
So one of the advantages of this application is that you
can instantaneously graph pretty much any equation.
It's very, very powerful for students.
CLAUDIO: And you can also start from someone else's
graph, and see how that translates into equations.
Maybe it's very hard to understand, at least for me.
But for some people, this can be very, very easy to
understand.
And you can easily move back and forth equation to graph.
Can you also edit it?
VIC: Yeah.
So here I could create a new expression on this graph.
And then x squared plus y squared--
CLAUDIO: So you can start from someone else's equation and
extend it or change it?
VIC: Yeah.
So if we do that, then it really is good for
collaboration between students and teachers.
So here, maybe a teacher creates a template graph and
then asks students to add some equations that will intersect
certain points, or something like that.
So super powerful app.
There's also a keypad, and there's some other additional
settings that you can do to customize the graphs.
Like you can change the labels on each of the axes
and things like that.
So we're very pleased with the core application.
What we were going to talk about today is how they
integrate with Drive and what they could do better or what
they already do well.
CLAUDIO: OK.
I think we can start from the authorization mechanism.
VIC: Yeah.
So when a user originates in Drive, they create more
Graphing Calculator by Desmos.
One of the problems is that Desmos currently is not
automatically logging the user in when they
originate from Drive.
And this is a problem because it causes the user to have to
log in twice.
So here, actually, if I log out, we can demonstrate this a
little bit more easily.
So if I create another graph.
The user should arrive at the application logged in.
But you can see that we're not logged in.
So this is one convenience mechanism for users
originating from Drive.
Also, if the user originates from Drive, there's no way to
actually save back to Drive at the moment.
So I believe that this is something that Desmos used to
support but removed temporarily because of some
integration issues between Desmos and Google Drive.
I think that those are issues we've since resolved.
And so we're really looking forward to Desmos bringing
this functionality back.
CLAUDIO: So what should be the best flow for the user?
VIC: Ideally the best flow for the user is creating a graph
from within Google Drive.
And when they land here, they are logged in.
And they create some graph like this.
And when they click Save, instead of requiring the user
to log in again, or create a Desmos account, instead of
walking through this flow, where I have to authorize a
second time, and then do this to save my graph, everything
is saved into Drive automatically.
CLAUDIO: But right now it's not.
VIC: Right.
Right now, nothing has been saved into Drive.
In fact, if we look at all of the files on this test
account, we can see that there's just nothing here.
So Desmos is saving the graph locally within Desmos.
So their Drive integration is missing some key components
right now, primarily the ability to create and store
graphs within Drive.
They are also missing the component to open certain
graphing files from within Drive, which is fine.
But if they were storing native Desmos graphs in Drive,
then those should be open.
CLAUDIO: But they can also store some
shortcuts to documents.
Store them there on their server.
So it depends on their implementation.
But one thing you can do as a developer is that you can
still store all the data in your back end, whatever that
is, a database, a local file system, it doesn't matter.
But you can have shortcuts, links, or pointers to those
documents from Google Drive.
And this is not happening at the moment.
VIC: That's exactly right.
So it doesn't matter really if they store this
data in Drive or not.
They could store it on Desmos.com but link to it with
a shortcut file from within Drive.
We need to make it clear, though, that Desmos is a
perfect use case for integrating like this with
Google Drive.
Here they have a single document interface that's
working on a single file at a time.
And if that file was stored in Drive or a shortcut was stored
in Drive, then it would add the ability for more users to
interact with these things more quickly,
which is pretty important.
Also, integrating with Drive gets you things like sharing
for free, it gets you searching for free, and things
like this, and it allows users to collaborate on these
documents a little bit more quickly.
CLAUDIO: Yeah, there's also something else they can do to
make the user experience better, integrating better
with Google Drive.
I see there's a button that says My Graphs on
the top left corner.
What does that do?
VIC: It shows all of your graphs saved in Desmos.
CLAUDIO: They can probably integrate this with Google
Drive, and show all the files you have, all the matching
files you have, on Google Drive.
And if developers want to integrate with--
when I have a dialog to pick files from
Drive, we provide that.
It's called Google Picker API.
It's part of the Google Drive SDK.
It's a JavaScript API you can use.
You can easily integrate it into your application, and use
it to show the lists of files from the user's account that
match some specific criteria.
VIC: Exactly.
So if we go to the Drive SDK documentation at
developers.Google.com/drive somewhere here, I think it's--
CLAUDIO: Manage Drive Files.
VIC:Yep.
And then actually, no.
I don't think it's there.
CLAUDIO: Integrate with Drive.
VIC: Yeah.
Sorry, we'll just rework this a little bit.
So if we open files--
CLAUDIO: So there are different ways
you can open files.
The first one we saw is that you click on a file on Drive
UI or you create a new one, and that saves it.
But, as a side, you could also use a Picker.
VIC: Yeah.
So here's the documentation about how to use the Google
Drive Picker.
And, essentially, how to embed something contextually into
the page of your application that will show essentially the
Google Drive dialog box that allows you to choose files
from within Google Drive.
So you can see it's actually pretty quick
and simple to implement.
In Desmos' case, they may have a strong opinion that they
want users only choosing files from within Desmos.
And that's fine.
A Drive SDK integration is not all or nothing.
This is just another suggestion that would make
their app easier to use from a Drive user's perspective.
CLAUDIO: And just about something while we mentioned
the Picker The Picker can be used to select files from
Drive, but it can also be used to upload files from Drive.
So let's say if you have a client-side application or you
want the users to upload files, you can just use the
same Picker that you use for downloading to upload.
Maybe this is not the case for Desmos.
I don't think they have to upload files to Drive.
But it might be good to know.
VIC: Exactly.
Yeah.
So can you think of any other ways that Desmos could
integrate with Drive?
CLAUDIO: I think the most confusing part is just the
authentication and the login, the user creation, which is
not clear for users.
What a Desmos account is, and what a Google account is.
I mean, you think you're logged in into Google, and you
are, and you're not logged into Desmos.
Or you can be logged into Desmos, but not
logged in into Google.
And this has to be as defined as possible to the users so
that they log in once and that's it.
And that's why we want developers to use OpenID,
which is the technology that allows you to delegate
authentication to Google.
VIC: So other apps get around this in that if, for instance,
another application needed to make a native account, they
would automatically create the native account and associate
the incoming Google user with that account.
So when the user arrives from Drive, Drive also sends a
token along.
And the application should be using this token to gain
access to a user's Drive files when they arrive.
Because the user, after they've installed the
application and run it from within Drive, has already
authorized the app to access certain files.
So that could be a little bit cleaned up so that when I come
here and I create more Graphing Calculator, I land
here, I'm signed in, and when I save the file, it
automatically goes back to Drive because that's where I
originated from anyway.
CLAUDIO: And another suggestion I might have, it
depends on what is the file format they use to store their
data on Drive.
So regardless if they have only a shortcut to their
document somewhere else, or if they store everything on
Drive, this can probably be easily translated into some
XML file, or something like that, some kind of text files.
Something they can do to make it easier for Google to index
the text content so that it can be easier for users to
find a document.
So whenever you create an equation, but when you save
it, I think you could also add some description fields, some
tags, or something like that.
So if that is a text file, then Google will automatically
index that text so that users can find it by searching for
some terms.
But if there is a binary format, we don't have a way to
find out what the text is.
VIC: Currently within Desmos, yeah.
CLAUDIO: Yeah.
And developers can provide some indexable tags for us.
So there is this field in the API that they can use so that
even if we don't know what the file format is, and we don't
know how to open a specific file, or read what the text
content is, you can still provide us with some text
content, and we will index it and we will treat it exactly
the same way as we treat the text we index.
VIC:Yeah, exactly.
So when creating or updating a file, applications can set the
indexable text, which is here.
So, like Claudio said, it's just a field of keywords, a
normal text field.
And you set whatever keywords you'd like Google to index on.
And then when the user searches for something in
Google Drive, if one of those keywords matches,
then we show the file.
CLAUDIO: One of the things to mention about the indexable
text field is that field is write only.
And you have to provide a new indexable text field every
time you update the document because, of course, if you
changed the content of your document, you have to change
the indexable text accordingly.
And if you don't provide a new indexable text when you update
an existing file, we will assume you just want to clear
that field, so we will store an empty indexable text.
VIC: So this is a future request that we've gotten is
to make the indexable text readable by applications, and
it's something we're considering.
So getting back to Desmos, this is a really, really
powerful application that we highly recommend you use.
Go to the Chrome Web Store, install Desmos Graphing
Calculator.
It's very powerful.
I actually use it somewhat often now that
I've discovered it.
It's very, very convenient for just drawing graphs of
equations, which we do often.
CLAUDIO: Just to, before we wrap up, so you showed how to
get to the Chrome Web Store when you start from Drive.
And that is really easy.
So you said you wanted to create something.
You don't have an application, so you do more, and
you get more apps.
And this will land you directly to the Drive
application collection.
What if you start from the Web Store directly?
How do you find this collection inside Drive?
VIC: That's a good point.
CLAUDIO: The Web Store.
VIC: So if we just land in the normal Chrome Web Store, this
is what it looks like.
You can see various types of applications here.
If you want to see all of the Google Drive applications,
just go to Collections and then Google Drive.
And then here you can see all of the apps that have some
integration with Google Drive.
So there's a lot.
We recommend you just take a look through them.
There's a bunch of image editors, presentation editors,
there's AutoCAD WS, if you work with CAD documents.
CLAUDIO: And also to make it easy to recognize Google Drive
applications, we added a small logo, 2H listing.
So that is the Google Drive logo on the
bottom right corner.
And if you click on one of those listings, you will see
that it works with Google Drive, which is
our badge for it.
VIC: Exactly.
Yep.
CLAUDIO: And, of course, as in all applications in the Chrome
Web Store, you can read reviews from other users.
You can see star rating, and so on.
VIC: Yeah, so here's the listing for Desmos.
You can see they have 142 five-star reviews.
So if we go into the reviews, you can see this first review
here from a Google user, "Nothing short of amazing.
Best thing out there.
It's so good.
I've never seen such a perfect graphing calculator."
CLAUDIO: Yeah, it's an amazing application.
VIC: Great application.
CLAUDIO: You should try it.
VIC: All right.
So that about wraps it up for today's
Google Developers Live.
We have reviewed Desmos Graphing Calculator.
CLAUDIO: See you next week.
Thank you very much.