2010-03-21

Google goodness: using GWT with Guice

The Google Web Toolkit and Guice are two very useful technologies. This post explains what they are, how they can be used together and what benefits this brings.

You have been coding too much in Eclipse if...

You have been coding too much in Eclipse if:
  • you are typing Control-1 to make the red underline from a spell checker go away.
  • you are typing Control-Shift-O to expunge deleted emails from your inbox.
(I did both today.)

2010-03-13

File system storage and servlets

One of the blessings of the JVM is that there are many “pure” databases available for it; Sesame (RDF) and Apache Derby (relational) come to mind. Alas, these databases need to save their files somewhere. This becomes a challenge with Servlets: Where should one put these files? Pre-packaged, read-only, files usually reside in SERVER/webapps/app/WEB-INF/, but mutable files? Putting them in WEB-INF makes upgrading a web application more difficult. I can easily imagine myself accidentally removing such data during an upgrade. The best solution, that I was able to come up with, is:

2010-03-09

Collecting only those BibTeX entries that are used in a document

Scenario: You have a large single file with all your BibTeX entries. This is convenient while writing, say, a paper, because everything is immediately available. After you are finished, it becomes a problem, though, because when you send the sources to someone else, you always have to send the complete BibTeX database with them. I’ve found two solutions for extracting only those BibTeX entries that one has actually used from a database:
  • RefTeX (comes with Emacs): Invoke “Ref -> Global Actions -> Create BibTeX File”. RefTeX continues to amaze me, it has many useful features for managing references, tables of contents, etc.
  • Bibtool (available e.g. via MacPorts)

2010-03-01

Is it time for a JVM-based web browser?

Figure 1: Screen shot of JWebPane in action (source).

There are currently two exciting platforms for which one can develop:
  • The Java Virtual Machine (JVM). Advantages: Great tools, hosts many languages, lots of free software is available for it (databases, support for many file formats, etc.), supports modularity (OSGi, Jigsaw).
  • The web browser. Advantages: One can quickly try out an application without downloading anything, URLs encode application states and are bookmarkable, the ability to clone application states via tabs, integrates hypermedia and data streams of all kinds.
Then how about combining these two platforms? It seems like a missed opportunity for the JVM that all major browsers now have JITs for JavaScript, but none of them uses the JVM. What would a JVM-based web browser look like?