By Default

By default, you will get some benefits automatically, isn't that nice? Yes, it's really good until you want to know more.

Ok, let me explain. In SQL, ORDER BY keyword sort the records in ascending order by default. That's nice, but what if you want to sort the records in descending order? If you don't know that SQL sort by ascending order by default, you might get confused a little bit. That's just most simple example.

Now, coming into the framework. We now have all sorts of frameworks, and their purpose, simply put, is to make the life easier for us (the developers), but does they?

Let's use Spring as an example. I am saying this is the only benefit, but one of the most basic benefits to use Spring is you don't need write a lot of Java class, all you need is fill up some xml configuration file, and Spring will do this automatically for you. But do you know that all Spring beans are singletons by default? What if you don't want your bean to be singleton? That's where confusion starts.

See the problem, so far? All the frameworks have these default rules, and you must know all these rules to utilize the most benefits, and these are the pains that you have to suffer for the gains.

One of the most import lessons that I have learnt by studying these frameworks is to pay attention to the keyword "default".