Tuesday, October 13, 2009

Programming in PL/SQL and Java

For those of you who have worked with the TIA Solution in more details, you know that the programming language PL/SQL for many years has been a central tool in the making of it. This is the language our business logic is written in, and it continues to serve us well in terms of features, performance and productivity.
Sometimes we meet people who are not used to the Oracle technology stack including the PL/SQL language. A few of those find it intriguing that TIA relies on a language “invented” many years ago. What we usually do is to explain the benefits of PL/SQL which we believe by far outweigh the drawbacks. Usually PL/SQL is being compared to slightly newer languages like Java or C#. The benefit to TIA Technology by writing business logic in PL/SQL is centered on productivity and performance. The TIA solution is an extremely feature rich integrated solution capabæe of supporting thousands of users, where most of the business benefits are based upon data access and manipulation of the data. As such the TIA solution is a traditional database heavy solution with less emphasis on advanced graphical user interfaces. Furthermore, we have deliberately made a choice only to utilize the Oracle database. Because of this we can utilize PL/SQL with all of its most advanced features inside the Oracle database to quickly get to the most optimal and best performing business logic with the least effort for the developers. We basically do not have to write any “plumbing” code to get the desired results in terms of updating the database. Compared to Java and C#, these languages do not have any elegant built-in runtime support for accessing a database. SQL statements have to be embedded in the code as textual strings and there is usually a lot of plumbing code which has to be written and maintained when writing business logic. And since TIA does not have to deal with the complexity of being database agnostic there is really no gain – just pain, should we choose to write business logic in Java instead of PL/SQL.


More information on PL/SQL can be found through Wikipedia (http://en.wikipedia.org/wiki/PL/SQL). If anyone has a deeper interest in why PL/SQL is a good choice for an Oracle application like the TIA Solution, please check out http://www.developer.com/db/article.php/3308841/Sample-Chapter-Efficient-PLSQL.htm .


Now, the fact that most of the business logic resides inside the Oracle database and is written in PL/SQL does not mean that Java is out of the question. On the contrary, Java plays an increasingly important role for the TIA solution as a programming language. We have merely decided that we want to use Java where it is best, which we believe is for creating middle-tier components and user interface. To that end, TIA began the journey into Java land a few years ago, when programming for version 6.0 started. With the 6.0 release in March, the first real Java components were released, enabling TIA to fit into a modern service oriented architecture. We are now in the middle of releasing all of the services forming our service catalogue and of course Java plays a key role in that. This also means that our partners will have to look to Java to build up skills. Having Java knowledge and specifically experience with the Oracle SOA suite will become an important aspect of working with the TIA Solution in the future. And that will be amplified when we are gradually moving into utilizing the Oracle Application Development Framework to design and build the TIA solution.

We believe that it is wise for everybody to choose the optimal tool to get the work done. Do not use a hammer to drive in a screw.

When making the world’s best general insurance solution, we believe the right choice is PL/SQL for business logic and Java for the rest.