You have attributed the difficulty in following SOLID principles to Javascript being "functional oriented". However, I believe the difficulty translating the concepts to JS is actually because JS is dynamically typed. In dynamic languages, Liskov and Interface Segregation can be mostly ignored due to "duck typing". (Like all principles I'm sure this is arguable, especially because JS has prototypal inheritance. But just because it's there doesn't mean you have to use it.) Conversely, you need to have tests to verify assumptions about objects, which may (or may not) have otherwise been covered by typing.
Here is a slide deck I found about SOLID principles in Angular, although it is for an older version. It also uses TypeScript, but the only type annotations I saw were on strings, so it is basically still dynamic ES6.
In dynamic languages, Liskov and Interface Segregation can be mostly ignored due to "duck typing"
Also, I have the feeling that the Liskov substitution principle is a rather outdated point. Back in the days inheritance was the thing in OOP, but now most devs try to avoid it and use aggregations anyway.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You have attributed the difficulty in following SOLID principles to Javascript being "functional oriented". However, I believe the difficulty translating the concepts to JS is actually because JS is dynamically typed. In dynamic languages, Liskov and Interface Segregation can be mostly ignored due to "duck typing". (Like all principles I'm sure this is arguable, especially because JS has prototypal inheritance. But just because it's there doesn't mean you have to use it.) Conversely, you need to have tests to verify assumptions about objects, which may (or may not) have otherwise been covered by typing.
Here is a slide deck I found about SOLID principles in Angular, although it is for an older version. It also uses TypeScript, but the only type annotations I saw were on strings, so it is basically still dynamic ES6.
SOLID Principles in Angular
Here is a pretty simple overview of what SOLID principles looks like in Ruby, also a dynamic language.
SOLID Principles in Ruby
Thank you Kasey!!.
I understand your point.
Appreciate for sharing the information!!
In dynamic languages, Liskov and Interface Segregation can be mostly ignored due to "duck typing"
Also, I have the feeling that the Liskov substitution principle is a rather outdated point. Back in the days inheritance was the thing in OOP, but now most devs try to avoid it and use aggregations anyway.