SitePoint Podcast#176:与Paul Kinlan深入探讨Web意图

Episode 176 of The SitePoint Podcast is now available! This week our regular interview host Louis Simoneau (@rssaddict) interviews Paul Kinlan (@paul_kinlan) about the Web Intents API from Google and where it’s going.

SitePoint Podcast的第176集现已发布! 本周,我们的常规采访主持人Louis Simoneau( @rssaddict )采访了Paul Kinlan( @paul_kinlan )关于Google的Web Intent API以及它的发展方向。

下载此剧集 (Download this Episode)

You can download this episode as a standalone MP3 file. Here’s the link:

您可以将本集下载为独立的MP3文件。 这是链接:

  • SitePoint Podcast #176: Web Intents in Depth with Paul Kinlan (MP3, 22:47, 21.9MB)

    SitePoint Podcast#176:与Paul Kinlan深入探讨Web意图 (MP3,22:47,21.9MB)

剧集摘要 (Episode Summary)

Louis and Paul discuss how the Web Intents API is being worked on at the W3C and other groups, what it will mean for web apps and browsers, and how this could even extend in the future to working with other devices in your home.

Louis和Paul讨论了W3C和其他小组如何使用Web Intents API,这对Web应用程序和浏览器意味着什么,以及将来如何扩展到与家庭中其他设备一起使用。

Browse the full list of links referenced in the show at http://delicious.com/sitepointpodcast/176.

浏览http://delicious.com/sitepointpodcast/176中显示的参考链接的完整列表。

面试成绩单 (Interview Transcript)

Louis: Hello and welcome to another episode of the SitePoint Podcast. Today in the show, I thought it would be a good idea to delve a little deeper into a topic that we’ve covered in the past. So, a few episodes ago on the podcast, we talked a little bit about Web Intents, which is a new browser API specification. At the time, it had just landed in a release of Chrome, and we talked a little bit about what it was. But I thought it was a really interesting topic and worth going into more depth. So, today on the show I have with me Paul Kinlan, who’s a Developer Advocate at Google, and who blogs and talks a lot about the Web Intents specification, just to go over this a little bit in more detail. Hi, Paul, welcome to the show.

路易斯:您好,欢迎收看SitePoint播客的另一集。 今天在演出中,我认为深入研究我们过去讨论过的主题是个好主意。 因此,在播客的前几集中,我们谈到了Web Intent,这是一个新的浏览器API规范。 当时,它刚出现在Chrome版本中,我们就它的含义进行了一些讨论。 但是我认为这是一个非常有趣的话题,值得深入探讨。 因此,今天在展会上,我和Paul Kinlan在一起,他是Google的开发人员倡导者,他写博客并谈论了很多有关Web Intents规范的内容,只是在此稍作介绍。 嗨,保罗,欢迎参加演出。

Paul: Hi. Thank you for having me.

保罗:嗨。 谢谢你有我

Louis: It’s a pleasure to have you.

路易斯:很高兴有你。

Paul: Yeah. It’s good to be here. I’m currently in L.A. I normally am based in London. So, yeah, my time zones are all pretty crazy.

保罗:是的。 很高兴来到这里。 我目前在洛杉矶,我通常在伦敦工作。 所以,是的,我的时区都非常疯狂。

Louis: Yeah, well L.A. is a little bit easier actually for us here in Australia to coordinate with. GMT is the worst. It’s always exactly the middle of the night whenever we’re awake in Australia. Well, it’s great to have you on the show. So, before we dive in maybe for anyone who hasn’t heard the previous episode – or even people who have because my understanding of Web Intents was, at the time, fairly limited, so I probably butchered a few things. Do you want to talk a little bit about what the Web Intents specification is and what its role is in the modern browser?

路易斯:是的,实际上,对于我们在澳大利亚的澳大利亚来说,洛杉矶要容易一些。 GMT是最糟糕的。 每当我们在澳大利亚醒来时,总是总是半夜。 好吧,很高兴您能参加演出。 因此,在我们潜入之前,也许是为那些从未听过上一集的人-甚至是那些因为我当时对Web Intents的理解还很有限的人而入迷的人,因此我可能只想了几件事。 您是否想谈一谈Web Intent规范是什么以及它在现代浏览器中的作用?

Paul: Yeah. Web Intents is a specification that we’ve been working on with kind of partnership with the W3C. It’s still kind of in a very kind of early, experimental stage at the moment. It’s by no way an official standard just yet. But it’s something that we’re working on to try and make it easier for developers to build connected web applications. Kind of the thing that we find at the moment is when people build applications they’ll talk to another web app, they do a whole load of server work to kind of get two apps talking together, or they use kind of JavaScript widgets. There’s no consistent API to kind of connect those two services together. But also at the same time, there’s no kind of one consistent way of being able to plug in your own preferred service to talk to another application. So, if you were on a website and you wanted to share a link to, say, Google Plus and it wasn’t on the page – but only Twitter and, say, Facebook or some other social networks are on there – right now, there’s no other way than getting the developer to actually implement that integration to, say, Google Plus into their site.

