The Java NIO package is all about performance. That’s why, through this post, the word performance is going to be repeated often, showing where the NIO package increases your application’s throughput. It’s important to note that the “old IO”, the java.io package, is not bad to use and some features of it are not covered by NIO at all: however, in many situations involving data flow, the NIO package provides significantly faster IO operations.
I wrote about GWT’s lack of drag and drop a long time ago, and since then have done many things instead of making a generic drag-drop mechanism as promised. Luckily, some other people have, and it seems like their solution is quite good and solves a wide array of drag-drop problems.
Since it might be interesting to some, this post will be about how a generic draggable component can be written. I’ve coded a draggable panel at the time to help make any Widget into a draggable version of itself, and I’ll describe how that was done. Warning: This is a step by step recipe on how to make a draggable widget of your own. If you’re just looking for code examples or a library, you’d better take a look at the previously mentioned project’s code and binaries. Continue reading »
Know when you have a lot of objects relying on some database information, but there’s no way to tell whether that information has been changed? I’m not talking about the majority of data in a database, just the little bits that help the application start itself. As an example, a distributed tax calculation application, where each accountant uses it to manage his clients. However, when it loads, it reads some critical information - tax rates, for example. These don’t change often, but when they do, you wouldn’t want to have to tell everyone to restart the application, would you?
So what are the options we’re left with?
- Have a big button saying “Refresh Configuration” and have the users click it whenever an email to do so is distributed to them.
- Have a function that does the checking periodically for them, basically “pushing the refresh button” every now and then.
- Register for database notifications, and be alerted when a change in a table you’re interested in has occured.
The first two options are okay-to-have, but aren’t useful when talking about applications which have no daily human-interaction or that cannot afford to check a database for changes constantly (and even if so, it is critical for them to be aware of change in certain tables as soon as they happen), such as distributed research applications being configured remotely using a single database. Continue reading »