Skip to main content

Nothing but Java?

Posted by daniel on November 24, 2003 at 8:28 AM PST

Since before java.net launched in June (before it was called java.net) we had this notion that the content would not need to be restricted to Java-centric topics but should be of interest to Java developers. There may be Perl or Python related content that might interest you.

But what about .NET. For obvious reasons, many of the discussions on C# and .NET sites are of interest to Java developers. We've pointed to such content in the past and it usually results in interesting email in my in box. I don't really know where to start. On the one hand, this should be no big deal - on the other hand, .NET content is a hot button issue for many Java people. It's almost like a loyalty litmus test. Please use the feedback to this blog to let us know what you think.

A few years back I had just completed contributing ten chapters to the Java 2 Bible for, what was then, IDG books. My editor on that project had moved to a different publisher and he contacted me about writing one of the first books on C# (before it was called C#). I called Jason Hunter and he pointed out some good reasons why I did not want to write this book and I went on to other projects. It was a good decision for me at that time. I am a bit of a Mac bigot. Moving to C# would have meant spending an inordinate amount of time working in Windows. Sure I have a Windows box or two set up for testing and working for some clients who insist on it, and I have a Linux box just because, but most of my time is spent in Panther happily coding, writing, and editing.

In any case, I think we will get interesting interplay between the two communities. We have had lively discussions as a result of the differences in opinions about checked exceptions between C# architect Anders Hejlsberg and Java's James Gosling. Erik Hatcher wrote a nice QueryParser Rules article and one of the readers ported the example to NLucene.

In October we pointed to Larry O'Brien's Java Eye for the .NET Guy. Larry wrote "When it comes to cross-cultural pollination, .NET programmers could learn a lot from the Java world’s half-decade of writing managed code. Of course, there are those who’ve accused .NET of being a rip-off of Java from the start, but as .NET has become more familiar and the 'Tiger' release of Java reveals that learning from the competition is a two-way street, those voices have begun to quiet." OK, let's put aside the comment "there are those ..." and accept that of course .NET borrowed heavily from Java. But Larry's point is that .NET developers could, therefore, benefit greatly from building on the experience of the Java community.

But .NET has a single corporation pouring a great deal of money into resources for that platform. Money is being spent to attract Java authors and programmers to write about .NET. In many cases, much of what they write can apply as it is written to development in Java. Even if you see it as an us vs. them situation, you don't want them to know things that we don't. O'Brien points out that "The Java world is a real community. [...] in 'The .NET Code Wise Community,' Microsoft’s presence is palpable and can be somewhat stifling, like a sanctioned school event where the principal is sitting in a corner reading a magazine."

This began as a simple paragraph about why, from time to time, we will link to .NET content. It has turned into a rantlet. The trigger was this link in Projects and Communities . The Java Patterns home page links to an article on the Factory Method Pattern. Factories are all over the J2EE and J2SE APIs. If you want to parse some XML but don't know which parser you will use, you end up with a Factory. Many of your favorite projects have Factories for flexibility. Amit Goel's article is not that different from other articles you may have read about Factory. The two main differences are that it appears on O'Reilly's .Net site ONDotnet.com and the examples given are from the .NET Framework Class Library.

Our other link is to a new project in the Education and Research community. Starting this year, there is a Java language version of the Advanced Placement exam in Computer Science. The ap cs teacher java resource cdcould provide a nice place for these teachers to share assignments and discuss preparing their students for the spring exam.


In Also in Java Today there is a nice exchange of ideas about Using mock naming contexts for testing. Simon Brown presents some code that uses a property file and a factory together with mock objects to unit test "a class that looks up data sources, topics, queues, etc from JNDI." Greg Vaughn responds that he considers this type of mock object collections to be a harness and he says that in place of the property file " your test setup can just call new ContextHarness() then bind whatever mocks are needed to it. The actual code under test only has to call new InitialContext() to receive a reference to it." Compare the code in their two posts.

Also, Joe Walker's JavaWorld article Bug Patrol classifies bugs in the four categories of current, latent, accidents-waiting-to-happen, and poorly organized. I spent some time this weekend fixing code I'd written that exhibited each of these four types. Joe surveys software that can help you spot and remove such bugs including FindBugs, PMD/CPD, Checkstyle, Jalopy/Jacobe, JDepend, JUnit, and Eclipse.


In his last featured Weblogs , Vincent Brabant wrote about coding styles. This time he focuses on building styles in I want an IDE that manages its projects using Ant. Last time he wanted the freedom to format his code the way he wanted and use some application for translating his code back and forth between the accepted project style. This time he writes that if every IDE used Ant under the covers, "By having all IDE using Ant build.xml file, you will be able to work in a team where everyone can choose his IDE. You will assure that commited code is compliant with your rules."

We also feature two different sorts of posts about Apache. John Mitchell encourages you to read about the Apache Software Foundation working on new/updated software licenses. He links to a page that summarizes the proposed changes and asks you what you think of them. N. Alex Rupp explains Why I won't move my projects to Apache. Here we are at java.net working to build communities around development and Rupp writes, "I think the need to develop a strong community can work to the detriment of individual development." We're pretty low key with our actual projects but I'm not sure I understand this point yet (unless the emphasis is on the word need).


In today's java.net News Headlines :

Registered users can submit news items for the href="http://today.java.net/today/news/">java.net News Page using our
news submission form.
All submissions go through an editorial review by news director Steve
Mallet before being posted to the site. You can also subscribe to the href="http://today.java.net/pub/q/news_rss?x-ver=1.0">java.net News RSS
feed.


Current and upcoming Java Events:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e"> events submission form.
All submissions go through an editorial review before being posted to the
site.


This blog is delivered weekdays as the href="http://today.java.net/pub/q/java_today_rss?x-ver=1.0">Java Today RSS
feed. Once this page is no longer featured as the front page of href="http://www.java.net"> java.net it will be archived at href="http://today.java.net/today/archive/index_11242003.html">
http://today.java.net/today/archive/index_11242003.html. You can
access other past issues in the href="http://today.java.net/today/archive/">java.net Archive.