Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EmberJS Tech-Stack for Search Engine crawlable Apps

I read quite some stuff about Client-Side JavaScript Apps and search engine bot crawling approaches. I found two general approaches:

Workflow 1:

Precondition: The whole web app degrades gracefully and is usable without 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
  3. JS App Framework is loaded in the background
  4. As soon as it's ready JS App Framework takes over all the actions and routes and so on.

Workflow 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 (e.g. www.example.com/ajax.html?_escaped_fragment_=key=value ) plain 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.

  1. Google shows the ajax URL in their results
  2. A request is made using the ajax url #!
  3. The emberjs application is initialized and depending on the URL the desired state is loaded.

Question:

What should a crawlable emberjs application stack look like to offer server side rendering for search engine bots and frontend js-framework goodness? What is recommended by the emberjs core developers to achieve this? (Eg. 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.

Sidenote:

I already had a look at some JS frameworks that want to create such a full stack out of the box. To name these here:

  • http://derbyjs.com/ (nice approach but still alpha)
  • http://batmanjs.org/ (not clear how production ready (specially the backend))
  • http://www.firebase.com/ (somehow different but also interesting if they get security right)
  • http://meteor.com/ (also preview state)
  • http://developer.yahoo.com/cocktails/mojito/

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.

like image 631
Bijan Avatar asked Aug 22 '12 09:08

Bijan


1 Answers

I have yet to see anything pre-existing like this built for emberjs. There are however early attempts to integrate ember as a server-side module for node.

Something to check out is derby.js, which actually does workflow #1. You might want to look at their codebase, and if you are up to the task, adapt it for ember.

like image 185
Kostia Avatar answered Sep 30 '22 03:09

Kostia