Struts and auto fill ... watch out =)
I was working on an ActionForm which has the property password. When I was testing the JSP view I wondered why the field always was filled although I never called the corresponding setter in the action. "Damn", I thought. "Where does this stupid value come from?" I had no clue. Then suddenly a light flashed through my mind: Mozilla has a nice feature called "auto fill forms" ... oh my =)
Apple's portables for Java developers?
Many of you may wonder if an Apple notebook for Java development may be worth a switch. Since MacOS X Apple provides an interesting platform for developers thanks to its BSD roots. Many usefull tools from the BSD and Linux comunities are available and easy to install. Apple even has ported JDK 1.4.1 to its operating system. So from the point of software availability everthing looks bright. Right. But software needs a hardware platfrom to run on. And that's the point where dark clouds are hiding the blue sky. Their fastest portable today are the 15" and 17" PowerBooks running at 1GHz. The flagship the 17" PowerBook features a 1GHz G4, 1MB L3 cache and 512MB RAM. Although Steve told us that this machine is very fast I can tell you it does not. At least for Java development. Here's how I found out:
A friend of mine owns the 15" PowerBook running at 1GHz with 1MB L3 cache. Therefore these machines are mostly identical from the speed view. The 17", however, features DDR333 memory. But many of us know that this is more or less a marketing gag because the current G4 cannot take full advantage of DDR RAM.
But back to my story. Together my friend and my installed JDK 1.4.1 and JBoss on the PowerBook. "Booting" JBoss takes around 20-25 seconds. On my little iBook 800 it takes around 35 seconds. Yesterday another friend of mine bought the new Acer TravelMate 800 for 2200 Euros. It features the new Centrino technologie from Intel. Although it is clocked at 1.6GHz only the performance correspondes to a 2.4 GHz desktop CPU. Our little tests proved that, e.g. compiling a very large C++ project on both the Acer notebook and an Intel based desktop PC. Now you may wonder how fast JBoss boots on this peace of hardware?
Around 7 seconds.
Boom. That's a noticeable difference for sure! Everything feels very fluid and sleek. IDEA feels like a native app and so does Eclipse.
Apple fans may say now: But PeeCee notebooks are noisy and running out of battery very fast. Wrong! This Acer is comfortable quiet. The fan seldom activates. And the runtime is nice as well: 3.5 ours are no problem.
Although I am not a great fan of the operating system running on the Acer (WinXP Pro) I am still convinced that a Centrino based notebook is the best what you can get for you bucks if your main focus is on Java software development. Compiling debugging and running Java apps needs pure CPU power which Apple has poorly failed to deliver. I really hope that Apple will switch to the new PPC970 processor as soon as possible and replace the outdated G4.
OGNL and Struts
Though I like JSTL I am sometimes missing the feature to call methods. Therefore I have played around a little bit with OGNL and Struts actions and I am very happy with the result. I have written a JSP tag that allows you to execute an OGNL expression. Furthermore I have extended my RequestProcessor once again. Now the action instance is visible to the OGNL tag as well. This allows me to call a method on the action from the OGNL tag! A sample JSP page might look like this:
<ognl:property value="formatTime(#created)"/>
Minor JavaScript bug fixed
The comment link was broken on Mozilla. Thanks to JavaScript guru pulsar this nasty bug was easy to fix.
Macs in Germany
There's a nice article about Macs in Germany on MacDirectory. Very worth reading (besonders, wenn man aus Deutschland kommt ;-) ). The article addresses many well known issues, especially the price situation (although it keeps getting better), the conservatively marketing of Apple Germany and the fact that not every German drinks beer :-)