Archive for the ‘Java’ Category

Database unit testing

Tuesday, September 15th, 2009

Most of the server side applications use database back-end. Being used to Test-Driven Development practices, it is desirable to be able to write a test for numerous stored procedures we put in our code. Building Java code to launch a simple stored procedure, flush database and setting to a predefined ...

Java XML Book

Monday, August 17th, 2009

Here is a nice tutorial on XML and parsing methodes: http://www.cafeconleche.org/books/xmljava/

Facebook API Key

Wednesday, August 5th, 2009

Don't understand why getting Facebook API gotta be so complicated. Here is a video tutorial that would save an hour of your precious time: [youtube]http://www.youtube.com/watch?v=jYqx-RtmkeU[/youtube] If you are looking for a Java Facebook client, look no further then Facebook Java API. That's a well maintained open source project hosted by Google. Java ...

Cron Expression

Wednesday, May 6th, 2009

For cron expression syntax see the following link: http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html

Importing data into Oracle DB using JDBC

Thursday, April 30th, 2009

There aren't many options to efficiently push data into a database from the application layer. Using JDBC insert statements packaged into prepared statement and wrapped into batch is the easiest option. It seems to be the most efficient option to bypass Hibernate and other application layers. However, soon you are ...

Unit Testing Java class

Tuesday, March 17th, 2009

Testing is a very important aspect of software development. Testing properly is even more important.  Otherwise what exactly you are doing? How does it work for me? First, you need to know what you are testing. This includes understanding the scope of the software component. In most software shops junior developers are left ...

Apache common builders

Tuesday, March 17th, 2009

Apache common provides a lot of useful common utilities. In the following article Aaron Zeckoski demonstrates on how to use commons-lang package in your code: http://bugs.sakaiproject.org/confluence/display/BOOT/Using+commons+lang+for+object+comparison

Better DB Programmer: Table parameters

Tuesday, March 17th, 2009

Recently we were investigating another performance optimization for our database application. The result was the best: we found a better business solution that made complicated changes obsolete. Nevertheless, it forced us looking into various interesting options. We had an extremely fast in-memory cache with some in-progress session stored. On the other ...

Database scaling

Wednesday, March 11th, 2009

Database is a common bottleneck in most web oriented systems. Most of those are designed using a stateless model with a central database at the backend. They all start small and some have a chance to grow into a huge system. The following article describes a history of company that ...

Wildcard search for object database

Thursday, March 5th, 2009

SQL Server based databases support "like" functionality. If someones uses an in-memory hash map to replace a database table, like predicate for the query might be needed. Java String doesn't support the wildcard comparison but provides a regular expression engine. The following class takes advantage of the later to implement ...