01 October 2010
The implicit API
Recently I had a little piece of general functionality to implement at work, in a web application I develop - we wanted to be able to trigger various events on the client side (for example pop-up a lightbox-style window), the catch being that the events were to be triggered on the server side, not directly in response to a client request. It is nothing too fancy to implement, a little queue in the database for the actions to trigger + setting up long-pooling in the clients browser suffices as the first attempt. However, I experimented with 2 or 3 designs for this to make it more convenient to use and in the process I realized something I think may be worth sharing.
Consider a typical small software project - a few programmers working together on a single project for a prolonged period of time. Requests for new features are coming in from a customer every few weeks. Some of the requests are probably similar in some ways, so people will want to build reusable modules for the most common tasks. Immediately, perhaps the single biggest problem of software development comes into play - communication.