Live data from Hacker News

Show HN: Shunter – a Node.js application to read JSON and translate it into HTML

github.com

1–10 of 13 posts

Re: Show HN: Shunter – a Node.js application to read JSON and translate it into HTML

#3
post #2

What problem does it solve ? is it XSLT for JSON ?

Seems to me that its purpose is to be a server-side pre-renderer for SPAs, i.e. a self-hosted prerender.io.

Might also be cool if you're running a WordPress site and you want the front-end to be an SPA, but you don't want the SEO/page speed hit. Just use WP-API and plug it into Shunter.

Re: Show HN: Shunter – a Node.js application to read JSON and translate it into HTML

#4
post #2

What problem does it solve ? is it XSLT for JSON ?

I haven't heard it described like that, but in a sense I guess. At Nature (where it was developed) we use it to decouple our front and back ends. So when we work on a feature we agree on a JSON structure beforehand and work in parallel. It also gives us the ability to work in exactly the same way on the front-end no matter which back-end system is producing the JSON. This is awesome if you're a company that has applications written in quite a few languages

Re: Show HN: Shunter – a Node.js application to read JSON and translate it into HTML

#5
post #2

What problem does it solve ? is it XSLT for JSON ?

I don't see it solving one problem so much as lots of them.

With a decoupled front-end you can make applications which are much more flexible for dealing with change. Imagine swapping out the entire backend application, or completely re-writing the front-end - you can easily do either since the integration between the two is formalised and documented by the json contracts.

That also means a new front-end developer can clone down a Shunter application and start modifying templates with confidence it's not going to break anything without having to run the backend, services, mock db, etc. Great for working in big teams, or ones that aren't co-located.

It can also run a single unified front-end across multiple backend applications (for example if your rails application wants to share a common layout etc. with your Wordpress-driven blog section, or whatever ecommerce backend is driving your 'shop').

Re: Show HN: Shunter – a Node.js application to read JSON and translate it into HTML

#6
After reading the docs, I'm still not quite sure what Shunter does.

I do understand the use scenario. I've done some sites with this same model using Prismic.io as the backend. It's a nice customizable CMS-style system that provides JSON APIs, which a Node.js app then translates into HTML (basically just filling out templates with data selected from the JSON). This has worked well and I've been really quite happy with Prismic.

So it looks like I could be using Shunter for this scenario, but I'm not sure what the benefit would be over my hand-rolled Node apps. Can someone illuminate?

Re: Show HN: Shunter – a Node.js application to read JSON and translate it into HTML

#7
post #2

What problem does it solve ? is it XSLT for JSON ?

I don't see it solving one problem so much as lots of them. With a decoupled front-end you can make applications which are much more flexible for dealing with change. Imagine swapping out the entire backend application, or completely re-writing the front-end - you can easily do either since the integration between the two is formalised and documented by the json contracts. That also means a new front-end developer ca…

[deleted]

Re: Show HN: Shunter – a Node.js application to read JSON and translate it into HTML

#8
post #6

After reading the docs, I'm still not quite sure what Shunter does. I do understand the use scenario. I've done some sites with this same model using Prismic.io as the backend. It's a nice customizable CMS-style system that provides JSON APIs, which a Node.js app then translates into HTML (basically just filling out templates with data selected from the JSON). This has worked well and I've been really quite happy wit…

This probably indicates that we need to do a bit of work on our documentation :) You're right about the general purpose - however Shunter also handles front-end assets: images, CSS, and JavaScript, as well as making it easy to extend the rendering engine.

In terms of benefits of using Shunter over a home-rolled solution, the same question could/should be asked of any framework. Shunter is very well tested, has been used in production on a large site for a number of years, and is used to serve hundreds of thousands of requests. It will also be supported by a large development team for the foreseeable future.

Re: Show HN: Shunter – a Node.js application to read JSON and translate it into HTML

#9
post #8
post #6

After reading the docs, I'm still not quite sure what Shunter does. I do understand the use scenario. I've done some sites with this same model using Prismic.io as the backend. It's a nice customizable CMS-style system that provides JSON APIs, which a Node.js app then translates into HTML (basically just filling out templates with data selected from the JSON). This has worked well and I've been really quite happy wit…

This probably indicates that we need to do a bit of work on our documentation :) You're right about the general purpose - however Shunter also handles front-end assets: images, CSS, and JavaScript, as well as making it easy to extend the rendering engine. In terms of benefits of using Shunter over a home-rolled solution, the same question could/should be asked of any framework. Shunter is very well tested, has been u…

Thanks! I'll keep it in mind and will try Shunter next time I do one of the Prismic-backed sites.
Post reply on HN