简体   繁体   English

EmberJS Tech-Stack for Search Engine可抓取应用程序

[英]EmberJS Tech-Stack for Search Engine crawlable Apps

I read quite some stuff about Client-Side JavaScript Apps and search engine bot crawling approaches. 我读了很多关于客户端JavaScript应用程序和搜索引擎机器人爬行方法的东西。 I found two general approaches: 我发现了两种一般方法:

Workflow 1: 工作流程1:

Precondition: The whole web app degrades gracefully and is usable without JavaScript. 前提条件:整个Web应用程序优雅地降级,无需JavaScript即可使用。 So it is visible for search engine bots to crawl. 因此搜索引擎机器人可以抓取它。

  1. User comes from a google search to a specific topic 用户来自谷歌搜索特定主题
  2. The topic is loaded as fast as possible in plain html 在纯HTML中尽可能快地加载主题
  3. JS App Framework is loaded in the background JS App Framework在后台加载
  4. As soon as it's ready JS App Framework takes over all the actions and routes and so on. 一旦准备就绪,JS App Framework就会接管所有操作和路由等等。

Workflow 2: 工作流程2:

Precondition: The server backend is designed after Google's ajax-crawling guides ( https://developers.google.com/webmasters/ajax-crawling ) and returns to escaped_fragment urls (eg www.example.com/ajax.html?_escaped_fragment_=key=value ) plain html. 前提条件:服务器后端是在Google的ajax爬行指南( https://developers.google.com/webmasters/ajax-crawling )之后设计的,并返回到escaped_fragment网址(例如www.example.com/ajax.html?_escaped_fragment_=key = value)普通的HTML。 As far as I understood something like http://phantomjs.org/ could be used for that to make sure there is no frontend code duplication. 据我所知,可以使用http://phantomjs.org/这样的东西来确保没有前端代码重复。

  1. Google shows the ajax URL in their results Google会在结果中显示ajax网址
  2. A request is made using the ajax url #! 使用ajax url#发出请求!
  3. The emberjs application is initialized and depending on the URL the desired state is loaded. 初始化emberjs应用程序,并根据URL加载所需的状态。

Question: 题:

What should a crawlable emberjs application stack look like to offer server side rendering for search engine bots and frontend js-framework goodness? 可抓取的emberjs应用程序堆栈应该为搜索引擎机器人和前端js框架的优点提供服务器端渲染? What is recommended by the emberjs core developers to achieve this? emberjs核心开发人员推荐什么来实现这一目标? (Eg. Node + Emberjs + phantomjs +- x OR Rails + Emberjs + y OR Playframework + Z)? (例如,Node + Emberjs + phantomjs + - x OR Rails + Emberjs + y OR Playframework + Z)?

I know there might be a lot of ways to get there but I feel it would be good to use stackoverflow to filter out common approaches. 我知道可能有很多方法可以实现,但我觉得使用stackoverflow过滤掉常用方法会很好。

Sidenote: 边注:

I already had a look at some JS frameworks that want to create such a full stack out of the box. 我已经看过一些想要创建这样一个完整堆栈的JS框架。 To name these here: 在这里命名:

I especially ask about emberjs because I like their approach and I think the team behind it is definitely capable of building one of the best frameworks. 我特别询问emberjs因为我喜欢他们的方法,我认为它背后的团队肯定能够建立一个最好的框架。

I have yet to see anything pre-existing like this built for emberjs. 我还没有看到为emberjs建造的任何预先存在的东西。 There are however early attempts to integrate ember as a server-side module for node. 然而,早期尝试将ember集成为节点的服务器端模块。

Something to check out is derby.js , which actually does workflow #1. 需要检查的是derby.js ,它实际上是工作流程#1。 You might want to look at their codebase, and if you are up to the task, adapt it for ember. 您可能希望查看他们的代码库,如果您完成任务,请将其调整为ember。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM