For or Against the Nature of Things

Recently, I had a chance to develop a brand new web application -- a modern one, mostly a client side application. I've come back to the basics, and attempted to re-learn the JavaScript again. What does that this mean? This is this, this is simple :) Yeh! Prototypes are pretty cool when you get the idea.

Among other "re-new" ideas, I got a chance to evaluate the current approaches of UI design/implementations in JavaScript. Someone suggested Dojo. Some guys in the company have experience with it. With a childish attitude, I've downloaded the SDK. Heh! Megabytes of gzipped JavaScript. Forget about costs, let's simply play. It has really good documentation, like IKEA instructions. I've started copying and pasting samples and running them. And the play becomes ... a struggle. Me versus the Knights of Ivory Tower. The same knights who defend the* package or .NET Compact Framework. It's just yet another abstraction over abstraction. Do I need to spend hours trying to understand and feeling stupid even more? Sorry, knights, not this time. Drop the "rm -fr" bomb and forget it.

I started looking for something different. There is another library recommended by colleagues. It's called jQuery and it has user interface widgets, too. I tried it and I like it. There are no unnecessary layers on top of real HTML (DOM). Just decorated the HTML page with classes and IDs, and added event handlers. The page becomes the application in the blink of an eye. Coding becomes a pure pleasure. I felt like Tao master, the Wu-Wei concept in action. Later I found other JavaScript libraries, but, sorry, I will not tell more about it.

I started thinking about it. What is the main difference between jQuery and Dojo? As I said, the jQuery approach is HTMLish and JavaScriptish. There is full acceptance of HTML and JavaScript, just as they are. Dojo, on the other hand, is a set of layers on top of HTML and JavaScript. It forces you to think in a totally different way. I like thinking about layers like fences in the real world. If you don't like something or you're afraid of something, you start to build a fence. That's the Dojo way. There is an opposite way. Just fully understand the true nature of it. There will be no "like/dislike" or afraids, just using it in accordance with its nature. It's the jQuery way.

Hold on! This is an ORM related blog! You may shout. For and against the nature approaches can be found everywhere. In the ORM realm, the Dojo way is represented by the famous Hibernate. Hibernate was developed as a treatment to obscure JDBC API. I don't like the API, either. Right now, Hibernate is an object-oriented database build on top of a relational database. It forces you to sometimes think in the model-domain oriented way, and sometimes in the relational way. You are in the object-oriented way when you are starting, when you're optimistic, when you're smiling. You are in the relational way when you've got systems in production, when you cursing at night, and Googling for help. Hibernate is against the RDBMS nature. Isn't it an irony?

As you may guess, OneWebSQL is like jQuery. It's a very thin layer on top of the JDBC API. It helps you using the RDBMSes just as they were designed.

Are you using stuff for or against its nature?