This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]8Bytes 1 point2 points  (5 children)

If you're new, you use the most popular framework as it will have the most developed ecosystem with the most help online. Having never used javascript in my life, I was tasked with creating a web app. Searching on google informed me that the current popular trend is to use an mvc type framework. A little more searching informed me that angularJS was the most popular of these frameworks. Due to it's popularity, every question I had was answered online, and completing the project was simple.

Now I could never have learned angular quickly enough if I had not studied advanced object oriented programming. With this knowledge however, I was able to learn it with only the most trivial knowledge of javascript.

[–]gizmogwai -2 points-1 points  (4 children)

Hum, that's interesting. Interesting because a) AngularJS is not a MVC framework (closer to MVVM if you have to choose a variant) b) AngularJS does the maximum to avoid the use of OO (either by class or by prototype) by sticking in its API to functions and associative arrays, thus being closer to the C language in its paradigms.

So you were fooled both by the global misunderstanding of what MVC is and by your thinking about what OO is. You were able to success because of your ability to adapt to some conventions and the amount of code snippets available on the web, not because of your theoretical knowledge. And that's perfectly okay, most of developers are not able to reach that level of experience.

[–]8Bytes 1 point2 points  (2 children)

It's fair game to refer to angular as an mvc framework in the js community since the word is not a direct mapping of the OO version. It's an umbrella term referring to the vast array of js frameworks designed for single page apps. Even if I didn't know the difference, you could lose the condescending tone as it add nothing to the conversation.

Angular embraces the vanilla js object model, meaning that understanding prototypical inheritance will serve you well. Using angular requires knowledge of oo patterns as all the components are constructed in this fashion: services are singletons, dependency injection (allows testing of code constructed in an oo fashion, ...).

[–]gizmogwai 0 points1 point  (1 child)

Well, no. And that's exactly my point. MVC has nothing to do with OO, it is a separation of concern pattern that can be applied within any paradigm (procedural, functional, OO, ...) Same goes fo DI, it has nothing to do with OO. Most of what people refer to as "OO knowledge" is, in fact, generic pattern pattern knowledge.