3 ms·
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
by Sir_Cmpwn 12y ago
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.
- audreyt 12y agoFair 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!
- Sir_Cmpwn 12y agoThanks 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.
- audreyt 12y agoUnderstood. 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-angularjs/ https://audreyt.github.io/500lines/spreadsheet/as-without-an...