Another way towards isomorphism: client-side Nunjucks and and server side Jinja2
tl;dr We love some of the ideals of the isomorphic pattern, we just weren’t ready to go all in with Node and React, so we’re trying another way.
We’re now at least six years into the concept of isomorphic web development which share significant amounts of code between client-side and server-side. Obviously as a small team who love code reuse, the idea of sharing parts of the application code between front and backend is highly appealing to us at Bimble.
On the other hand we’re also not ready to jump into developing an application using a conventional isomorphic stack (Node/React etc). We’re far more at home with developing in Python and Flask with Jinja2 as a templating library. We’re absolutely not against Node and React or any of the other conventional parts of the isomorphic stack, but they’re not where our experience and skillsets naturally lie.
We’re also very much in the progressive enhancement, progressive rendering and progressive web app camp. I think this tweet from Paul Lewis sums things up perfectly.
We’ll want to send the HTML for first paint from the back end where we can, sending enough data to the client to complete a view. We may then want to augment this with data from our API and with client side templates. Obviously the moment we start thinking like this alarm bells go off with the thought of maintaining two sets of templates and the consequences of that such as duplicated effort and risk of UI inconsistency if the templates start to diverge for any reason.