Eclipse, JSP, Velocity and VB

I am one of those Java programmer which never used Java IDE. Why? Because all this time I consider the feature offered by Java IDE is not equal to the slow loading of the IDE and the huge resource it use. So all this time I always use lighweight text editor like UltraEdit in Windows and K Advanced Text Editor in Linux.

I know for sure that one of the main benefit of using an IDE is easier debugging. But since I know XP (eXtreme Programming) methodology this problem can be solved easily. How? By implementing TDD (Test Driven Development) which means writing unit test before you write classes and methods. This is one of the practices of XP methodology. Only with Java 2 SDK, good text editor, JUnit and ant I already able to reach a satisfying level of productivity that I consider close although not as productive when I am using VB 6

But recently there is an IDE poll in JavaLobby. So I am interested in trying Eclipse. I download Eclipse and start rewriting one of my personal application that is Bible Reader Software. Bible Reader Software is software to help someone studying and reading the Bible. Features of this application is displaying the Bible in the form of hierarchy: translations, books, chapters and verses in a chapter, search according to criteria and search according to criteria in a group of books

This application is now exist in 4 version. The first version is created using VB 6 and DAO. This version do not longer exist in my hard disk. Second version is created using VB 6 and ADO. Third version is created using JSP and EJB and run on JBoss version 2.x. Fourth version is created using Velocity and POJO (Plain Java Object).

From my experience rewriting this application from JSP and EJB to Velocity and Pojo then I can make several conclusions:
1. JSP is counter productive. If you experience error in JSP than it is difficult to know the error occurs in which line number. This is because fundamental way of how JSP works which is transforming JSP pages into servlet form. Now, the thing which run and produced error messages are the servlet. So it is difficult to trace error message from servlet to which line of JSP. If you have error in Velocity although sometimes the error message is not clear but its always tell you the line number in the template where the error occurs. So fixing the error is easier in Velocity than in JSP. What if the template is right but the servlet which loads velocity template wrong? What if error happens in our POJO? Easy! Just read Tomcat error log. It will clearly tell what error happens in which line.
2. EJB do not encourage the creation of an Object-Oriented system. Why? Because EJB do not understand inheritance. If we want to create an object-oriented system using EJB than our business logic should be write using POJO. Than we must call this POJO from inside EJB. So EJB just become a wrapper for POJO. If we only use EJB for wrapper then it means it has low value. There is no wrapper more expensive than the goods it wrapped :-p
3. Eclipse with Tomcat plugin from Sysdeo make web application debugging as easy as in VB 6. Put breakpoint in your code. Then run Tomcat from within Eclipse. Open your browser and load URL you want to debug. Switch to Eclipse and now you can debug step-by-step and see values in objects.
4. Eclipse incremental compile facility reduce my need of ant. Ant will only be needed when I want to package my application in the form of JAR, WAR, etc. At all times my application is ready to be run when it has no red marks. When it has red marks Eclipse usually gives the right explanation for the red marks which means why my application won’t compile.

How beautiful. Now with Eclipse, Tomcat Sysdeo Plugin, Velocity and POJO I finally reached the level of productivity I reach with Vb 6. But this means VB is a really magical tool because you need right combination from a lot of tools to match VB 6 productivity. It is true what Bruce McKinney said about VB: “It was based on magic”

Dedicated to all VB programmer who migrate to Java.
May the Magic be With Us.

If VB based on magic then Java based on what?
“Java is based on a complex and powerful class library”

Total Eclipse of The Sun

Java IDE Polling

Recently there is a polling about Java IDE which result is
shown in JavaLobby.
This poll result shows that the most used Java IDE is Eclipse.
This is a surprising result considering that Eclipse project
just got started several years ago

Let sing with Bonnie Tyler.

Once upon a time I was falling in love
but now I’m only falling apart.
There’s nothing I can do,
a total eclipse of the Sun.

Once upon a time there was Sun in my life
but now there’s only love in the dark.
Nothing I can say,
a total eclipse of the sun.

Modified from song
Total Eclipse of the Heart.

Software Evolution

Short quote:

“The lack of a roadmap for Open Source means that there can be dozens of
similar projects, some being born, some dying, and others forking into
new identities. Since there is no single architect for Open Source,
these projects all have to compete for manpower and user interest. Most
Open Source projects die, but when they do, it is a death Darwin would
understand. Every death improves the software bloodline.”

This writing of Robert X. Cringely is very beautiful. He really understands
software evolution and ecology. In this perspective proprietary software like
Windows 98/XP/2K/2K3, MS Office, BEA Weblogic, IBM MQSeries etc is having
evolution competition from Open Source software. The main question is not
“Is Open Source software is always better than proprietary software?”.
The main question is “Can proprietrary software evolve and adapt to user
needs better and faster than Open Source software?”. Facts in the field shows
Open Source software evolve and adapt to user needs better and faster than
proprietary software. There is no feature in Open Source software that is
not requested by its user. Also release cycle of Open Source software
is much faster than proprietary software. Is this means proprietary software
will extinct? Maybe not extinct but reduced in role. I mean greatly reduced. 😉