保罗:是的。 Web Intents是我们一直在与W3C进行合作的规范。 目前,它仍处于非常早期的实验阶段。 到目前为止,这还不是官方标准。 但是,我们正在努力尝试使开发人员更轻松地构建连接的Web应用程序。 目前,我们发现的一种情况是,当人们构建将与另一个Web应用程序交谈的应用程序时,他们会完成服务器的全部工作,以使两个应用程序一起交谈,或者使用某种JavaScript小部件。 没有一致的API可以将这两个服务连接在一起。 但是同时,也没有一种一致的方式能够插入您自己的首选服务来与另一个应用程序对话。 因此,如果您在某个网站上,并且想要共享一个链接,例如Google Plus,而该链接不在页面上-则只有Twitter,例如Facebook或其他社交网络,现在,除了让开发人员实际将集成实施到Google Plus到他们的网站外,别无其他方法。

Web Intents is designed to kind of mediate that problem away from getting the developers to have to build those complex integrations in, and rather replace it with a service, which delegates to the browser the list of services which the user might want to use for common actions across the web. I think the most common ones are Share, Edit, Pick, Save, and those types of things. So, if you want to save a link to your preferred social network, then it’s just one common action. In theory, it’s one button, rather than, say, 20 buttons on the web.

Web Intents旨在解决该问题,而不是让开发人员必须构建这些复杂的集成,而用服务代替,该服务将浏览器委托给浏览器的用户可能希望使用的服务列表网络上的操作。 我认为最常见的是共享,编辑,选择,保存以及这些类型的东西。 因此,如果您想保存到首选社交网络的链接,那么这只是一种常见的操作。 从理论上讲,这是一个按钮,而不是网络上的20个按钮。

Louis: Right, so whereas at the moment, if I as a user want to pick a photo to use for my avatar for a new web service, my options are pretty much, either the developer has already integrated with, say, Facebook to get my avatar from there? Or I go rummaging around my home folder, find the file, upload it myself? What Web Intents is supposed to do, for the way I understand it is provide a way for the developer to say, “All I want to do now is allow the user to pick a photo, and anything else that says it can provide a photo, we can integrate with that as long as it provides it in a predefined format.”

路易斯:对,所以目前,如果我作为用户想要选择一张照片用作我的头像来使用新的Web服务,我的选择就很多了,开发人员已经与Facebook集成在一起,以获得我的头像从那里? 还是我在自己的主文件夹中闲逛,找到文件,然后自己上传? Web Intents应该做什么,以我的理解为开发人员提供了一种方式,“我现在要做的就是允许用户选择照片,其他任何可以提供照片的东西,只要它以预定义的格式提供它,我们就可以与之集成。”

Paul: Yeah, exactly. That’s exactly right. Pick is actually one of the strong and kind of unknown Web Intents we’ve got. Pick and Save are quite complimentary. You might have a Cloud storage solution, whether it’s Google Drive, Dropbox, box.net, all these types of different services. When you want to pick a photo, you might have it on Dropbox.

保罗:好的。 没错 选择实际上是我们拥有的强大而未知的Web意图之一。 选择和保存是相当免费的。 您可能有一个云存储解决方案,无论是Google云端硬盘,Dropbox,box.net还是所有这些类型的不同服务。 当您想要选择照片时,可以将其放在Dropbox上。

So, you want to bring into your profile page on Facebook or different types of services, right now, unless the hardcoded integration has been done to those services, you download the image to your home directory. Go back to the other application, go and find the image, and upload it through. So, yeah, that’s a really good example of what we’re trying to do with Web Intents, is trying to solve that whole kind of set of steps of trying to get either the integrations in or having to download data into an intermediate place on the user system to upload it again.

因此,您现在想立即进入Facebook或其他类型的服务的个人资料页面,除非已对这些服务进行了硬编码集成,否则将图像下载到您的主目录中。 返回到另一个应用程序,查找图像,然后将其上传。 所以,是的,这是我们正在尝试使用Web Intents的一个很好的例子,它正在尝试解决整个步骤,以尝试集成或将数据下载到中间位置。用户系统以再次上传它。

Louis: Right. So, the idea obviously is to try and allow different web applications to communicate with each other via some common actions without necessarily relying on the developers to integrate with every possible service out there.

路易斯:对。 因此,很明显,该想法是尝试允许不同的Web应用程序通过一些常见的动作相互通信,而不必依赖开发人员与那里的所有可能的服务进行集成。

Paul: Yeah.

保罗:是的。

Louis: That relies on the idea that you have this set of common actions that are defined. Does the Web Intents specification – is it limited to a certain number of actions, or is it open? Are there new ones being added all the time?

路易斯:这依赖于您已定义了这组常见操作的想法。 Web Intents规范-是否限于特定数量的操作,还是开放的? 是否一直都在增加新的?

Paul: Yeah. So, this is actually kind of quite interesting, really. The actual Web Intents specification doesn’t kind of mandate a specific set of types of actions that can be performed. The Web Intents specification is really just purely about the conduit, the way that the browser will mediate services, and then deliver the data between the client and the service application. So, what we’re trying to do is that we’re trying to document and kind of manage a set of actions, common verbs, things that people do on the web on webintents.org.

保罗:是的。 因此,这实际上确实很有趣。 实际的Web Intents规范并没有规定可以执行的一组特定类型的操作。 实际上,Web Intents规范仅涉及管道,即浏览器将服务进行中介,然后在客户端和服务应用程序之间传递数据的方式。 因此,我们正在尝试做的是记录和管理一系列动作,常用动词以及人们在webintents.org上在网络上所做的事情,并对其进行管理

So, the idea is that the specification on the W3C is kind of basically saying, “This is how the data will be delivered.” It doesn’t care about the actions and those types of things at the moment. What we’re trying to do is webintents.org is trying to be a little bit more open and easier to manipulate in the sense of defining new actions and common verbs, and that’s where that’s documenting those actions. So, on webintents.org we have Share, Save, Edit, Pick, Subscribe, and View as our kind of six core actions.

