Bad start with Spring part 2

Recently, I realized that Spring 2.5 was really old already. I was even called out for it: Terence why do you start with Spring 2.5 now when Spring 3 is already over a year old? – Sean Patrick Floyd Feb 24 at 10:50 The quote came from a comment in my question on StackOverflow. Anyway, I decided to try and use Spring 3.0 because of that. One of the new things that I encountered was the way Spring 3....

March 7, 2011 · 5 min · 1042 words

Bad start with Spring - Resolved

In my previous entry, I started to learn how to do simple CRUD operations using Spring-MVC’s JDBC feature. Unfortunately, it didn’t turn out to be as simple as I thought. So my problem was with this unit test that was failing because it returns an empty result set: 1 2 3 4 5 public void testGetCompany() { Company company = companyDao.getCompany(1); assertEquals("Benjo", company.getName()); } This is getCompany()’s logic:...

March 6, 2011 · 3 min · 445 words

Bad start with Spring

Recently, one of my good friends asked me to make a simple web application for them. Since I’ve been wanting to learn Spring for quite some time now, I decided to take on his request because I’m such a good person. Just kidding, I really just wanted to have an excuse to learn Spring. After a few minutes of Google searching, I came across the official tutorial for Spring MVC. I noticed that the tutorial was a bit outdated and had a few errors, but I still managed to finish the tutorial in spite of that....

March 1, 2011 · 10 min · 1962 words

Inheritance in Java

DISCLAIMER: This article is a bit hard to swallow so I’ll try to explain it to you as simple as I can. I also need to mention that there are other concepts that will also be introduced in this chapter aside from Inheritance. This is my first post for 2011, so happy new year! Anyway, as a preparation for my upcoming preliminary exam in Java, I decided to write about Inheritance in this article....

January 29, 2011 · 8 min · 1582 words

Access Modifiers in Java

As I’ve said in my previous entry, classes should never be invoked like this: 1 2 3 4 5 6 7 8 myCar.brand = "Porsche"; myCar.color = "Black"; myCar.name = "911 GT3"; myCar.speed = 120; myCar.gear = 2; System.out.println("myCar is a " + myCar.color + " " + myCar.brand + " " + myCar.name + "."); System.out.println("myCar is running on " + myCar.speed " miles per hour on just gear " + myCar....

December 12, 2010 · 6 min · 1184 words