A couple of years ago, at OOPSLA '06, I think, I had a lot of fun hanging out with Jarda Tulach and Rich Unger and writing a generic library for enqueueing a batch of jobs that run against an object on a background thread.
The fun part was really getting to dig into the java.util.concurrent classes, to do it such that enqueueing work is always non-blocking and transparently handles scheduling of...
on May 5, 2009
A few of months ago I blogged about a simple but powerful pattern for working with Objects not key/value pairs - use dynamic proxies to generate an implementation of an interface, which delegates to the backing storage transparently. It's ready to become a small open source project.
Names are important — they should either be communicative and say what a thing is/does — or they...
on May 5, 2009
One pattern that is an incredibly frequent recurring theme is converting an Object of type A into an object of type B for something that understands B to consume. Tons of libraries have something like this embedded in them - beans binding, pretty much anything that validates strings. If there were ever something that deserves a simple common library, it's this.
I was just looking at Fabrizio...
on May 1, 2009
For a while I was desperately expecting an important moment. Since I wrote the Practical API Design book, and since its amazon page was created, I've been waiting for first customer review. Almost daily, at least at the beginning, I was watching whether it had already appeared or not. I always opened the
book's page being afraid of what I would find. I feared to see something like unreadable,...
on Jan 19, 2009
Happy New Year 2009
I am late on wishing you, still I have got some exciting stuff for all..
Dec 24, 2008
I began another blog series, the most interesting one I guess! As part of my university courses, where I was introduced to "Gang of Four" design patterns in recent past. I felt quite excited about them, so lets see whatâ€™s in store for all of usâ€¦
Jan 02, 2009
As per the above announcement...
on Jan 9, 2009
There is one thing that I've overlooked until today, which is the importance of the division of the controller into application "flow(s)" and application "service(s)". For a good while now, I had been keeping controller code separate from service code (which in turn called the DAOs, that used Spring DAO, that used Hibernate, that interacted with the DB, etc.). However sometimes business logic...
on Dec 5, 2008
A few months ago I wrote a blog about javaspaces and its (lack of ?) popularity. The blog fuelled an interesting debate.
Yet, some of my concerns remained unanswered. Surely if Javaspaces technology had acquired more popularity by now,
many space based patterns and techniques would have been described over the internet.
Today, I will embark myself in such a task and attempt to describe a...
on May 12, 2007
First of all, thank you everyone for being present at our session TS4721, I took some pictures of you guys (almost 1700 people) to prove to my boss why it is really important to speak at JavaOne. Of course it is a joke, my boss really knows how important it is.
Fabiane and I really worked hard to deliver as good as possible of a presentation, because we respect individually any person in the...
on May 9, 2007
I recently attended a
JUGS meeting where Prof. Nierstrasz introduced some
details about his new book, titled Object-Oriented
Reengineering Patterns. Very interesting lecture based on a project that aims to research and to produce
tools for supporting the refactory of legacy code. Professor started asking the attendants
what you mean by legacy code? and also presented some basic concepts about...
on Jan 25, 2007
Weakly typed sudo java delegate implementations seem to be a dime a dozen these days. After reading the latest article on JDJ http://sys-con.com/story/?storyid=49097&DE=1 about yet another weakly typed implementation for java delegates I decided it was high time to put my brain to work on implementing strongly typed delegates. With a little imagination and some magic it was quite simple,...
on Apr 11, 2005
Time flies... Can you believe it's been ten years since Design Patterns was written and published by the Gang of Four? If you're not familar with this book, you should be: Design Patterns: Elements of Reusable Object-Oriented Software by Gamma, Helm, Johnson, and Vlissides (affectionately known as the "gang of four") introduced the world to the idea of creating reusable, general OO designs that...
on Oct 27, 2004
Let us start with a need
Given a user name, userid and an email address create a user. We can call this "createUser" transaction with three parameters name, id, and email.
Let us see how a client can invoke this horizontally
Conceptual horizontal invocation using key value pairs
client -> calls -> execTransaction(requestName="createUser",name="", id="", email...
on Jul 17, 2004
While preparing for an upcoming session at OSCON 2004, I have collected some sample code for dealing with factory patterns in java applications. The specified URL lists some demonstrative examples of the idea. The examples deal with simple object instantiation, simple object instantiation using IMultiInstance, simple object instantiation with parameters, simple object instantiation with...
on Jul 14, 2004
While preparing for an upcoming session at OSCON 2004, I have collected some sample code for dealing with configuration in java applications. The specified URL lists some demonstrative examples of the idea. The examples deal with XML configuration files, Property file configuration files, Reading mandatory keys, Providing default values, Reading objects from configuration files, Configuration as...
on Jul 13, 2004
I have been trying to summarize and document some of the server side programming/design patterns I have used while building Aspire/J2EE/XML. I am quite happy to see the idea come to fruition as it was accepted as a session at the upcoming (very soon) OSCON 2004 to be held in Portland, Oregon. The presentation covers application patterns, data access patterns, business logic patterns, presentation...
on Jul 7, 2004
Working with ServletRequest's setCharacterEncoding for UTF-8 form submissions
Aspire, the product that I developed over the last few years while I was working with java, servlets, jsp and XML, is being used on some SBIR projects involving JetSpeed and a few other open source tools. I have got a call the other day indicating that one of the forms is not accepting Vietnamese input. They are getting...
on May 21, 2004
City of Heroes Update
Well CoH has launched and I've been playing for a few weeks. Here's my rundown of the game so far.
I have to say I'm very impressed with CoH. Although it has some pretty severe limits they've done an awful lot of things right.
One of the first things you notice on entering CoH is the vast array of choices for your character's look. I really have yet to see 2 players that...
on May 10, 2004
One of the first tasks that I performed for my employer was to diagnose and resolve a several minutes long CPU spike on the database server for one of our J2EE applications. All of our servers were well monitored, and without much ado we were able to pin the spike on a specific use case. As it turns out, the culprit was a use case for exporting Loan Application records from our company to a...
on Apr 26, 2004
In this article I want to explain an architectural model that I use often called "parts and pipelines" using an example. This model is especially useful in declrative programming. This article will start by introducing an example where a web page will update some content on the server side. The quoted example will be analyzed to explain parts, pipelines, and declarative programming....
on Feb 6, 2004
Nowadays "type" is an important programming language construct. A type gives a certain authenticity and a certain gurantee and a certain solidity to the programming practice, not to mention the metadata aspects of it while using IDEs. By the same token it binds you to that contract and could prove to be inflexible at times. In the web world things are fluid: hashtables, dictionaries...
on Jan 27, 2004