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”


http://brucem.mystarband.net/vbnet.htm

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

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s