The road so far….

May 24, 2010

Spring JavaConfig: redefining the Bean defination mechanism

Filed under: java, maven — Tags: , — Rahul Sharma @ 9:26 am

Spring core by default provides a whole range of options to wire the application and all of them are based on the XML approach.  But the XMLs are loosely types and can cause problems. Spring-JavaConfig provides a new approach to wire the whole application through java Classes only. It is strongly typed and much more powerful than the traditional approach. (more…)

May 20, 2010

Apache Tika = Power to Parse Almost Everything

Filed under: java, lucene — Tags: — Rahul Sharma @ 10:19 pm

The other day I was browsing through the subprojects that have evolved under Lucene. There are a couple of them that have been organised for a couple of varied purposes. So I landed at Apache Tika. Initially it sounded something like any other parser but latter when I started playing, it was quite a fun. (more…)

May 16, 2010

Some useful componenets to tweak Lucene

Filed under: java, lucene — Rahul Sharma @ 9:55 am

Lucene is a comprehensive package for indexing and searching. Several other top-level packages have been built on it. But if you are working directly with Lucene-core here is a list of components that I have found quite handy in tweaking it so as to suit to your requirements. (more…)

May 13, 2010

EasyMock expectation(EasyMock.expect) flavours explained

Filed under: java — Tags: , — Rahul Sharma @ 10:29 pm

The EasyMock  framework for unit testing is quite powerful and has loads of mocking APIs for all purposes. One of the most important APIs for mocking is the createMock API. Using this we can create mock objects for a specified interface and then record and verify the method calls. Events are recorded in the IExpectationSetters, which can be created by the EasyMock.expect API. After creating the IExpectationSetters we can set the returned result/calling behavior using the different options available. (more…)

May 10, 2010

Use Spring FactoryBean for your factories

Filed under: java — Tags: — Rahul Sharma @ 10:12 pm

Spring has been the cornerstone of many applications.  It offers many gems that we employ in our current day-to-day activities eg PropertyPlaceHolderConfigurer, used to load properties, Resource, can be used for loading files/streams from any location etc. But besides these most popular ones Spring also offers some hidden ones that are not out-of-the box components but yet quite useful ones. Here I will explain FactoryBean/ObjectFactory in Spring that can be used to implement factories. (more…)

Older Posts »