The first time I knew there is Java database is when I use JBoss. In JBoss there is a Java database that can be accessed through JDBC API called Hypersonic SQL. Hypersonic SQL now named HSQL and can be download from

When I learn this database it seems lacking in features also this database only store it’s data to file when JBoss shutdown. This database stored and processed all of its data in memory. This means if you have hundreds MB of data then you need hundreds MB of memory. My conclusion is this database cannot be used in serious business application.

Second Java database that I know is Cloudscape the database included in J2EE SDK from Sun. Unfortunately this database is commercial. So I’m reluctant to learn it.

McKoi is the third Java database that I know. It is at McKoi I found a satisfying Java database. It’s feature is not many but enough to be called RDBMS. Features of McKoi:

  • File based so memory eficient
  • Memory use can be configured but can be dynamic too
  • Use automatic index this means every field in the tabel is indexed. This removes the need for tuning with consquence slower insert for table with many field. This feature can also be configured.
  • Relational integrity: Primary Key, Foreign Key, dll.
  • Transaction facility
  • Auto-number field facility
  • Hot-backup which mean you can back-up while the database still on.
  • Can be used in embedded or client/server mode

One of the biggest benefit of McKoi is when you use it as embedded database. With this method our application can be given to client in the form of WAR or JAR file and can be run immediately. No more steps to install database, creating table, filling table with initial value and data source configuration. Of course if you use embedded McKoi for commercial application you need commercial licence because McKoi licence is GPL. But if we use McKoi in GPL application we do not need to buy license.

I'm living in Java

Well everyone in use Java (This web site built using Java). However not everyone here living in Java. In case your wondering I’m referring to the real Java. Java is a beautiful island in Indonesia. Indonesia is a nation composed of many island in South East Asia.

I’m living in Java. Not only I program in Java and drinking Java, I’m also living in Java. Cool eh? Well it’s not that cool. As an island in the equator Java climate tend to be hot. We only experience two seasons here: dry season and raining season. If balanced both of these seasons provide great fertility to our island. If not balanced these brought disaster. A prolonged dry season made the rice fields dried up and can’t be harvested. A prolonged rain season delays rice planting and reduce yields at harvest.

Bahasa Indonesia is our country national language. Although I am fluent in reading, writing and thinking in English because of my profession I usually only speaks in Bahasa Indonesia. You can read more about me in

Indonesia my country is in the midst of political transition from dictatorship to democracy. We have managed to do our first democratic general election. Now we are facing the second democratic general election since the fall of Soeharto regime. The second general election will be held at 2004. I think thats it for now. If you want to know anything about Indonesia, Java island or me just ask in comments. Thanks for reading.

Linux and Windows Experience

From January to August my main computing OS is Slackware Linux 9. But I can dual boot to Windows XP. However since September I have an offer from one of my client to extend my old applications in VB 6. Since VB 6 is a dead end platform I am learning MS .NET Framework. Why .NET Framework why not use Java? Well this is because my client is a MS Windows centric company. They do not use any Linux OS in their servers. They do not use Java. They do not even use web application. Their most modern application is client/server application developed in VB 6 and MS SQL Server. Because of this I install all the latest MS OS and technologies: Windows Server 2003 and Visual Studio .NET 2003. I have to switch OS completely since Windows Server 2003 must use NTFS to install IIS 6. I need IIS 6 because of VS.NET 2003. If you use NTFS then you cannot dual boot.

Windows 2003 is certainly an improvement over Windows 2000. The performance is faster. Why? Because Windows 2003 did not install any unnecessary service unlike Windows 2000 Server. It’s security settings default to safe settings. Even DirectX has DirectDraw and Direct3D disabled. You have to manually enabled DirectDraw and Direct3D.

Although it feels easy to do many things in Windows I miss the power of Linux. Of course Linux GUI may still behind Windows GUI. However Linux offers powers. For example ripping DVD or VCD and converting them into DivX is only a single long command line using MEncoder. For burning them to CD-R nothing beats K3B in KDE: just drag and drop your files and press one button. In Windows this is a multi step process using lots of program: SmartRipper, DVD2AVI, FlaskMPEG, and VirtualDub. Yes I know about DVDx but even using DVDx its not as easy as typing one long command line. Besides that long command line can be put in shell script and reused.

Web Service and DCOM

Yesterday I spend the whole day exploring Web Services in .NET Framework
using VB.NET. I learn two things:

