I’ve been programming J2EE software for many years now. However, I came a long way. From assembly programming (I’ve programmed a small boot-able code, from floppy, with a command prompt – back in the years), but just then my mom was kind enough to buy me a K6-2 266Mhz processor and upgrade the 386 AMD on which I was working on. Eheh.
As years went by, I passed to Perl, Java, PHP, etc .. , *nix administration, j2me, JNI, eeetc and now – I’m working only on J2EE, only here and there maintaining some forums / blogs in PHP.
What I dislike about J2EE is that just a simple form on web needs >20Mb of jars and libraries just to get it going. This seems a huge amount of code (zipped!) just there – as compare to, you know, 48kb games on Z80 that were keeping you hours in front of the TV.
But I just realized in fact the beauty of it. How ?
I am experienced in interacting with legacy databases, Oracle / Informix. I know how to tackle complex systems (or at least I believe I know – but as “Tao of programming” puts it, only Tao is perfect). So I am pretty much drawn on investigating alternatives to monster DBs, and lately I’ve been trying to investigate NoSQL movement. I said that maybe if I can convert and existing open source application (using MySQL / Postgres) to NoSQL (I’ve chose Redis – seemed the most friendlier to me), in the past few days I investigated what source code to modify.
So far I checked SMF (Simplemachines’s php forum), WordPress (php blogger) and JForum (j2ee forum). What I found disturbing is that the code is littered with SQL code. Everywhere SQL code! Search the code for “select *” and tens of files contain it!
Not to mention that is seems impossible to work with two data sources at the same time (I planned to move only small bits to NoSQL and, as i was building up intuition, to move on the bigger tables, like the posts table or the users table).
It is disappointing … compared to the monster applications based on J2EE, with legacy databases, huge set of business rules and so on … wow, those applications have one thing in common. No matter how many SQLs you want to have, it’s everything into one place. ONE place. Only a couple of files contain everything that is needed… I need to change a query, I go into the mapping files and I do it. As simple as that.
So ibatis (for legacy databases) and ibator are a powerful combination.
I think I will continue to study NoSQL for these open source projects, even if I will end up with a mess of code. It seems to be messy anyway.
Leave a Reply