Making sense of JavaScript (1)
Well I am unsure if I’ll ever really enjoy using JavaScript. But, good thing is that I do not really need it so far, am in the comfortable situation of just trying to do so out of curiosity and for my own entertainment. And after all, given my earlier rant on this, I have to say that by now I made a step ahead…
After browsing and reading and diving through what seem tons and tons of resources, I finally ended up playing with marionette.js, all along with the “gentle introduction” book and the NetBeans JavaScript/HTML5 tooling. Sure, talking about JavaScript, maybe using a large and heavy IDE might not be really necessary, but then again, I’m pretty familiar with NetBeans and I wanted to dive into working with JavaScript frontend frameworks not into working with yet another editor.
Yes, I started out with a couple of clear opinions related to JavaScript. Insights gained so far, about that:
- Testing and debugging support: Coming from a Java world (where IDEs such as Eclipse, NetBeans or IDEA are extremely good at working with debugging scenarios, my earlier contact with JavaScript involved desperately trying to be
alert()
or dive through the browser console in order to figure out what’s wrong there. I was pretty surprised to see that by now JavaScript tooling, in my setup with NetBeans, Chromium, the NetBeans/Chrome debugging app and the marionette.js inspector, this by now has actually become pretty usable, and I feel a bit dumb right now. 😉 - Application architecture: I am someone who needs to quickly have some front-to-back conceptual prototype of an application to tinker with things and quickly see how the pieces fit together. With the “gentle introduction” book and a bit of additional documentation, this goal (building an easy-on JavaScript frontend to work with a bunch of dropwizard local RESTful services) can be reached in a reasonable amount of time while actually getting how things work, and while also getting an application structured in an acceptable way, even though possibly not ideal. Pretty good, too.
- Dependency management: Actually, this is the only point so far where my opinion towards JavaScript is rather bad and actually didn’t change by now. Developer needs to manually include
script
dependencies in an application in the right order to make sure interdependent pieces of code see each other – really?! This seems actually rather bad and way behind everything else offered on any other platform.
However, so far working through both book and framework has been an enjoyable trip. And I am starting to slowly understand what’s the buzz about focussing on client-side stuff in the browser and thus on top of JavaScript, even though I dearly wonder how some of the applications following this approach today will look like a couple of years from now – and whether they will go down the same route as, in example, some Ruby-on-Rails applications following the massive RoR hype… but that’s another thing I guess.