1. Since Web Service is based on SOAP its weakness is SOAP weakness.
SOAP stands for Simple Object Access Protocol. Its simplicity is
it’s strength also it’s weakness. When I want to sent some complex
objects using SOAP it barf and says “Serialization error”.
If my object is simple SOAP works but when my object gets a little complicated
it’s always barf. DCOM can send almost any complex objects created
in VB 6 without a fuss. Those who needs to send complex objects
within Windows Network should stick to DCOM. Those who needs to
send objects using SOAP should learn how to construct complex objects
out of simple objects.
2. The main working of SOAP are transforming Object data into XML and
transforming XML back into Object data. I found this process very
CPU intensive. I think this will be the biggest bottleneck of web services.
Bigger bottleneck than sending XML using HTTP. For those who don’t
have extra CPU power and bandwidth to spare SOAP is not for them.
DCOM is still a much more efficient protocol on CPU power and network

However in this interconnected world I think you cannot escape
and must implement Web Services sometimes.

Have Fun! 😉

Remembering Bali

At 12 October 2002 Muslim terrorists bombs Bali at Sari Club and Paddy’ Bar. The Muslim terrorists also robs gold shops to finance the bombing. However Imam Samudra one of the terrorists told Indonesian Chief of Police Imam Bachtiar, “It wasn’t robbery, sir. We were looking to fund a higher cause”.

What a bunch of very sick bastards. Not only they rob but they also kill people and they say they only doing their “jihad” (holy war). I hope they never felt sorry and remorse or repent from their deeds. I hope they will still feel righteous when they meet God in His Judgment Day. It will be great to see the looks on their face when God give His judgement on their deeds. I look forward for that day.

Sun Future, JBoss and Java Processor

According to me Sun does have tendency to be destroyed however if Sun has marketing peoples that mastering technology and marketing in balance then Sun can still survive. The problem is Sun marketing peoples seems mastering technology more than marketing unlike marketing peoples of Microsoft.

The Meryl Lynch analyst that said Sun is going to bankrupt is going a little overboard. Sun still has deposit of 4 billions US$ in the bank. Although it’s true that Sun having losses but Sun can still survive and reap profit as long Sun has the right strategy. Actually Sun main profit centre is selling hardware. In the past before PC become this powerful and Linux available Sun is quite profitable. Sun sold a lot of UNIX server hardware. Sun competitors are IBM, Digital, HP and SGI. Digital bought by Compaq. Compaq did not put first priority in high-end UNIX server because its main business is selling PC. Compaq buy digital mainly to get excellent engineers of Digital. HP is one of the smartest one when HP sees the increase in PC capacity and rise of cluster architecture in PC they stop developing their PA-RISC processor and switch to Itanium architecture and make Intel their best friend. Compaq did the same thing that is stop developing Alpha processor and switch to Itanium architecture. Compaq finally merge with HP. That means Sun main competitor is IBM. But IBM is also slowdown AIX development and focusing in running Linux in all its hardware line. SGI at this time also sell Itanium server with Linux.

Seeing this happens we can see that for high-end server in the future there are only 2 dominant architectures:

  1. Proprietary hardware (SPARC/PowerPC/MIPS) with proprietary OS (Solaris/AIX/Irix).
  2. Intel compatible hardware (Itanium/Opteron) cluster with Linux OS.

Companies will only choose architecture if their need is very high. Most of the company (90%) will choose architecture 2. This means market for Sun goods that produce lots of money getting smaller. Sun competitor this time IBM and HP already do the transition first. Sun is sleeping and still considers their proprietary solution is the best. Even though their solution is the best and they will be able to dominate market but the market is only 10%! They have to do the transition and excel at architecture 2 if not then the market for their goods keep shrinking.

Actually Sun has opportunity to transition into service and solution provider like IBM. Unfortunately in Java world Sun lost in J2EE application server competition form IBM, Oracle, BEA and JBoss. High-end market has been taken by IBM, Oracle and BEA while Sun only get little portion of the market. Low-end market has already been taken by JBoss. But Sun actually can get more portion of this market if Sun focus in this market. Even though do not excel in technology Sun can still excel by marketing program. For example an excellent marketing program is: Son sold Itanium server bundled with Linux and JBoss application server and documentation. If customers buy the server in cluster configuration then JBoss already comes configured as cluster. Biggest market for now is in mass-market, high-volume and low-margin market so Sun should embrace mass-market player like JBoss. Another excellent marketing program is: Sun create Java processor for Intel hardware. If the price is cheap and it can drastically increase performance of Java application many companies will buy it. I know Sun once create Pico Java and Micro Java but that’s not what I mean. What I mean is a co-processor in the form of PCI card which can be plugged in Intel compatible server and immediately increase Java speed drastically. Processor like this will sell a lot for companies using J2EE technology.

Java biggest threat: Is it Mono and not MS.Net?

Recently I checked out Mono. Mono project progress is very fast.
They will reached full compatibility with .NET Framework 1.0
this year or next year.

Java is a multi-os platform.
.NET Framework is a multi-language platform.
Mono is a multi-os and multi-language platform.
This is a very compeling benefit.

But the most compeling argument is:
Mono is Open Source while Java is not.
If Mono becomes mature it will surely lure
some of Java experts.