by mariocesar · 2y ago · 0 comments
It's refreshing to read about someone who prefers a straightforward approach (using boring technology) rather than dividing work across multiple teams and technologies. Using a single, full-stack framework not only simplifies the development process but also enhances the overall enjoyment when working :)
There's a lot of awesome options for boring technology! Even javascript has next.js which is pretty boring at this point, even if it is missing some things.
No offense, might be a great framework but the gist of the blog post is A) what you know or B) Rails (if you don't know what to choose)
The good part is that if you start early with a good design, it's fairly clear how to move from views to a REST API (DRF or Django-ninja) later and split the front end if you need to.
I've been learning React / Django / Bootstrap (open to ideas on that, but it's just been "there" for me) / SQLite, Postgres / Stripe for payment, Docker, and hosting on AWS and exploring Fly.IO for hosting. I haven't dug into APIs, but curious your thoughts DRF / FastAPI / Django-ninja).
I know this is a Rails thread, so there might be a better place to have a discussion about it...
Thanks for your insights!
{% macro IssueCard(issue, type) -%}
... lot of HTML
{% endmacro -%}
{% for issue in myissues %}
{% macro IssueCard(issue, 'myissue') %}
{% endfor %}
The alternative is creating template tags, which can be a lot of work, and it gets you out of the templates.I have a folder called macros/ where I put all the macros I need, and then I use the import call from Jinja2.
I agree with you; having long and deeply nested HTML templates creates too much noise when developing. Jinja2 Macros help with that.