5 ms·
Your comparison matches a lot mine with Symfony, but is way more detailed. - I see you dislike generators as much as me ;) - Template inheritance, it's madden
by conradfr 4y ago
Your comparison matches a lot mine with Symfony, but is way more detailed.
- I see you dislike generators as much as me ;)
- Template inheritance, it's maddening isn't it? Sadly it does not resonate with the RoR crowd and by extension the Phoenix one. I've been told to use "heex function components" instead but I'm still a bit lost as how this is an appropriate substitute.
- I disagree with your take on "fragment", it's almost my favourite feature of Ecto, as it means you can use almost any functionality of your database/version of choice without specific support from the (not-)ORM.
- josevalim 4y agoPlease open up a thread on ElixirForum about template inheritance and CC me. If you include Python examples, I can help translate them to function components. :)
- spapas82 4y agoHey Jose, here's how it's working: https://docs.djangoproject.com/en/4.1/ref/templates/language/#template-inheritance https://docs.djangoproject.com/en/4.1/ref/templates/language...
- conradfr 4y agoThanks! I did it there: https://elixirforum.com/t/using-function-components-for-template-inheritance/49678 https://elixirforum.com/t/using-function-components-for-temp...
- spapas82 4y agoGenerators are more or less useless to me. They are useful to create some tutorial code to see how some stuff should be idiomatically written, but for anything else I just ignore em and just write the code myself. About the fragment. I agree it is useful but it's usefulness relies on the fact that most non basic sql is not implemented in ecto so you need to be able to use it somehow... Consider that the Django ORM implements almost anything that your gonna need (thing like Case, SQL functions, subqueries, whatever) so you only write ORM code!