Eclipse in Action

Manning formally released Eclipse in Action today. I glanced through it last night at Barnes & Noble, looks like a great book.

I learned about a feature called Java scrapbook pages, described in Chapter 2:

… by virtue of its incremental compiler, you can enter arbitrary Java code into a scrapbook page and execute it—it doesn’t need to be in a class or a method.

Scrapbook pages allow you to test code directly in Eclipse without having to create a class/project with a main() method and then run it from the command line. Pretty handy, reminds me of the demo I saw of Jython at JavaOne.

MSXML2.XMLHTTP.4.0

Worked around a nasty issue on an ASP site today, I’m was using the MSXML2.XMLHTTP.4.0 object to post an XML packet to a SOAP server. Worked great on our development and staging servers, but I installed it (the app) on the client server today and get this… calling the send() method completely hangs IIS, you can’t stop the service, you can’t restart the service. Here’s the code snippet in question:

Dim objHTTP
Set objHTTP = Server.CreateObject(“Msxml2.XMLHTTP.4.0”)
objHTTP.open “POST”, “http://yourhost/endpoint.do”, false
objHTTP.setRequestHeader “Content-Type”, “text/xml”
objHTTP.setRequestHeader “SOAPAction”, “urn:myserver/soap:ThisName/thisMethod”
objHTTP.send xmlpacket
strReturn = objHTTP.responseXML.xml

The behavior I’m seeing is that the HTTP request doesn’t even get sent to the remote server, the IIS process becomes unusable, and restarting the W3/IISAdmin services don’t work. I’m using MSXML 4.0 Service Pack 2 (available here).

The Poetry of Programming

This article popped up in the JavaOne Today newspaper so ubiquitous at the conference. It’s a fascinating interview with Richard Gabriel, an engineer at Sun, who thinks that software engineering is less about engineering in the sense of building a bridge and well…

Writing software should be treated as a creative activity. Just think about it — the software that’s interesting to make is software that hasn’t been made before. Most other engineering disciplines are about building things that have been built before. People say, “Well, how come we can’t build software the way we build bridges?” The answer is that we’ve been building bridges for thousands of years, and while we can make incremental improvements to bridges, the fact is that every bridge is like some other bridge that’s been built. Someone says, “Oh, let’s build a bridge across this river. The river is this wide, it’s this deep, it’s got to carry this load. It’s for cars, pedestrians, or trains, so it will be kind of like this one or that one.” They can know the category of bridge they’re building, so they can zero in on the design pretty quickly. They don’t have to reinvent the wheel.

Another tidbit from the article was the mention of Paul Feyerabend, “… who argued that for knowledge to progress, people must violate some of their methodological principles.” What methodological principles have you violated today?

re: JSR-223 Rant

Matt wrote that he thinks that with JSR-223 “… Sun ignored an excellent existing scripting framework for Java (Jython) and opted to reinvent the wheel with Zend using PHP.”

Maybe someone can explain to me how JSR-223 is all about PHP… AFAIK, Sun did mention PHP as one of the scripting languages that could be used, but I seriously doubt that it will be the only one. Take a look at the Expert Group: Macromedia, Apple, Oracle, Zend, etc… Macromedia ColdFusion MX (and previous versions) can *already* use Java objects, the presentation I went to at JavaOne given by a guy from Zend noted that while PHP 4 and 5 can access Java objects, in his words “… it’s not scalable.” Is there something I’m missing?

util.concurrent

Haven’t seen this mentioned on the various JavaOne blogs, one of the more interesting things to come out of J2SE 1.5 (Tiger) is going to be the ‘util.concurrent‘ package that Doug Lea has been working on. I attended an excellent excellent session yesterday entitled “Writing a Scalable Server“. The presenter used (I think) some of the ideas from Doug Lea’s software, including such things as “selectors” and “pooled executors”. The result of the discussion was that Mark Reinhold was able to closely mimic the performance of an Apache web server using a server he wrote in Java, albeit with some additional memory usage.

Doug Lea is here, although I missed his session on Monday. Bummed about that.

Scripting Pages in JavaTM Web Applications

Wow! So much interesting stuff going on… One of Sun’s focuses for this week is ‘ease of development’. They think that the biggest market for developers in the coming years will be the so-called ‘corporate developer’. Along those lines, Tim Oreilly got up this morning and talked a bit about JSR 223: Scripting Pages in JavaTM Web Applications , which will enable developers who use scripting languages like Perl, PHP, and Python to use Java classes.

I don’t have any net access in the hotel, so I’ll have to brain dump in a couple days…