DEV Community

Discussion on: What's the hype about JavaScript?

Collapse
 
ingosteinke profile image
Ingo Steinke

As a front-end developer, I still don't really understand why to use JavaScript in the backend or anywhere else outside of the browser. While it has come a long way, it's still incomplete, inconsistent, and, when it comes to web development, unnecessarily imperative.

Before CSS, people used to code hover styles using JavaScript in HTML attributes:
<img onMouseOver="this.src='image1.gif'" onMouseOut="this.src="image0.gif" src="image0.gif">.

Now we are able to do a lot of styling and UI logic descriptively using markup and style sheets, but some developers seem to prefer to code everything in JavaScript, and only JavaScript, instead. In the end, they don't, and they have to invent another language that abstracts their JavaScript DOM manipulations to pseudo markup (JSX) that looks a lot like ... well, HTML?

I agree that JavaScript is versatile and flexible and it's a good idea to learn!
And (especially if you know a strongly typed language like Java) take a look at TypeScript or at least use JSDoc and a strict linter, so you can use JS in a way that actually works and avoid the many pitfalls like "1" + 1 = 11.

Collapse
 
deeprof profile image
Kolawole Emmanuel

Hi Ingo Steinke,

I totally agree with you on that.

However, i will lay my hands on TypeScript as suggested. I hope i won't get disappointed.

Thanks for sharing your opinion.