Tim Bray on HttpURLConnection
Good information on a bad API. The comments are good too:
HttpURLConnection's Dark Secrets: If youre programming in the Java language and want to talk to a Web server, there are several libraries you can choose from. HttpURLConnection is one popular choice, and for Android programming, the engineering team has now officially suggested that you use it where possible.
Looks like I'll be waiting for Netbeans 7.1.1
jVi Home Page: NetBeans 7.1 Bug 205835 can lose edits; a variety of jVi commands run into this. jVi-1.4.5 disables itself if it detects module versions with the bug, AFAICT. The bug is scheduled to be fixed in NB-7.1.1; sometime around January/February.
Seriously, how can you ship without vi?
Maven 3.0: 50% to 400% speed improvement?
A drop-in replacement with 50% to 400% speed improvement? That sounds too good to be true.
Matt Raible: The main improvement in Maven 3 is speed. It's been performance tuned to be 50% to 400% faster. Benchmarks (guaranteed by integration tests) include better: Disk I/O, Network I/O, CPU and Memory. Another new feature is extensibility so Maven is a better library rather than just a command-line tool. Now there's a library and APIs that you can use to do the things that Maven does. Plexus has been replaced with Guice and it's now much easier to embed Maven (Polyglot Maven and Maven Shell are examples of this).
Apparently it is not entirely true, at least not yet (Maven 3.0 is still in beta). I tried switching to Maven 3 for the Roller 5 build and hit several build errors related to class-loading and JPA byte-code enhancement.
Maven support in IDEs
I've been switching around between the Eclipse, Netbeans and IntelliJ IDEs at home and at work. I've found that fiddling around with multiple IDE specific project configurations and launchers and class-paths is no fun at all. That's one of the reasons I got interested in Maven. Yes, Maven is a build-system but it's also a sort of IDE portability solution. Maven projects can be loaded right into all the major Java IDEs as you can see in the screenshots below. IDEs can find your sources, resources, dependencies and via the Maven Jetty plugin even run your Java webapps from the IDE -- things that are not possible if you're using a custom Ant build-script as we were doing before with Roller.
Here some screenshots that show the various Maven IDE plugins and their dependency graph feature.
Roller / Maven Eclipse 3.5 / M2EclipseHere's Roller loaded into Eclipse via the Maven M2 Eclipse plugin.
By the way, if you want detailed instructions for getting Roller 5 up and running in Eclipse with the Eclipse Web tooling, check-out Harald Wellman's helpful blog on the topic: Setting up Eclipse for Roller.
Roller / Maven in Netbeans 6.8Here's Roller loaded into Netbeans as a Maven project.
Roller / Maven in IDEA IntelliJ 9.0And here's Roller loaded into IDEA IntelliJ as a Maven project.
I'm not sure which I prefer yet.
Atom news: Apache Abdera graduates
Congratulations to the Apache Abdera team, who've just graduated to full Apache top level project status. The don't have the new site at abdera.apache.org up yet and they're still not quite at 1.0 yet, but this is a major milestone. They've got the best Atom format and protocol toolkit around, in my opinion.
RESTful JSF in the works?
JSF spec lead Ed Burns just pointed out that some of my Sun-internal comments about JSF have made it outside the firewall and into an issue on the JSF specification project:
On Wed, 19 Mar 2008, David M Johnson said:
I think the goal should be to make JSF applications RESTful by default, with proper use of GET and POST, i.e. only use POST when application data is changing, not for component state. Another goal should be clean, book-markable URLs that only carry path-info and parameters needed by the application logic.
That's easy and the default situation with Rails, Grails, Struts, etc. How hard would it be to redesign JSF along those lines? Would it require EJB2 -> EJB3 level changes to JSF?
I suspect work on JSF 2.0 is too far along for this kind of change now, but it's nice to hear that the idea of a truly RESTful JSF is at least under consideration.
Struts 2 in Action
Struts 2 is my favorite Java web framework these days; it's REST-friendly, simple, easy to use, very flexible and the only thing it has with its creaky old Struts 1.x parent is the fact that it's an action framework rather than a component framework like JSF. As most of my readers probably already know, Struts 2 is based on WebWork/XWork the framework that powers JIRA and Confluence, two of the coolest Java webapps around.
Apparently, I'm not alone in this thinking -- I keep on running into folks at JavaOne who feel the same way. But unfortunately, Struts 2 docs are lacking, so I was very happy to see two new books on Struts 2 at the JavaOne bookstore. There's Struts 2 in Action, a rewrite of the classic Manning book, and <a href= "http://www.apress.com/book/view/1590599039">Practical Apache Struts 2 Web 2.0 Projects from Apress.
I picked up a copy of Struts 2 in Action on Monday and it looks great so far, but I've only skimmed it. I'll let you know what I think once I dig-in on the flight home.
If you're at JavaOne, check out TS-5739 - Hands-on Struts2 by Ian Roughley (author of the Apress book) today at 10:50 AM in Esplanade 307/310.
Social Software at JavaOne 2008
Social Software for Glassfish screencast
I mentioned the Social Software for Glassfish (SSG) EA2 release before the winter break, but I never got around to posting any details. Since then some documentation has appeared, Manveen Kaur blogged it, The Aquarium too and now screen-cast master Arun Gupta has created an excellent Social Software for Glassfish screencast that walks you through the features in this very early access release. Now I don't have to say nearly as much.
Abdera AtomPub server refactoring
I've got to carve out some time ASAP to take a close look at this. The code is in Abdera SVN and there's <a href= "http://cwiki.apache.org/confluence/download/attachments/69763/abderaserverguide.pdf"> 20-minute implementation guide (PDF) too:
James Snell: Dan Diephouse and I have been spending the last week refactoring the Abdera server framework with the goal of making is less complicated, easier, and generally better.
Yahoo Weather RSS module for ROME

