Java and moving business logic to the database with Syam Pillai

Alejandro Duarte
Alejandro Duarte
On Nov 30, 2021 9:25:19 AM

Syam Pillai has vast experience in software development. He started in 1986 and continues to work in software projects as the Group Head of IT at Habib Bank AG Zurich. He is one of the winners of the Vaadin Community Award 2021.


What programming languages have you used professionally?

I started with C and assembly initially. Later on, moved to C++ in the first half of the '90s. The first major C++ production application was released for the bank in 1994.

Nowadays, everything is in Java. I embraced Java in 1996 with Java 1.0. Initial versions of Java had their own challenges. The lack of a JDBC driver was my primary concern but that got resolved soon. Right now, I use Java 16. Moved to it soon after its release.

What upcoming Java features do you find interesting?

I'm currently interested in Project Loom. Otherwise, other language features will definitely get added with new versions.

Why is Java so popular and powerful?

Maybe I am biased because of my historical connection to it. I developed a Virtual Machine (VM) in C++ and used that to develop a banking application. Other developers I had in my team were not fully familiar with C++, so I had to develop a domain-specific dialect for them. That was the time I met with some Java engineers from Sun Microsystems. They told me that instead of maintaining my VM, they had something called Java that supports the same VM concepts. After that, I fell in love with Java! A VM and a dynamic class loading mechanism were the main features I wanted.


The JVM is a magnificent piece of software. What do you think about the Java ecosystem?

The sky's the limit when someone wants to develop in Java nowadays. The ecosystem around it is so vast and feature-rich, you hardly need to touch any other language in your life. Of course, JavaScript (and its cousins) should be mentioned here, too, for the web interface part. I really have to count before I can tell you how many libraries I use but, on the framework side, I just use Vaadin. Other than that, I really like the Dart programming language, but it lacks a first-class class loader.

I can't live without a class loader. Contrary to other application developers, I always keep the logic in the database! The middle-tier caches it and runs the business logic but it always pulls it out from the database. A business logic update is always done at the DB level. It may look weird but I have my own reasons.

What are some of the reasons to have the business logic in the database?

If you talk to anyone in the business, they want to protect their data. Data is precious to them. In the case of enterprise applications, maximum security is mandatory around the data and the database that stores it. Developers know that business logic is key and it requires the same level of protection. If you leave business logic in the middle tier, you have to build another level of protection around it. This is one reason.

The second reason is that one can have versioning of the business logic at the DB level. Plus, you can have access control (a very important part of enterprise applications) at the DB level, as well. For example, suppose I write a piece of business logic that displays some sort of sensitive data on the screen and I don't want everyone to get access to it. It can be easily controlled in the DB. So, when the middle-tier wants to pull it out to execute it, the DB won't spit it out if the access is restricted. One may argue that this sort of protection can be built or configured on top of frameworks such as Spring, but DB traditionally has had these features for a long time.

Of course, you need to have such features already programmed at the DB level. In my case, it was already done years before other frameworks emerged.

You mentioned Vaadin before. How did you discover it?

Initially, when Sun Microsystems engineers told me that applets were the future, I didn't believe it. Sun was pushing it for some time around those days. Then, they themselves realized it. Later on, when the Servlet technology came out, I knew that it was the right choice for the web. I had been looking for web-based front ends since then. I tried a framework called Echo2 but I wasn't totally happy with it. There was another one I tried—ZK.

I still don't remember how I came across Vaadin but, definitely, it was through a web search. It was Vaadin 6 at that time. I immediately fell in love with Vaadin because of Java.

What are the best features of Vaadin?

Doing everything in Java. I hated doing anything in JavaScript/HTML/CSS, mainly due to browser differences (of course, the infamous IE was the culprit). Now, with HTML5, CSS2/3, and Web Components, etc, it has become an elegant environment. The Vaadin team has a very progressive and open outlook towards future development. Also, they are not shy when it comes to trying out disruptive stuff. Vaadin Flow is an example. It was a total rewrite of a lot of things and concepts. I like the way it was conceived and delivered.


Syam, congratulations on winning the Vaadin Community Award, and thanks for the job you have done with the Vaadin add-ons.

I started to publish add-ons in the Vaadin Directory with the arrival of Vaadin Flow. Before that, it was a bit of a cumbersome process to put add-ons together with their relevant JavaScript parts. Now, it is so easy for someone to publish any new ideas. Thanks to the Vaadin team for making it so easy for all of us.


Learn more about the Vaadin Community Award

Alejandro Duarte
Alejandro Duarte
Software Engineer and Developer Advocate at MariaDB Corporation. Author of Practical Vaadin (Apress), Data-Centric Applications with Vaadin 8 (Packt), and Vaadin 7 UI Design by Example (Packt). Passionate about software development with Java and open-source technologies. Contact him on Twitter @alejandro_du or through his personal blog at
Other posts by Alejandro Duarte