logoalt Hacker News

lbreakjailast Thursday at 9:48 PM2 repliesview on HN

So now you have presentation logic, tightly coupled, spread over two places. You need to jump between two codebases to even have a clue about what is rendering on the page.

There's an example on their website where the header of a table is defined in the frontend, and the body is returned by the backend. If I wanted something as simple as switching the order of the columns, I'd actually need to create a new version of my backend endpoint, release it, change the frontend to use the new endpoint, then delete the old one. That sounds crazy to me.


Replies

turtlebitslast Thursday at 11:47 PM

So what if you have presentation logic in two places, if it isn't necessary, remove the second instance?

There are so many gains by not using a frontend. You've greatly reduced your site size, removed duplicated logic, a shitload of JS dependencies, and an unnecessary build step.

adamzwassermanyesterday at 2:31 AM

I use nested templates the same way React uses nested components. The key is cascading the context (like props) down the hierarchy. Column order change? One edit in the table template; everything that includes it gets the update.

The "header frontend / body backend" split is a choice, not a requirement. I wouldn't make that choice.

show 1 reply