[okfn-labs] Architecture for a data-driven web app

Vitor Baptista vitor at vitorbaptista.com
Wed Aug 29 22:11:14 UTC 2012


Hi Friedrich,

I have a similar problem with retratodaviolencia.org. All data is loaded
using ajax, so Google can't crawl it.

I haven't solved it yet, but from what I searched, the best approach is:
  * Use pushState/history.js (#! is kind of deprecated);
  * Add a sitemap.xml;
  * If you get a request coming from Googlebot, render de page server-side
and return it.

Obviously, the third point is the hardest. It seems that using
http://phantomjs.org/ is the easier way to do it.

https://github.com/ekesken/crawlajax might give you some ideas.

Cheers!
Vítor.

2012/8/29 Friedrich Lindenberg <friedrich.lindenberg at okfn.org>

> Hi all,
>
> I'm working on a web app for some read-only data which should be
> browsable on the web. The whole thing has about 10 domain objects,
> which I'm already exposing through a simple, RESTish API. Now I want
> to make a user interface, which I would like to have two properties:
>
> a) It should be dog-fooding the API
> b) It should be easy to crawl and index for search engines.
>
> I'm not quite sure how to build this: if I use only browser-based
> templating, Google will not index thing properly and I may not get
> working URLs for entries, even using the HTML5 history stuff.
>
> This means the cleanest setup seems to be to build another app, using
> API output but generating HTML server-side. I may be able to make a
> nicer UX by using node.js and sharing some template rendering with a
> browser-based app (like GitHub's file browser).
>
> Is there another way? I'd really like to avoid a full proxy app if
> possible, but can't come up with a good model.
>
> Cheers,
>
>  - Friedrich
>
> _______________________________________________
> okfn-labs mailing list
> okfn-labs at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/okfn-labs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/okfn-labs/attachments/20120829/d9aaed53/attachment-0002.html>


More information about the okfn-labs mailing list