Apparently, I spoke to soon about ROME being in maintenance mode. There's an all-new Yahoo Weather module for ROME from Robert "kerbernet" Cooper.
ROME vs. Abdera
For Java developers starting out with RSS and Atom, here are some notes to help you figure out the differences between the Java.net ROME and Apache Abdera (incubating) projects.
ROME is a set of Java tools for parsing, fetching and generating all forms of RSS and Atom feeds. The core ROME library is relatively small and depends only on the somewhat creaky old JDOM XML parser. Available separately are modules to support various feed extensions such as OpenSearch, iTunes, GeoRSS, etc. ROME was originally developed and open sourced by Sun Portal dev team members in 2004.
ROME Propono is a subproject of ROME that supports publishing/editing entries and files to blog servers and AtomPub servers. Propono is made up of three parts: 1) a Blog Client library can publish via either the old lagacy MetaWeblog API or the shiny new AtomPub protocol, 2) an AtomPub client that publishes only via AtomPub and 3) a framework for creating AtomPub servers. Propono was developed by Ramesh Mandava and Dave Johnson, based on code from RSS and Atom in Action and open sourced as part of the Sun Web Developer Pack in 2007.
Abdera is a set of Java tools for working with Atom feeds and AtomPub protocol. This includes a parser, writers, an AtomPub client and a framework for creating AtomPub servers. Abdera's Atom feed parser uses STAX, so it uses less memory and is faster than ROME. Abdera's Atom feed support is more comprehensive than ROME's and it supports signatures, encryption, Atom to JSON, extensions for Threading, Paging, GeoRSS, OpenSearch, GoogleLogin, etc. etc. Abdera was developed by IBM and contribued to Apache in 2006.
Now let's compare frameworks. The pros and cons of ROME are:
- Pro: complete RSS support, all of the dozen various flavors
- Pro: it's generally simple and small, depending only one jar (JDOM)
- Pro: easy to understand and use the AtomPub server framework
- Pro: MetaWeblog API support
- Con: Atom feed support not as comprehensive as Abdera
- Con: parser uses lots of memory, slower, JDOM based
- Con: community not as active, seems to be in maintenance mode (See also Ohloh stats)
The pros and cons of Abdera are:
- Pro: comprehensive Atom feed support, lots more Atom extensions
- Pro: faster more efficient parser
- Pro: In the Apache Incubator with active and growing community (See also Ohloh stats)
- Con: lots of dependencies
- Con: AtomPub server framework poorly documented, overly complex (rewrite coming soon)
- Con: no RSS support (there is something in Abdera contrib, but it's incomplete).
There you have it. ROME and Abdera folks: think that's a fair comparison? Are you a ROME or Abdera user? How would you like to see these frameworks move forward?
Holiday project: JMaki for Roller
Over the holidays I avoided doing anything directly related to my current set of work tasks. Sun went quiet, which helped, and I ignored the messages that piled-up in the Roller user and dev lists. It was so quiet that I had time for a fun little project: a JMaki plugin for Roller.
JMaki makes it easy to use JavaScript widgets (Dojo, Google, YUI, etc.) from PHP, JSP, JSF and now Roller. To use a widget, all you have to do is call a method or include a tag and JMaki takes care of including the right JavaScript files and generating the right HTML for you. That's not all JMaki does, there's also a pub/sub facility to make it easy to wire widgets together via events, there's a proxy for fetching remote resources common table and tree data models. The theme is cool widgets with ease-of-development and that's what I'd like to see in Roller. You can read more about the JMaki value proposition on the Why Use JMaki page.
Here's an example. Below is a Roller page template that uses two JavaScript widgest, the Dojo Clock and the YUI Data Table. All it takes is a single line of template code to include each widget, and one widget is dynamic i.e. the table is populated via an RSS feed.
<html>
<head><title>JMaki test page</title></head>
<body>
<h1>JMaki test: dojo.clock</h1>
$jmaki.addWidget("dojo.clock")
<h1>JMaki test: yahoo.dataTable</h1>
$jmaki.addWidget("yahoo.dataTable", "/roller/xhp?id=rss","","")
</body>
</html>
And here's what that page looks like when displayed by Roller:
I'll write more about the plugin once I install it on this site. If you want some details about how the plugin was developed, you can read the email that I sent to the JMaki dev list: JMaki for Roller issues and suggestions. It links to the Java source code for the plugin.
PHP support in Netbeans
Hadn't heard about this one until today, but Netbeans 6.1 will have plugin support for creating, editing, deploying to Apache HTTPD, running and even debugging PHP projects. Check out the details and screenshots on the Phantom Reference blog.
Here's a sceenshot from the Netbeans Wiki page on PHP:
Groovy support back in Netbeans
After going missing in NB 5.5, Groovy support is back in Netbeans. Basic Groovy support with syntax coloring and support for running scripts from the IDE is available in plugin form (download page) for Netbeans 6.0 (starting with RC2), read about it on Geertjan's blog.
Here's what's coming after Netbeans 6.0, Groovy project support:</>
After Netbeans 6.0, the story gets better. Geertjan writes that a brand new Groovy plugin will be available in the post-6.0 builds that adds support for three types of Groovy projects: applications, class libraries and Grails webapps.
Blogapps 2.1 released
<a href=
"http://www.amazon.com/dp/1932394494?tag=bloggingrolle-20&link_code=as3&creativeASIN=1932394494&creative=373489&camp=211189">
The next releases that I'd like to announce are the Blogapps 2.1 Examples and the Blogapps 2.1 Server.
If you'd like to learn more about the Blogapps examples and server then read The Blogapps Project article at Java.net. Here's a quick summary:
The Blogapps project hosts a collection of useful RSS and Atom utilities and examples from RSS and Atom In Action by Dave Johnson. They're designed to be useful even if you haven't read the book and they're available under the Apache License 2.0 so you can use the code in your applications and you can modify and redistribute them as you wish.
What's changed since 2.0? The examples have been updated to include the latest version of ROME Propono, which means that most of them now support the final Atom protcol spec. The server has been updated to include Roller 4.0 RC5, which also includes Atom protocol support and JSPWiki 2.4. And of course, various bugs have been fixed. Here are the release files, installation instructions and release notes.
This blog entry was posted via Atom protocol and the MatisseBlogger blog-client, which you can see in the screen-shot below (which was also posted via Atom.
What's next? Not sure at this point, but I will do another Blogapps release once ROME 1.0 is released.
OpenJPA 1.0 released
Congratulations to the Apache OpenJPA team on making their first official release since graduation. I wish I'd paid closer attention to the OpenJPA mailing lists and tested the release candidates. Oh well. I'll download and test the final 1.0 release and maybe we can get it into Apache Roller 4.0 RC2.
re: Java needs an overhaul
Tim Bray: Java still remains by far the largest development ecosystem, and the selection and quality of libraries put pretty well any other language’s to shame, and it’s really fucking fast, and has superb tooling, and we know how to run it securely, and it’s Open-Source. So, if you want to move the state of the art along, a smart idea would be to work with, not against, Java.
Finally, something I can agree with on the topic.
APP interop event today and congrats to Atomic Joe Gregorio
I wasn't paying attention and this one snuck-up on me. Today at noon Pacific Time there will be an online Atom Publishing Protocol interop event. The location is IRC on the Freenode network in the #atom channel: irc://irc.freenode.net/atom.
I'm really glad I didn't miss this announcement because I spent much of the last two weekends updating the <a href= "https://rome.dev.java.net/apidocs/subprojects/propono/0.5/overview-summary.html"> ROME Propono and <a href= "http://cwiki.apache.org/confluence/display/ROLLER/What%27s+New+in+Roller+4.0">Apache Roller 4.0 implementations to work with the final version of APP (draft #17). I've got both implementations online now and ready for interop.
And in kinda sorta related news, one of the founders of the Atom effort Joe Gregorio is leaving IBM and heading over to Google. Congratulations Joe! I hope this doesn't mean you'll be leaving the Triangle behind.
Finally... "go to file" in Netbeans
I've been waiting years for this one. As Roumen Strobl points out, the Netbeans 6.0 nightly builds finally include a "go to file" feature, much like CTRL-SHIFT-R in Eclipse (but in Netbeans 6.0 it's CTRL-SHIFT-O).
I'm diggin' 6.0 and it's starting to look pretty stable in advance of beta1, which is coming out this month. Grab a nightly build and check it out. According to Tor on the Java Posse the nightly builds are likely to be more stable than the most recent M10 milestone release.