因此,想法是W3C上的规范基本上是这样说的:“这就是数据的传送方式。” 目前它不在乎动作和那些类型的事情。 我们正在尝试做的是webintents.org,它在定义新动作和常用动词的意义上正变得更加开放和易于操作,而这正是记录这些动作的地方。 因此,在webintents.org上,我们将共享,保存,编辑,选择,订阅和查看作为我们的六个核心操作。

There’s nothing saying that there won’t be any more actions. It’s just that we think we’ve got six really good kind of high level things that people do on the web, quite on a common basis from common use cases. If people want to try and define some more, then we’re trying to do that around the webintents.org process while on the full standards process, if that makes sense, via the W3C.

没有什么可说的,不会有更多的动作了。 仅仅是因为我们认为人们在网上已经完成了六种非常好的高级事情,这是基于常见用例的。 如果人们想尝试定义更多内容,那么我们将尝试在整个标准流程中围绕webintents.org流程进行操作,如果可以的话,可以通过W3C进行。

Louis: Right, and within each of those actions, are there different ways of dealing with different kinds of data? For example, sharing a photo versus sharing a link how does that handle?

路易斯:对,在每个动作中,是否有不同的方式来处理不同种类的数据? 例如,共享照片与共享链接如何处理?

Paul: Yeah. So, that’s actually kind of diving a little bit more into the spec, I suppose. So, what normally happens is the client application will ask the browser for a list of services that support their ability to share something. By default, you could just say, “I want to share anything,” and any service that supports the Share action will be listed. What we’re trying to encourage, and we’re trying to push developers to implement is be very specific about the types of data that you want to, say, share or edit, or pick from another service.

保罗:是的。 因此,我想这实际上是对规范的进一步研究。 因此,通常情况下,客户端应用程序会向浏览器询问支持其共享功能的服务列表。 默认情况下,您可以说:“我想共享任何东西”,所有支持“共享”操作的服务都将列出。 我们想要鼓励的是,我们试图推动开发人员实现的是关于要共享,编辑或从其他服务中选择的数据类型的非常具体的信息。

What you have on the Intent specification is a data type. At the moment it’s a mine type, so if you say, “Well, I want to share an image to your example,” you don’t want Twitter.com to potentially be in that list, because it doesn’t… Well, it does now, but in the past it didn’t support the ability to directly share an image. It was like really text and links. So, you might say, well, TwitPic or different types of image services, well they support the ability to share images, but they don’t support the ability to share text or videos and those types of things.

您在Intent规范中拥有的是数据类型。 目前,这是我的类型,因此,如果您说“嗯,我想为您的示例共享图片”,则您不希望Twitter.com出现在该列表中,因为它不会……嗯,现在可以使用,但过去不支持直接共享图像的功能。 就像真正的文字和链接一样。 因此,您可能会说,TwitPic或其他类型的图像服务,很好,它们支持共享图像的能力,但是不支持共享文本或视频以及这些类型的事物的能力。

So, by specifying the data type of data that you want to be able to perform that action on, you can kind of get a list of services which are much more able to handle the user’s intent essentially. So, inside each action we’re going to try and document, especially on webintents.org, the best practices for kind of manipulating the data individual types. So, the way that you handle and the types of data that you pass for an image will potentially be different for an audio file or a video file or a link, or a PDF document and those types of things.

因此,通过指定要对其执行操作的数据的数据类型,您可以得到一种服务列表,这些服务实际上更能够处理用户的意图。 因此,在每个操作中,我们都将尝试记录文档,尤其是在webintents.org上,该文档是处理各种类型的数据的最佳实践。 因此,对于音频文件,视频文件或链接,PDF文档以及这些类型的事物,您处理图像的方式和传递的数据类型可能会有所不同。

There might be some core common attributes, name, file size and all those types of things. But when you think about a link there’s no point in specifying a codec, for instance. But if you had a video file or an audio file you might want to pass the type of codec in through that extra piece of metadata that you send through to the service.

可能会有一些核心的通用属性,名称,文件大小以及所有这些类型的东西。 但是,当您考虑链接时,例如,没有必要指定编解码器。 但是,如果您有视频文件或音频文件,则可能需要通过发送给服务的那部分元数据来传递编解码器的类型。

Louis: Right.

路易斯:对。

Paul: So, we do have those types of options available. It’s kind of a completely open system, which means that we have to be quite diligent in the webintents.org best practices and the best practices documentation to tell the developer exactly what to expect on either side of the story. So, the clients on what to send to the services and what services should expect to receive from the clients.

保罗:因此,我们确实提供了这些类型的选项。 这是一个完全开放的系统,这意味着我们必须非常认真地研究webintents.org最佳实践和最佳实践文档,才能告诉开发人员确切的故事期望。 因此,客户端将向服务发送什么以及应该从客户端接收什么服务。

Louis: Right. I guess it’s interesting because it’s open-ended because you don’t necessarily know what types of applications or what types of data or user content are going to be shared between applications. It’s hard to predict in advance, so you have to fall back on this more. It reminds me a little bit of the way micro formats work, in sort of – it’s more of an agreement between the application makers trying to make things work together than a formalized standards process.

