Live data from Hacker News

We've Open-sourced Rendr

nerds.airbnb.com

41–50 of 56 posts

Re: We've Open-sourced Rendr

#41
post #5

Posts like this makes me think Airbnb is a awesome place to work. Sharing is caring!

I want to see them start open sourcing more of their i18n and translation tools. Most people aren't aware of this, but one of the coolest problems you can work on at AirBnB is building out tools and features that let two people, who don't speak a common language between them, transact with one another. There is no other startup I know of as vested in solving this problem.

Indeed! We've started with polyglot.js[0], an i18n helper for Node.js and client-side javascript, but there's definitely a lot going on besides this.

[0] https://github.com/airbnb/polyglot.js

Re: We've Open-sourced Rendr

#43
post #17

IS IT FASTER? I assume Node/JavaScript will render HTML faster than ruby/rails. Do you have benchmarks?

Node/JS won't necessarily render HTML faster. There are libraries to bring DOM interaction into NodeJS, there's also PhantomJS, and previous attempts like Aptana's server. All of these have been very heavy, and didn't scale well. PhantomJS is probably the best current option, but doesn't tie directly to Node, and still not as fast as string based templating.

Regarding string based templates, they are really implementation dependant, and there are tons of options available. Right now some common ones for NodeJS are probably Bliss (Razor inspired), Nunjucks (jinja2 inspired), Mustache/Handlebars and Jade (Haml inspired), and EJS (similar to PHP, or classic ASP).

Probably the most broadly available is Mustache, which has implementations in about every language under the sun, and probably could make a decent benchmark to compare string processing in different languages.

All of the above simply bring me, to use what you feel comfortable with and what feels right.

Re: We've Open-sourced Rendr

#44
This is an awesome solution for folks using Backbone and who don't mind a tight framework coupling.

But if you're not on Backbone, or don't want to add another constraint to how your app is built, it's pretty easy to set up your own PhantomJS server; I presented on this very topic at TXJS this week[1], and created a library[2] that makes it a snap to set up.

[1] http://www.flickr.com/photos/tr4nslator/sets/721576332659462...

[2] https://github.com/jed/rndr.me

Re: We've Open-sourced Rendr

#45

Wow, looks very impressive from my quick look over it. These days, there are so many JavaScript frameworks for web development, it's starting to make my head spin a little bit. Does anyone have a link to a good rundown of where everyone stands?

What do you mean by "where everyone stands"?

I agree that there are so many JS libs/frameworks now that it is hard to keep up with! I actually started on a super simple script for myself to compare git repos general stats.

Re: We've Open-sourced Rendr

#46

Anyone interested in something like this should also check out PJAX. Push State and AJAX. https://github.com/defunkt/jquery-pjax This is what GitHub uses between tabs on its Pull Requests page. I love how simple the implementation is. Your app still needs to follow the convention of having links going to different pages with URLs. I know it's not "single page" and the interaction is not that "rich." But it's nice bec…

That is how Backbone and all other current frameworks work.

No it isn't.

Re: We've Open-sourced Rendr

#47

Earlier quoted context omitted.

That is how Backbone and all other current frameworks work.

No it isn't.

Care to explain? They use pushState or hashes for routing, and load data via XHR. If you are using pushState it is assumed that the URL must exist on the server.

Re: We've Open-sourced Rendr

#48

Wow, looks very impressive from my quick look over it. These days, there are so many JavaScript frameworks for web development, it's starting to make my head spin a little bit. Does anyone have a link to a good rundown of where everyone stands?

Being a JS developer must be the pits - you need to run really fast just to keep up.

Re: We've Open-sourced Rendr

#49

Earlier quoted context omitted.

No it isn't.

Care to explain? They use pushState or hashes for routing, and load data via XHR. If you are using pushState it is assumed that the URL must exist on the server.

Having the URL exist on the server isn't the same as serving a rendered page from the URL, which is what most SPAs do. You could just rewrite all URLs in a website to point back to your index.html, then have the client side router initialize the app from the URL parameters. If you don't have javascript turned on (e.g. googlebot) then all you'll see is a blank page

Re: We've Open-sourced Rendr

#50
post #16

Earlier quoted context omitted.

Does this mean Rendrjs applications will run in a JavaScript disabled browser? That would be a big win!

Yep! Because links use full URLs which get intercepted by JavaScript, if JS is disabled, you can still navigate around the app, getting full HTML from the server. Of course, any client-specific code wouldn't run (slideshows, etc).

So far, this is the most convincing argument I've heard for Rendr.
Post reply on HN