4 ms·
> You spend your time writing plain ‘ol JavaScript. That’s the future I believe in. How about a future where you don't write any code at all? This is the beaut
by jlas 11y ago
> You spend your time writing plain ‘ol JavaScript. That’s the future I believe in.
How about a future where you don't write any code at all? This is the beauty of Angular's markup-centric approach, it's declarative so that means less code, which means less opportunities for devs who enjoy typing to screw things up.
Jeremy Keith made a good point in his An Event Apart talk [1], where he talks about HTML slowly subsuming interactive elements (e.g. like how HTML5 adds better form type support). Angular is pushing things into this realm by helping to take code out of the picture more and more.
http://aneventapart.com/news/post/the-long-web-by-jeremy-keith-an-event-apart-video http://aneventapart.com/news/post/the-long-web-by-jeremy-kei...
- jerf 11y agoIf you're writing loops, and especially if you write loops that have conditionals inside of them, you're writing code. "Declarative" is saying "I want a list of all users", "For every user, display their name like this" is just code. I've seen a lot of template languages that claim to be declarative, I'm yet to see a production template (that is to say, not an "example") that actually looks declarative and isn't just writing code in a language with poor constructs for writing code.
- mercer 11y agoAgreed. In every single project I've worked on that used mustache/handlebars, haml, or some similar 'restricted logic' approach, the long-term result consisted of view templates that contained hacks, a lot of logic hidden in helpers that were often only used in one place, or just plain convoluted solutions. Furthermore, the main argument I hear is that these logic-less template approaches benefit designers/front-enders, which doesn't make sense to me. If your project is complex enough to require Angular or React, a non-coder front-ender probably will have trouble working on it anyways. That's been my experience at least.
- jdlshore 11y agoI've seen no evidence that Angular results in less code than React. My experience with Angualar 1 was the opposite. Angular templates are still code... weird, fiddly, silently-failing code, at least for Angular 1.
- baddox 11y agoMarkup languages are designed to be computer-readable descriptions of documents. Programming languages are designed to be computer-readable descriptions of general instructions. Modern web applications (the sort of web site for which you would consider heavily using React, Angular, Web Components, etc.) are not really documents. It's really nice having a general purpose programming language to describe the instructions for such web applications.