Object Layers Are Bad

Obviously, I do not mean that business objects are bad. It’s just that I have recently seen code that iterates through collections to find records – basically, I have seen classes and methods used to perform the work that SQL was designed to do. I have seen objects that do work that should be done with triggers or stored procedures.

Of course, using triggers can tie the solution to a specific database implementation or vendor. However, some clients are clearly committed to their database vendor – also, they may already have code that ties them to a specific database implementation. Use the database for what it does well! SQL is standard – why reinvent the wheel?

Many teams code as if the database and the application are of a piece – they are not. It is conceivable that one database may be used by multiple applications or web services in the future. Why make it necessary to maintain business logic in each application? Implement it in the database, I say.

Also, it is easier to migrate to another technology if the database is robust. The application should implement business processes, display data, generate reports and collect information. Basic data validation should be done by business objects before data is passed to the database, but why clutter an application with complex business objects and misapplied design patterns? Keep things simple. It costs money to maintain code. Make it readable. Make it possible for new developers to get up to speed quickly.

Why provide a complex solution to a simple problem. There are so many young and clever coders out there who are too clever for their own good. Agility is more than a process – agility is the result of good planning, of simplicity. Write code so that it can easily be understood and maintained. That’s my rant.

Popularizing Java

I think I read recently that the number of Java developers was declining, and that many Java developers were leaving to use languages and frameworks that were easier to use. I am not a Java developer, but I have been watching the changes in Java EE 5, and I have been reading about EJB 3.0 – just out of interest.

This is what I have noticed. Much of what is written about Java assumes knowledge. For example, the Netbeans.org site contains an introduction to Java EE 5. This article jumps straight into describing how Java EE 5 uses annotations instead of deployment descriptors! This is not a good place to start. I will see if I can find a better introduction and I will post it here.

On the other hand, if you are familiar with annotations, and if you are familiar with deployment descriptors, this is a good article. If you have at least played with EJB 2.0, then this introduction will make sense – however, if you already have that much knowledge, you have already been introduced. All you need is an update.

I get the impression that Java is losing ground to lightweight frameworks, and so-called scripting languages. The language is getting better, but a real effort has to be made to write well about Java and to make it interesting to young, up-and-coming developers.

Why Believe In God?

Ok, I have laid my hands on a copy of Richard Dawkins The God Delusion. I have noticed that the author tries to account for why people choose to believe in God – I think he may be missing the mark. Often, he seems to think that people arrive at the notion of God while trying to account for the existence of the physical universe.

I am just as interested in the opinions of atheists, but I would like to hear from theists first. I know that I have readers, but I get few comments. This time, I would like to ask a specific question: If you believe in God, what leads you to believe in God? I am less interested in what you may believe. Ok, fine, God is the answer – less say that He is. What is the question?

Please leave a comment. I can be counted on the neither agree not disagree, but I just want to do some research – I suspect that Dawkins does not understand why people conclude that there is a God as well as he thinks. What do you have to say?

To leave a comment, try clicking on the title of the article. This will take you to a page that has nothing but this article, with space at the bottom for leaving comments.