Do you really need separation of concerns in a 99-line codebase? This is like jQuery all over again. Use the right tool for the job, and consider that the right tool might just be no tool at all.
Fair point. I should have explained the context better; this is for "500 Lines or Less", the fourth in the Architecture of Open Source Applications series, aimed more at new students than professional programmers, so separation of concern serves a pedagogical, rather than practical, purpose.
In a couple year's time, Web Components, Shadow DOM, and Object.observe may very well make application of this size not requiring AngularJS anymore, just like the "no tool at all" document.querySelector replaced jQuery.
I'd be happy to revise the chapter once a suitable polyfill exists for today's browsers — pull requests welcome, too!
Comments
Do you really need separation of concerns in a 99-line codebase? This is like jQuery all over again. Use the right tool for the job, and consider that the right tool might just be no tool at all.
Fair point. I should have explained the context better; this is for "500 Lines or Less", the fourth in the Architecture of Open Source Applications series, aimed more at new students than professional programmers, so separation of concern serves a pedagogical, rather than practical, purpose.
In a couple year's time, Web Components, Shadow DOM, and Object.observe may very well make application of this size not requiring AngularJS anymore, just like the "no tool at all" document.querySelector replaced jQuery.
I'd be happy to revise the chapter once a suitable polyfill exists for today's browsers — pull requests welcome, too!
Thanks for clarifying. I can see why you'd go this route when presenting it to students, but it seemed odd to show off in this venue.
Understood. Not meant as a show-off, but for people interested in comparing DOM-only versus AngularJS styles, here is a version that uses only DOM functions: https://audreyt.github.io/500lines/spreadsheet/as-without-an...