Got Firefox 1.5? You’ve got SVG!

May 27, 2006

I’ve been using Firefox 1.5 for a while but didn’t realise it comes with some builtin SVG support (a subset of SVG 1.1). Some interesting links:

Dynamic SVG generation under Firefox 1.5 using JavaScript, XML and XSLT

Building Rich, Encapsulated Widgets Using XBL, XForms and SVG samples Be careful with the GUI examples – they almost brought my machine to a dead stop :). This is not a competitor to Flash/Flex/Laszlo yet.

I was reading elsewhere that Google Maps and Microsoft’s live both use SVG to render the path when giving directions (when the Firefox browser is detected).

Can you see the famous SVG tiger?

typecase for Java

May 24, 2006

I was just reading Stephen Colebourne’s blog. He is the other of Joda-Time which looks to be a useful replacement for java.util.Calendar and java.util.DateTime… but I digress.

I was digging into the blog and found an entry about adding autocasts to Java by reusing the instanceof “syntax”. I quite like the proposed “syntax” (which is really nothing, the compiler just detects were you are using instanceof already). The consensus in the blog comments is that there’s a problem with the syntax because the variable can be assigned to. However that can be fixed by mearly disallowing assignment to the variable inside the instanceof block. All that said, it is much cleaner to use a special syntax like typecase to do this which introduces a variable binding. In this way, the expression need not just be a variables but could be a full expression – perhaps a method call e.g. the problem is shown by “if (fred.getBar() instanceof FooBar) {“.

Of course, this has been done before with the typecase expression like in Modula-3. Modula-3 is a very cool but dead language, a prerunner to Java with a more Modula/Pascal syntax. Check out the language spec for typecase. Unfortunately the original Modula-3 site, SRC, is down, perhaps try SRC later or Google’s cache of the original typecase page.

Software Engineering Radio

May 21, 2006

Discovered a “new” Java-related podcast, Software Engineering Radio. The interview with Ted Neward is good. Inspired me to take a closer look at Scala.

Playing with WebStart

May 8, 2006

I played around with WebStart this weekend to get my first WebStarted Swing app up and going. Click here to Click here to start. It’s signed but uses the PersistenceService anyway to save the contents of the editor pane between invocations. The lower pane is a my debug console :).

XML Abuse

May 1, 2006

Just in case you’re still abusing XML, here’s some pretty clear advice from back in 2002 from the author of Integration Patterns.