Monthly Archives: February 2008

Java Remoting – Benchmark

Recently, I am looking into Java remoting. I need to find the fastest protocol in remoting spectrum in order to ship a large number of objects across the net. Here I found a great article that experimented several popular remoting protocols and did a comparison. The protocols covered include: RMI – Java remoting standard, each method [...]

Postgresql – Power of Array Type

Create 2 tables Item(id) and Item_log(item_id, price) Populate it insert into item(id) values(1); insert into item(id) values(2); insert into item(id) values(3); insert into item(id) values(4); insert into item_log(item_id, price) values(1, 100); insert into item_log(item_id, price) values(1, 100); insert into item_log(item_id, price) values(1, 100); insert into item_log(item_id, price) values(1, 200); insert into item_log(item_id, price) values(1, 200); [...]

Unit test your layered architecture

Unit test is to test the logic of a class with its dependencies mocked. To do that, here are the best practices I used when I test classes in different layers of my project. Use TestNG TestNG is a replacement for JUnit. It “fixes” many of the issues with JUnit, and we will use it [...]

Spring MVC – Part 1

Introduction of Spring MVC I have heard that Spring MVC is cleaner and well-design than Struts 1.x. I found it no surprise as Spring already wins the heart of most J2EE developers like us. I decide to take a look at Spring MVC and see how I can logically map my concept from Struts to [...]