God…it’s insane!
Xuan Huang
32

Rendering via JSX, where the HTML is actually in JS code is considered an anti-pattern as the view is coupled to presentation logic. With templates, the view controller aggregates model states into a scope and passes that scope to the template. This gives MV* structural patterns based on templates a much cleaner separation of concerns. But that is what has become the hot debate, a loose interpretation of “separation of concerns.” In the past, with JSP, ASP and PHP, huge efforts were made to move away from procedural rendering. Now that there is 1…* binding in the client and streaming data states to and from the server, the lines of pattern vs. anti-pattern have been blurred. Having lived through 20+ years of early trend adoption and ‘Shit Why Did We Do That?’, I stick to standing on the shoulders of giants and carefully evaluate the trade-offs of one approach to view rendering over the other. It’s a complex architectural decision that should not be made lightly.

Show your support

Clapping shows how much you appreciated Keith Ensign’s story.