3 ms·
sorry to be a hater, but while I find the idea of mixing js and html not great, the alternative being offered up here is to introduce a new language and mix tha
by etherealG 16y ago
sorry to be a hater, but while I find the idea of mixing js and html not great, the alternative being offered up here is to introduce a new language and mix that in with html instead of js. isn't that counterintuitive? wouldn't it be better to just use actual js in your templates instead of this arbitrary {{}}-based stuff?
- biot 16y agoIt's a very familiar style of markup that I find immediately intuitive. The benefit being that it separates the markup from the code populating it.
- weego 16y ago{{tag}} is not "valid" markup (it will pass a validator but has negative semantic value), which is even worse than mixing a little well crafted logic into your display code.
- biot 16y agoUsing {{tag}} notation seems to work well enough on Wikipedia -- could you elaborate on the difference between Tempo's use and Wikipedia's?
- etherealG 16y agoI don't seem much difference, but I also prefer when making websites to keep down the number of languages I have to know. Already html + css + js + a server side language is enough, introducing another seems excessive when your templating language could just be js or perhaps the same server side language you already use. we do the same for our server side templating when making sites, using php for controller & model code, but also arbitrary php as the template language in the view too. it seems to work well, and avoids the need to learn something new.