Hacker News new | ask | show | jobs
by trb 5334 days ago
Aside from the API having no access restrictions (and therefore has to be internal), it's providing pure data, no html.

The template rendering would have to be done in JS, which means that the templates have to be delivered to the browser. Either you load every template when you need it or you have to transfer all templates on page load. The first case has no advantage over a simple application layer on the server and the second increases page load time.

Thought further, some older mobile phones might have a hard time rendering complex templates in JS, so that might be another factor.

He should just do what best fits his requirements, and that might require a simple application layer in front of the api.