As great as virtual DOM is, and amazing component based UI design where components just know how to render themselves, I think the problem is javascript. Why would I want to move logic away from languages like ruby, or golang, and into javascript? I can still have components that know how to render themselves I just have more full page refreshes when a form or link is actually submitted to rails non-ajax style. But this is OK. When I need some Ajax I use jquery and do it but my overall feeling is keep javascript to a minimum. Some stuff HAS to be js, like making the textfield get focus in the first name field on a form. So I write a little js for just that and only that. But otherwise no important logic should ever go in js. Am I rite? Here is example app I started with intent to finally learn react or angular and I love where it ended up: https://www.youtube.com/watch?v=_cuhYh68vHM Notice the "add kid" button or "add co-parent" buttons just show hidden form already on page. It has that quick feel of not doing page refresh when not needed. But I don't do 100% Ajax.
30 comments
I looked deep into react, angular, riotjs, and my conclusion: js is a virus | Heykuki News