路易斯:对。 我猜这很有趣,因为它是开放式的,因为您不必知道哪些类型的应用程序或哪种类型的数据或用户内容将在应用程序之间共享。 很难预先预测,因此您必须更多地依赖于此。 它使我想起了微格式的工作方式,某种程度上是,它是应用程序制造商之间试图使事物协同工作的协议,而不是正式的标准流程。

Paul: Yeah, exactly. I think when you get into a standardization process it gets a little bit more complex, a little bit more longwinded. You get very precise semantics, but what we’re trying to say is that we’re going to have a common set of things that are probably going to be quite common across all types of data that we want people to try and do and use to pass across. Then as we see the ecosystem grow and people use it we can have the flexibility to go back and say, “Well, we didn’t include dimensions in the image file.”

保罗:好的。 我认为,当您进入标准化流程时,它会变得有些复杂,有些困难。 您获得了非常精确的语义,但是我们要说的是,我们将拥有一组通用的东西,这些东西在我们希望人们尝试并使用的所有类型的数据中可能会非常通用。穿越。 然后,当我们看到生态系统在成长并被人们使用时,我们可以灵活地回过头来说:“好吧,我们没有在图像文件中包括尺寸。”

It’s quite an open-ended format in the sense of when you’re sharing a type of data we’re trying to describe best practices for the types of data that you’re going to pass across the wire, between the browser applications. We think we’ve defined a good set of attributes that you will want to pass across. We’re just preparing some documentation to go to the W3C group just to kind of, right now, basically tell them kind of where we’re thinking of going with the data types that we’re going to pass.

就您共享一种数据类型而言,这是一种开放式格式,我们试图描述在浏览器应用程序之间通过网络传递的数据类型的最佳做法。 我们认为我们已经定义了一组您希望传递的属性。 我们只是在准备一些文档,以便转到W3C小组,目前,基本上是告诉他们我们正在考虑要传递的数据类型的某种地方。

Because originally, the very first draft of the Web Intents specification we were literally just passing raw blobs or URLs between two applications. A lot of the feedback that we’ve got from developers is actually, we need more information than just the raw data. So, when you pass a blob between two applications it doesn’t actually include things like the file name or any codec information and things like that.

因为最初是Web Intents规范的初稿,所以我们实际上只是在两个应用程序之间传递原始Blob或URL。 实际上,我们从开发人员那里得到的很多反馈是,我们需要的不仅仅是原始数据,还有更多信息。 因此,当您在两个应用程序之间传递Blob时,它实际上并不包括文件名或任何编解码器信息之类的内容。

So, what we’re trying to do is we’re trying to be a little bit more open-ended in the sense that when we have these two applications, we’re going to define some basic common attributes, the URL to where the data is, or maybe the actual raw data itself inside a blob. But then inside the webintents.org documentation, also describe some best practice attributes that users and developers should expect to be on the data payload.

因此,我们要做的是尝试开放一些,因为当我们拥有这两个应用程序时,我们将定义一些基本的公共属性,即指向数据本身,或者是斑点内部的实际原始数据本身。 但是,然后在webintents.org文档中,还描述了用户和开发人员应该期望数据有效载荷上的一些最佳实践属性。

For instance, if you’ve got an image you might want image dimensions inside the actual data payload outside of the actual data body itself because the application might want to inspect the data before it actually has to load it and pass it and do some of the stuff with that. Well, actually inspect the data type attributes rather than the data first. So, yeah, it’s kind of open-ended. It’s quite open-ended in that sense.

例如,如果您有一个图像,则可能希望图像尺寸在实际数据有效载荷之内,而不是在实际数据主体本身之外,因为应用程序可能希望在实际加载和传递数据之前进行检查,然后执行一些操作那个东西。 好吧,实际上是检查数据类型属性而不是首先检查数据。 所以,是的,它是开放式的。 从这个意义上讲,它是开放式的。

The great thing about this is that we can take a lot of the feedback from the developer community as this is building and people are starting to implement it inside their web applications and then integrate that back into the best practice documentation. The actions and the types themselves are definitely outside of the specification process at the moment.

这样做的好处是,我们可以从开发人员社区获得大量反馈,因为这正在构建中,人们开始在Web应用程序中实现它,然后将其重新集成到最佳实践文档中。 目前,动作和类型本身绝对不在规范过程之内。

Louis: Right. That leads on perfectly to what I was going to ask next. You were just speaking a little bit about it starting to be used and adopted by web developers. What are some examples of sites that have sort of taken the lead and started implementing features using Web Intents?

路易斯:对。 这完美地导致了我接下来要问的问题。 您只是在谈论它,开始被Web开发人员使用和采用。 有哪些网站带头并开始使用Web Intents实现功能的网站示例?

Paul: Yeah. So, it’s actually kind of easy to have a look yourself. If you invoke an action via Web Intents inside Chrome you get a list of applications that either you’ve got installed or are suggestions from the Chrome web store itself. So, we’ve got a couple. I mean, we’ve got WordPress in there. I’ve written a whole load of bridges to services. So any service that has an API if they don’t directly implement the Web Intents specification you can actually build an API that might integrate with the Web Intents API to integrate with their service.

保罗:是的。 因此,自己看一下实际上很容易。 如果您通过Chrome中的Web Intents调用操作,则会获得已安装的应用程序列表或来自Chrome网上应用店本身的建议。 所以,我们有几个。 我的意思是,我们已经有了WordPress。 我已经写了通往服务的桥梁。 因此,任何具有API的服务(如果他们没有直接实现Web Intents规范的话)实际上都可以构建一个可以与Web Intents API集成以与其服务集成的API。

