r/programming • • Nov 04 '14

"Screw You, Angular"

https://medium.com/@jeffwhelpley/screw-you-angular-62b3889fd678
186 Upvotes

61 comments sorted by

View all comments

Show parent comments

7

u/d_abernathy89 Nov 05 '14

I like Knockout, but they are very different tools.

3

u/strattonbrazil Nov 05 '14

They are very different approaches to solve the same problem. Let's not take the tool analogy too far.

5

u/d_abernathy89 Nov 05 '14

nah, I don't even think that's true. knockout does data-binding/components and that's about it. it isn't opinionated and can be dropped into any project, even for just a tiny piece of UI.

I haven't used angular myself, but my understanding is that it's extremely opinionated, and it can't just be dropped into a project to handle a small piece - either your project is an Angular project or it's not. it does a whole lot more than knockout.

so I think they solve pretty different problems.

3

u/ridicalis Nov 05 '14

As a Wordpress developer in my day job, I regularly toss in Angular to spruce up various components (both admin-side and public-facing) that are data-heavy. I think once you introduce routing that you're essentially defining your code as a single-page app, but up to that point it lives in its own happy little world as a child of whatever it runs in.

1

u/d_abernathy89 Nov 05 '14

perhaps i haven't understood Angular that well then. if it really can be dropped into an existing project and live alongside your existing code well, then i'd say /u/strattonbrazil was right.

however, that makes me wonder - why not use Knockout for that purpose? It still seems to me better suited for handling data-binding outside of a SPA or a very large project.

1

u/strattonbrazil Nov 05 '14

why not use Knockout for that purpose? It still seems to me better suited for handling data-binding outside of a SPA or a very large project.

I think that's an opinion of which one you like better. Some people describe angular's binding as "magic"--some in a good way and others not. Knockout uses MVVMs while angular has these Model-View-Whatever's scopes, but both embed their "directives" in html, which makes them more similar in many respects than backbone or react, for instance. At that point I don't see how one is really better suited than the other besides not using all the features of angularjs, but I wouldn't hold that against angular. I've only built smaller snippets with angular and have really enjoyed knockout professionally and on personal projects, but I wouldn't say I've seen enough of angular to say confidently it shouldn't be used on small projects. I haven't seen anything that would say it wouldn't do fine on a small portion of a web page.

1

u/ridicalis Nov 06 '14

The honest answer is that I found Angular first. I enjoy its templating syntax and after taking the time to understand it found it enjoyable. If I had found Knockout first, the story may have been different.

1

u/d_abernathy89 Nov 06 '14

That's my story with Knockout versus Backbone, etc, too :)

1

u/[deleted] Nov 06 '14

As a Wordpress developer

Just say PHP, Wordpress might bring incorrect assumptions on your skill level. :)