Nov 19: Fighting JavaFX

I recently wrote a few postings about great Sun stuff. The reason for that? - Well since joining Sun I get all the information about the things Sun does and there are tons of cool things, I enjoy OpenSolaris, especially DTrace and zfs (zfs snapshots!) - these are great pieces of technology. Ok, you can feel that OpenSolaris isn't finished yet, but it's a good step from a classic Unix to a quite usable system.
Now Sun is famous for another product family: Java. For me Java has always been a synonym for ugly and annoying applets and over-engineered "enterprise" applications which are close to being unusable. Being Sun I learned about a new technology for fighting the RIA wars against Microsoft's Silverlight and Adobe's Flex: JavaFX. After browsing a while over the different sites I found out that key part of JavaFX is a declarative scripting language for creating user-interfaces. That sounds quite cool - no annoying and over-verbose XML and no procedural coding for describing a GUI, but a syntax which looks quite sane for that. So I wanted to give it a shot. And that's where the trouble began ...
Read MoreMay 3: Java and Arrays

One more thing out of the category "Java annoys me": In Java you can declare an array like that:
String[] array_of_strings = { "foo", "bar", "baz" };
but you can't do that inside a func call
someMethod({ "foo", "bar", "baz" });
not even when using an explicit cast
someMethod((String[]){ "foo", "bar", "baz" });
A smart compiler should be able to create the same code for both, I agree this can be unreadable, but that should be my choice not the language's choice.</flame>
Apr 20: Java und die Ursprünge

Der xenjo bemitleidet mich - das finde ich nett. Er erinnert uns auch daran, dass Java für alles mögliche gedacht wurde, wer mehr will: James Gosling, mit dem ich ja im Januar zu Mittag war, hat das letztens auf Video kommentiert.
So genug der Werbung für den Arbeitgeber.
Apr 19: Building WebApps with JEE

For a university project I have to develop a web based application using Java Enterprise Edition which will be based on Apache Tomcat. Afterdoing some initial setup on my development machine I did some simple tests to see whether everything works. So my first JSP file looked something like this:
<html>
<body>
<%
out.println(request.getParameter("foo"));
%>
</body>
</html>
Coming from web security I knew this being a XSS security problem since the user data is directly given to the output stream. Of course this is simple test code but as a self proclaqimed web security expert I havbe to think about such issues before even starting with implementation of the real app - even though the real app is just for university. So I browsed through the JEE documentation to find some method to encode HTML output so I asked a few friends with more Java experience and the only solution I found was using Apache Commons' org.apache.commons.lang.StringEscapeUtils which is no part of the JEE framework, a framework which was created with web apps in mind. How can that be? Are JSP based applications supposed to be unsafe? - And people say PHP was unsafe, which really was made for "solving the web problem" and offers all the things you need in it's core API.