But if you actually invoke an intent from Chrome, what happens is you get a list of services that you have installed. You’ve also got a list of suggestions of services that the Chrome web store knows can fulfill this action. So, let me just jump into the Chrome web store and we can get a little list out, which is kind of cool. WordPress is probably the biggest, people we know so far. Psykopaint has got some edit integration as well, which is pretty cool.

但是,如果您实际上是从Chrome调用一个意图,那么您将获得已安装的服务列表。 您还可以获得Chrome网上应用店知道可以完成此操作的服务建议列表。 因此,让我跳入Chrome网上应用店,我们会列出一些清单,这很酷。 到目前为止,WordPress可能是最大的了。 Psykopaint也具有一些编辑集成,这非常酷。

Then we have RSS Feed Reader, which is a developer. I think he’s from Yorick. A little bit of backstory about RSS feeder. We recently integrated the ability to view RSS feeds inside Chrome in your preferred applications rather than just view in the XML. The RSS Feed Reader guy, he’s got 189,000 users now from his application, which I think is up 100,000 users from the time that we implemented and kind of deployed the View Web Intent to Chrome.

然后是开发人员RSS Feed Reader。 我认为他来自Yorick。 关于RSS feeder的一些背景故事。 我们最近整合了在您喜欢的应用程序中在Chrome中查看RSS feed的功能,而不仅仅是在XML中查看。 RSS Feed Reader的家伙,他的应用程序现在有189,000个用户,我认为与我们实施和将View Web Intent部署到Chrome的时间相比,该用户已经增加了100,000个。

Louis: Right.

路易斯:对。

Paul: So, he’s got some good usage out of that. It’s pretty good. Then we’ve got a couple of other people going on. But because this is experimental at the moment and because we haven’t got all integrations inside Chrome that we want just yet, I’ve kind of been doing some of the integrations to things like Blogger via an extension, Instapaper, Gmail and those types of things. But that’s because they open and offer a third-party service, an API that you can integrate via Web Intents.

保罗:所以,他对此有很好的用法。 这个很不错。 然后,我们还有其他几个人在继续。 但是由于目前尚处于试验阶段,并且由于我们还没有想要的Chrome内所有集成,因此我一直在通过扩展程序,Instapaper,Gmail和这些类型对Blogger等进行某些集成东西的。 但这是因为它们打开并提供了第三方服务,您可以通过Web Intents集成该API。

They don’t necessarily support Web Intents directly, but because they’ve got an API you can build that yourself. So, as we get more applications more and more people are going to come through and start to integrate, build web applications that support Web Intents. So, yeah, it’s going quite well so far.

他们不一定直接支持Web Intent,但是因为它们具有API,所以您可以自己构建它。 因此,随着我们获得更多的应用程序,越来越多的人将经历并开始集成,构建支持Web Intent的Web应用程序。 所以,是的,到目前为止进展顺利。

Louis: Right. On the browser side outside of Chrome, is there movement or interest from other browser makers in implementing this?

路易斯:对。 在Chrome之外的浏览器方面,其他浏览器制造商是否有实施此计划的动力或兴趣?

Paul: There’s a lot of talk at the moment going on in specification groups and because this is kind of quite early on I think a lot of it’s going to be led by the success of implementations and things like that as well. We’re actively working on the groups with the WATWG and the W3C themselves to actually make sure that we have a common consensus and standard that other browser vendors can implement. We’re actively talking to them and we’re all going through, I suppose, the motions of finding out kind of what the requirements are for each individual vendor’s needs for connecting applications together.

保罗:目前在规范组中有很多讨论,因为这还为时过早,我认为其中很大一部分将由实现的成功以及诸如此类的事情引导。 我们正在与WATWG和W3C自己进行积极合作,以确保我们拥有其他浏览器供应商可以实施的共识和标准。 我想我们正在积极地与他们交谈,并且正在经历寻找关于每种供应商将应用程序连接在一起的需求的要求的动议。

Louis: Right.

路易斯:对。

Paul: So, right now it’s Chrome. The interesting thing about Chrome is that it’s built on the back of Web Kit and all the work we’ve been doing has been going into Web Kit. So, feasibly it’s possible for another browser who’s based on Web Kit to implement Web Intents because it’s common code across multiple browsers. But those vendors have to choose to implement it. It’s not going to be on by default and available to Web Kit straight away. They have to do some little work in the back end to kind of store the registrations and things like this. But it’s in Web Kit so feasibly other browser vendors who implement the Web Kit interface can actually support Web Intents if they choose.

保罗:所以,现在是Chrome。 关于Chrome的有趣之处在于它建立在Web Kit的背面,并且我们一直在做的所有工作都已经在Web Kit中进行了。 因此,可能可行的是,基于Web Kit的另一个浏览器可以实现Web Intent,因为它是跨多个浏览器的通用代码。 但是那些供应商必须选择实施它。 默认情况下不会启用它,并且Web Kit可以立即使用它。 他们必须在后端做一些小工作来存储注册信息和诸如此类的东西。 但这是在Web Kit中,因此,可以选择实现Web Kit界面的其他浏览器供应商,实际上可以支持Web Intent。

Louis: Right, and in the case of Chrome the idea of Web Intents is, as you mentioned, a little bit sort of backed onto the Chrome web store. So if I don’t have an application registered to handle a specific intent it’s easy for Chrome to provide a list of suggestions from the Chrome web store?

