Today I start this blog about javascript and "its mysteries" from the point of view of a programmer too much accustomed to program in typed languages like Java.
I love to program applications that run inside browsers and I feel like most of the time I always tried to avoid programming in JavaScript, for example using frameworks that translate my Java code to JavaScript like GWT or Java2Script.
My previous job that focused on server pages and JavaScript wasn't the primary language at all, only a toy for a nice presentation layer.I even had to insist to my
boss to put some javascript (or GWT) on its application's client side. But now it is not my choice, I must program with JavaScript everyday to make my day in my new job (in which even the server side is written in javascript !)
It is not that I have a personal problem with JavaScript, on the contrary I love it but I never think I have to do some serious designing and big code in JavaScript.
So this blog will try to describe my current efforts for being able to express my self in JavaScript as I can do it in Java, like having a classic Object Oriented language tools, and more administrative concepts like packages, modules, etc.
Also, JavaScript is a little language compared to typed languages like Java: it is an scripting language. And a little language means less keywords, and that that means more freedom: if you have less keywords you have less rules and so this means being able to perform the same task like using different ways. For example, in JavaScript, defining a class or a method can be accomplished in different ways while in a more-rigid-language like Java you can accomplish task like those in only a single / unique way.
And of course it is the topic of the main JavaScript language concept: the function, a concept that do not exists in Java and it is first class citizen in JavaScript.
Well, all this and more are the "JavaScript" mysteries that this blog will try to describe. Of course I admit that in reality JavaScript is a closed language and have no secrets, but from my subjective mind, these are the mysteries of JavaScript.....
No hay comentarios:
Publicar un comentario