路易斯:对,就Chrome而言,正如您提到的,Web Intents的想法有点支持Chrome网上商店。 因此,如果我没有注册用于处理特定意图的应用程序,那么Chrome很容易从Chrome网上应用店中提供建议列表?

Paul: Yeah.

保罗:是的。

Louis: But in the event where you look at another browser that doesn’t have an app store sort of attached to it, how would that work? Is it, you would go to a website like Gmail and it would provide a link to tell the browser that it’s capable of handling a type of intent, and once that’s registered then the browser remembers it?

路易斯:但是,如果您看到的是另一个没有附加应用商店的浏览器,那怎么办? 是的,您会转到Gmail之类的网站,并且会提供一个链接来告诉浏览器它能够处理一种类型的意图,一旦注册,浏览器就会记住它。

Paul: Pretty spot on, actually. When we did the first proposal for Web Intents we basically said we believe that the biggest benefit that we’ll get from Web Intents is not just the ability to connect two applications together and deliver the data. It’s actually to be able to understand on the web openly the capabilities of applications. So, we proposed an intent tag, which basically describes the action type, the verb essentially, the thing that the user wants to do – share a link, edit things, and the data type as well. So, the idea is that a user agent or a browser or a search engine could come along and aggregate web applications’ functionality, which they can’t do at the moment. There’s really no way to discover the capabilities of applications, like kind of at a semantic level.

保罗:确实不错。 当我们为Web Intents提出第一个建议时,我们基本上说过,我们相信Web Intents所带来的最大好处不仅仅是将两个应用程序连接在一起并交付数据的能力。 实际上是能够在网络上公开了解应用程序的功能。 因此,我们提出了一个意图标签,该标签基本上描述了动作类型,本质上的动词,用户想要做的事情–共享链接,编辑内容以及数据类型。 因此,想法是用户代理,浏览器或搜索引擎可以出现并聚合Web应用程序的功能,而这是他们目前无法做到的。 实际上没有办法发现应用程序的功能,就像在语义级别上那样。

Louis: Right.

路易斯:对。

Paul: So, the interesting thing is we have this intent tag, which we’re still talking with the W3C and kind of all of the browser venders at the moment to try and work out their semantics. Because there are thoughts that it should in link rel or meta tags, and we’ve got very set reasons why they shouldn’t be and we think a succinct tag that just is there to define the capabilities of applications is a better solution. But that’s the goal, is we want browsers, search engines, all these different types of people to be able to understand the capabilities of applications and not really just to be siloed in the Chrome web store.

Paul:所以,有趣的是,我们有这个intent标签,我们仍在与W3C以及目前所有浏览器供应商进行交流,以尝试确定其语义。 因为有人认为应该在链接rel或meta标记中,并且我们已经设置了为什么不应该这样做的充分理由,并且我们认为仅存在一个用于定义应用程序功能的简洁标记是更好的解决方案。 但这就是目标,我们希望浏览器,搜索引擎,所有这些不同类型的人都能够理解应用程序的功能,而不仅仅是在Chrome网上商店中孤单。

The reason why we use the Chrome web store right now is because it’s already got a whole set of applications in there. Developers inside the Chrome web store, they want to be able to find other applications that support kind of capabilities that they need themselves. It’s great in that it’s at the Chrome web store, but ideally we would have it inside another search engine, or it doesn’t matter.

我们之所以现在使用Chrome网上应用店,是因为那里已经有很多应用程序。 Chrome网上应用店内部的开发人员希望能够找到其他支持自己需要的功能的应用程序。 很棒,因为它在Chrome网上商店中,但是理想情况下,我们可以将其放在另一个搜索引擎中,或者不要紧。

Because I know Mozilla are quite big on having their own stores and having kind of the ability for a user to say, “Well, I’m going to start up a web store and you can kind of deploy your applications in here.” If you can understand the capabilities of applications, then there’s absolutely nothing stopping you from doing that inside those types of stores as well.

因为我知道Mozilla在拥有自己的商店以及让用户说:“好吧,我将要建立一个网上商店,您可以在这里部署应用程序”方面拥有很大的能力。 如果您能够理解应用程序的功能,那么也绝对不会阻止您在这些类型的商店中执行此操作。

Louis: Right. That’s actually really interesting.

路易斯:对。 这真的很有趣。

Paul: Yeah.

保罗:是的。

Louis: So, what you’re saying – correct me if I’m wrong here – is that maybe in some way I mentioned earlier that some aspects of Web Intents reminded me of micro formats and this is perhaps another point in the same way that the Google search engine can use micro formats to provide things like rich snippets in search results. If a web application provides an intent that it’s capable of handling in a common specification, then there’s nothing stopping search engines from finding all the sites on the internet that are capable of editing photos via Web Intents?

路易斯:所以,您要说的是-如果我在这里写错了,请纠正我-是,也许以我之前提到的某种方式,Web意图的某些方面使我想起了微格式,这也许是另一点, Google搜索引擎可以使用微格式在搜索结果中提供丰富的摘要等内容。 如果Web应用程序提供了可以按照通用规范处理的意图,那么有什么能阻止搜索引擎找到Internet上所有能够通过Web Intent编辑照片的站点?

Paul: Yeah. I think that’s a key point is if you search on any search engine for image editing applications, you don’t get a list of applications that can support image editing. You get kind of reviews and a whole load of things like that. So, if you can start to understand the capabilities of applications, you’re quite right. You can do those types of things.

保罗:是的。 我认为这是关键点,如果您在任何搜索引擎上搜索图像编辑应用程序,就不会得到可以支持图像编辑的应用程序列表。 您会得到一些评论以及诸如此类的全部内容。 因此,如果您可以开始理解应用程序的功能,那是对的。 您可以做这些类型的事情。

Louis: That’s a really interesting point, and one that I had not considered before. That’s really definitely not only as a way of allowing applications to integrate, as you said. But also just to allow them to describe their functionality in a machine readable format, as it were.

路易斯:这是一个非常有趣的观点,也是我以前从未考虑过的观点。 正如您所说,这确实绝对不仅是允许应用程序集成的一种方式。 但这也只是为了允许他们以机器可读的格式描述其功能。

Paul: Yeah, exactly. There’s also talk about, do you want kind of accessibility engines to be able to understand that they’re interacting with an application and not just a website, and things like that as well. So there’s the opportunity for it to kind of just go beyond search engines and you go into different types of user agents that need to understand that they’re interacting with applications.

保罗:好的。 也有讨论,您是否希望某种可访问性引擎能够理解它们正在与应用程序(而不只是网站)进行交互,以及类似的事情。 因此,它有机会超越搜索引擎,您会进入不同类型的用户代理,这些代理需要了解他们正在与应用程序进行交互。

Louis: Right. That’s a really interesting point. So, I want to close just maybe stepping back and getting sort of a bigger picture of you. You’ve been working on Web Intents for some time. What are you most looking forward to in the world of Web Intents and what’s most exciting to you in this space?

路易斯:对。 这是非常有趣的一点。 因此,我想结束一下,也许只是退后一步,让您对您有所了解。 您从事Web Intent已有一段时间了。 在Web Intents领域中,您最期待的是什么?在此领域中,最让您兴奋的是什么?

Paul: So, my whole goal behind Web Intents, and it’s a relatively long story and it’s kind of interesting. I was on a plane two years ago and I was going between Moscow and Prague, I think with Mike Mahemoff at the time. We were talking about the ability to try and connect applications together. It turned out there were a couple of people in Google as well, also kind of trying to think about the same thing as well, which ultimately led into this idea of, “Well, we think we can build this into the browser.”

保罗:所以,我的整个目标是实现网络意图,这是一个相对较长的故事,而且很有趣。 两年前,我当时在飞机上,当时我正与莫斯科·布拉格(Mike Mahemoff)往来于莫斯科和布拉格之间。 我们正在谈论尝试将应用程序连接在一起的能力。 事实证明,Google中也有很多人,他们也试图考虑同一件事,最终导致了这样一个想法:“好吧,我们认为我们可以将其内置到浏览器中。”

The ultimate goal for me was I just want to make it easy for applications to be able to connect to each other. Right now we’re starting with web applications. So we have two applications inside the browser and the only way that they can easily talk to each other at the moment is going through a server. What we’re saying with Web Intents is, “You have these two things in the tabs and they’re right next to each other on the user’s machine. Why can’t we send the data between application and service and then send it back without even having to really touch the server if we don’t want to?”

对我而言,最终目的是使应用程序能够轻松相互连接。 现在,我们从Web应用程序开始。 因此,我们在浏览器中有两个应用程序,并且目前它们可以轻松相互通信的唯一方法是通过服务器。 我们使用Web Intents的意思是,“您在选项卡中有这两件事,它们在用户计算机上紧挨着。 如果我们不想,为什么我们不能在应用程序和服务之间发送数据,然后又将它们发送回去,而无需真正接触服务器?”

That’s kind of cool and that’s what we started off with when we were talking about Web Intents. If you look at the discussions that happen on the public Web Intents group, and the W3C specification, the members of the W3C group, they’re kind of interested in going a little bit beyond just kind of the web browser, if that makes sense. So, what they’re trying to say is that if you have an image or a video inside a web page, why can’t you interact with the devices around your computer, around where you are right now?

这很酷,这就是我们在谈论Web Intents时所开始的。 如果您查看在公共Web Intents组和W3C规范(W3C组的成员)上进行的讨论,那么,他们很有兴趣超出Web浏览器的种类,如果有的话。 因此,他们要说的是,如果网页中有图像或视频,为什么不能与计算机周围的设备交互,或者与周围的设备交互?

So if you’re on your home network and you’re connected to an internet connected TV, why can’t you just send the video that you’re looking at on your webpage directly to the TV? Those types of integrations which we can enable through the discovery mechanisms of Web Intents and the ease of being able to deliver data between two services. That would be really cool. I mean, there are a whole lot of things I can’t even think about at the moment which we could potentially enable around the house.

因此,如果您在家庭网络中,并且已连接到可连接互联网的电视,为什么不直接将网页上正在查看的视频直接发送到电视呢? 我们可以通过Web Intent的发现机制以及在两个服务之间轻松传递数据的便利性来实现这些类型的集成。 那真的很酷。 我的意思是,目前我们甚至可能无法想到很多事情,而我们有可能在房子周围启用这些功能。

So, you can stream music to your home media center. You can send a video to your TV. There are a whole lot of things that we’re looking at on kind of the internet of things at the moment which could be, in theory, kind of hooked up with and UPnP and the Web Intents kind of working together. So for me, the kind of jumping outside the browser is really exciting and kind of one of the areas where I’m not very experienced in.

因此,您可以将音乐流式传输到家庭媒体中心。 您可以将视频发送到电视。 目前,我们正在通过物联网来研究很多事情,从理论上讲,这可能与UPnP和Web Intents紧密合作。 因此,对我来说,跳出浏览器真的很令人兴奋,这也是我经验不足的领域之一。

But some of the guys who’ve been talking about it on the W3C, it could be a game changer and a complete step change from the way that we’ve developed applications that interact with our surroundings. So, there’s a good potential around that, I think, at the moment and it’s quite exciting to see.

但是一些在W3C上一直在谈论它的家伙,它可能会改变游戏规则,与我们开发与周围环境互动的应用程序的方式完全不同。 因此,我认为目前有很大的潜力,看到这一点非常令人兴奋。

Louis: That is, indeed, very exciting stuff. I really look forward to seeing what the future holds in this space and I want to thank you very much for taking the time to come on the show and sort of clear up some of these concepts for me and for the listeners.

路易斯:确实,这是非常令人兴奋的事情。 我非常期待看到这个领域的未来,并非常感谢您抽出宝贵时间参加展览,并为我和听众澄清了其中的一些概念。

Paul: Yeah. Thank you.

保罗:是的。 谢谢。

Louis: If listeners want to keep up with Web Intents or with your work, where should they go?

路易斯:如果听众想跟上网络意图或您的工作,他们应该去哪里?

Paul: Cool, so we have a couple of places that you can go to find out what’s happening. I try to do it on my blog Paul.Kinlan.me or my Twitter account or my Google Plus page. My twitter account is @Paul_Kinlan. I think the best place to go is, if you’re really interested in the nitty gritty of the specifications it’s Public Intents on the W3C. If you just want to know how this can help you build applications and kind of see examples and other applications, and all this type of thing, we’ve got a Google Plus page, +Web Intents, where we try and post a couple of items a week which are interesting to developers as well.

保罗:太好了,所以我们有几个地方可以找到正在发生的事情。 我尝试在我的博客Paul.Kinlan.me或我的Twitter帐户或我的Google Plus页面上执行此操作。 我的推特帐户是@Paul_Kinlan 。 我认为最好的去处是,如果您真的对规范的精髓感兴趣,那就是W3C上的Public Intents。 如果您只是想知道这如何帮助您构建应用程序,并查看示例和其他应用程序,以及所有这类内容,我们有一个Google Plus页面+ Web Intent,我们尝试在其中发布几个每周对开发人员也很有趣的项目。

So, if you’re really interested in what’s happening there, hit us up on the Web Intents. The biggest thing for me is this isn’t about kind of us thinking, “We’re going to get this right to start off with.” We need developer feedback and developers building on this application API, testing it out, telling us what works, telling us what doesn’t work so that we can help refactor the API. The thing that’s happened with Web Intents right now is that if you’re actually on the specification group there are some changes going through that have been directly fed back from real world usage from web developers, not standards implementers, web developers to make this API better.

因此,如果您真的对那里发生的事情感兴趣,请在Web Intents上与我们联系。 对我来说,最大的事情是,这与我们的想法无关,“我们将一开始就正确无误。” 我们需要开发人员反馈,开发人员需要在此应用程序API上进行构建,进行测试,告诉我们什么有效,告诉我们什么无效,以便我们可以帮助重构API。 现在,Web Intents发生的事情是,如果您实际上是在规范组中,则正在经历一些更改,这些更改已直接从Web开发人员(而不是标准实施者,Web开发人员)的实际使用中反馈,以制作此API更好。

So, the more feedback we can get from people building on top of this API, the better it will be for developers in the long run. Just get in contact with us however you can. That’d be good.

因此,从这个API之上构建人员可以得到的反馈越多,从长远来看,对开发人员来说越好。 只要可以与我们联系即可。 那就好

Louis: Absolutely. Well, thanks again Paul, it’s been great having you.

路易斯:绝对。 好了,再次感谢Paul,很高兴收到您。

Paul: Well, thank you very much.

保罗:很好,非常感谢。

Louis: Thanks you.

路易斯:谢谢。

And thanks for listening to this week’s episode of the SitePoint Podcast. I’d love to hear what you thought about today’s show, so if you have any thoughts or suggestions just go to sitepoint.com/podcast and you can leave a comment on today’s episode, you can also get any of our previous episodes to download or subscribe to get the show automatically. You can follow SitePoint on Twitter @sitepointdotcom, that’s sitepoint d-o-t-c-o-m, and you can follow me on Twitter @rssaddict. The show this week was produced by Karn Broad, and I’m Louis Simoneau, thanks for listening and bye for now.

感谢您收听本周的SitePoint播客。 我很想听听您对今天节目的看法,因此,如果您有任何想法或建议,请访问sitepoint.com/podcast ,您可以对今天的节目发表评论,也可以下载我们以前的任何节目或订阅自动显示节目。 您可以在Twitter @sitepointdotcom (即站点点dotcom)上关注SitePoint ,也可以在Twitter @rssaddict上关注我。 本周的节目是由Karn Broad制作的,我是Louis Simoneau,感谢您的收听和再见。

Audio Transcription by SpeechPad.

通过SpeechPad进行音频转录

Theme music by Mike Mella.

Mike Mella的主题音乐。

Thanks for listening! Feel free to let us know how we’re doing, or to continue the discussion, using the comments field below.

谢谢收听! 欢迎使用下面的评论字段让我们知道我们的状况,或者继续讨论。

翻译自: https://www.sitepoint.com/podcast-176-web-intents-in-depth-with-paul-kinlan/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值