Skip navigation

Get your EJB's testable

Connecting disparate API's can be tricky, strange, but ultimately quite appealing. I once had to expose Jini services in a servlet. This was a little odd because Jini sees the network as very dynamic, with services appearing, disappearing, changing states, etc., ]]>


Note: today's daily blog was written by Chris Adamson (invalidname), Associate Online Editor for java.net


In today's Weblogs, Daniel Brookshier reports on New Education Projects at GELC: "Many more projects have been added to the Global Education and Learning Community (GELC) at java.net. Again we have quite a mix from a student's exploration into Java, a Tapestry project and even an attempt to create a web interface in the style of one of my favorite BBC programs 'Connections'."

Billy Newport's SDTimes comments on OSGI links to an article on the emergence of the Open Services Gateway Initiative (OSGI) as a standard for third-party plug-ins. Billy takes it a step further: "I think OSGI has a big future on the server side. Andrew talks about the bulk etc of J2EE containers but if we could get the open source and commercial application server vendors using OSGI for their runtime frameworks for servers then a lot of interesting things could happen."

John Reynolds writes: " Rich Web based applications are far from "new", but there still doesn't seem to be a general consensus on how they should be constructed. To the contrary, there are a dizzying array of options for constructing both the client and the server parts of the equation." In The Rich Web Client conundrum, he takes a top-level view of the options, both on the server and client sides, and works out what factors in your application will dictate a particular choice.


In Also in Java Today, Just in time for last-minute holiday shoppers, java.about.com's Kevin Taylor has assembled his list of the Top 10 Must-Read Java Books. From concepts to API listings, swing to servlets, he says "these books are must-reads for every professional Java programmer, no matter their specialty or experience level."

Writing Jetspeed portlets is somewhat like writing servlets. Portlets need to function well in a framework and on a page full of HTML elements. In A well-behaved Jetspeed portlet Bob Fleischman constructs the LinkFarm portlet for Jetspeed 1.5 and examine techniques for coding a portlet that doesn't interfere with other portlets.


In Projects and Communities, The Java Web Services and XML home page is featuring Qusay H. Mahmoud's java.sun.com article Getting Started with Java Message Service (JMS), a "fast track introduction and tutorial to JMS and its programming model."

The Java User Group community includes the the j2me-cdc JUG . People from all over the world are invited for "discussion, the exchange of source code and documents, and anything related to J2ME CDC technology."


In today's Forums, cowwoc notes the cost of A Keyword Suggestion : 'check': "It is *extremely* difficult to introduce new keywords into a language, not only from a technical point of view but also from a social point of view. If we're going to do such a thing, there has to be an overwealming evidence that the majority of the community likes your suggestion and will be positively affected by it. I am a strong believer in putting up strong resistence to any new feature requests within applications not to mention within Java itself. We are all best served by running new ideas through a tough gauntlet. Those that do not come out the other side might have been good, but not great enough to warrant the cost."

To those who want more choices in terms of compilers and build tools to build J2SE from source, kellyohair writes in Re: More Flexible Build: "Certainly using a single compiler with the same command line has it's advantages. And I also have wondered if it might be better to use one compiler. But in reality we have not been able to use the same gcc compiler on all Linux machines, we have to use different versions. Speaking as someone that builds the J2SE on Solaris, Linux, and Windows all the time, when you crank up the optimization level to the max, you want the best optimizing compiler available, where best includes quality and performance. And the ABI stability of the Linux g++ compiler and runtime libraries is a major pain right now, in my opinion."

subanark for a Mustang feature he calls Unique Maps: "I couldn't find any class similar to this in tiger (correct me if Im wrong). I would like to see a class like this:

public interface UniqueMap { public static class Identifier  {}  E get(Identifier identifier);  void put(Identifier identifier, E value); }

This way you can put items into a set with a given type and take them out without casting (assuming that there are multiple types in the set)."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Get your EJB's testable

Enjoy the occasional ego-stoke

My wife once told me that it really blew her mind that my ability to program allowed me to create whole new applications. The funny thing about this is that I sort of discount my skill on the basis that the world of computers is totally contrived and fake - one layer of abstraction atop another atop another, with practically its only connection to the physical world being the flipping of tiny electronic gates in chips. Over the years, I've become far more impressed with professions like medicine, which are intrinsically about real life, as it truly is. Put another way, there's no API to fix a birth defect or cure a disease.

But it's not like I'll turn down occasional shout-out. :-)

Roger Brinkley was surprised to get this kind of adulation, from a family relation, no less. In The Way Cool Relative, he writes "Then out the blue the 17 year old son of one of my cousins looks at me says,'Do you work on Java?'. His dad quickly piped in, 'Can't you tell from his shirt?'. I was wearing one of the Java.Net T-shirts." After discussing Java and touring java.net's Java Games Community and Java3D project, the young man turned to his dad and said "Dad, you never told me we had any way cool relatives!"

Also in today's Weblogs, Joshua Marinacci discusses XML to Swing and the Gradual API, in which he laments the many attempts to create products that allow you to build GUI's with XML markup, noting that many have been over-complicated, required massive rewriting of existing code, and didn't play nicely with others. "I think the problem is that when we come up with new technology we create it to work in an ideal world, always forgetting that most developers have to deal with legacy code, old data, and ancient requirements. Its very difficult to adopt a new solution if the solution requires you to change everything you do all at once."

James Todd has an announcement of today's JXTA team chat. In JXTA 2.3.2b , he provides details and links to the myJXTA2 application used for the chat, available as source, binary, and Java WebStart (.jnlp).


Note: today's daily blog was written by Chris Adamson (invalidname), Associate Online Editor for java.net


In Also in Java Today , Bill Burke has written the first part of his EJB 3.0 Preview saying that the focus for the new release is ease of use and simplification. Burke shows how deployment descriptors are simplified by taking advantage of the J2SE 5.0 annotations. Also, "Home interfaces have been completely removed for all EJB types. They never made much sense for stateless beans, and had only limited use for stateful sessions." Burke also calls out many of the changes to Entity Beans in the 3.0 spec.

"At one time or another, however, most web developers have complained about the limited capabilities when using a browser as a client." So begins Mark Eagle, noting browsers' mutual incompatibilities, limited GUI options, limited support for storing state, etc. The alternative, is the Rich Internet Application (RIA), which puts more presentation and logic on the client side than is typically found in web applications. In Integrating Macromedia Flex with Java, he shows how to use the Flash-based Flex as the client-side of a Java based systems, and notes which habits and perceptions developers need to leave behind as they move to an RIA mindset.


In Projects and Communities, the Global Education and Learning Community recently featured docclerk, a document editing and publishing system with automatic version control. The goal of the project is to show how to use various open-source frameworks in a project, such as Tapestry, Spring, and Hibernate.

The Java Communications Community project jgossip describes itself as "simple and powerful Java forum software" implemented with J2EE and Struts. The recently-released version 1.0 runs on multiple application servers, offers unlimited forums and categories, and has powerful management features.


In today's Forums, userkcpeppe takes a step back from the Make switch() and case: work with any object or primitivediscussion to look at the big picture of what's being discussed: "The most important feature about any language, natural or otherwise is simplicity. In natural languages, isolated language groups tend to be very complex and difficult for outsiders to learn. It is only when you have preasure to interact that the complexities of language are shed. I see this in english all the time. Airlines now incorrectly use regular rules of grammar to smooth out irregularities. They do this on purpose because it simplifies the language and in doing so, ensures that non-native english speakers understand what they are saying."

peterkessler responds to anecdotal comments about startup times in Re: Under the Hood: "What you should do is take your application(s) and try them with both JDK-1.4.2 and JDK-1.5.0. Those are the only numbers that matter. I'd be curious what you find. It's sometimes tricky, though, to figure out when an application is finished starting (are the bits in the graphics pipeline, or are they on the screen yet?). We have some hooks for that, if you are interested."

Responding in the thread Re: It's more important that Java programs be easy to read than to write, yishai writes: "First, any superiority of a language has to be defined in the context of what you are trying to accomplish. If you are trying to write the equivalent of a 10 line bash script, Java won't do it for you, won't do it well, and won't be worth your while. Neither will C#. So lets define some context for which you think C# is more appropriate."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Enjoy the occasional ego-stoke  
kfarnham

Crucial semantics Blog

Posted by kfarnham Dec 7, 2004

Dotting i's, crossing t's, hoping to keep the lawyers away

License discussions often come down to splitting hairs, as creators try to balance conflicting desires for protection and shareability. I was quick to slap GPL notices on the code for some early articles I wrote, thinking that was the "most free" option. Instead, it prohibited anyone from using my code in a proprietary product... exactly what I didn't want to do. Putting it completely in the public domain didn't seem right either, because then it wasn't "mine" anymore, and even though I wanted to see it broadly used, I didn't want to someday find my own work with a "Copyright 2005, Bob's Code Shack" notice on it. Lately, I've settled in on anMIT license, which provides for only a minimal attribution notice and an "as-is" disclaimer. I think this is the right thing to do - ask me next year if it's worked out.

The Cajo project has wrestled with a similar issue. Project owner cajo has chosen the LGPL license, because "our community wishes to allow its use in both non-free, as well as free software. Of highest importance is to ensure that it cannot be 'embraced and extended'™ into something proprietary." But he has some concerns with how LGPL is intepreted for Java, which doesn't "link" in the way that C does. In When is an object using, vs. based-on an object? He writes: "My question: what is a reasonable, objective criteria to say: Object A uses, but is not based-on object B? Conversely, at what point does object A become a derivative work of, and therefore subject to, the license of object B?" This post is part of the discussion of Java Evolution Possibilities and Examples, and if you think you have an answer for him, I hope you'll join that discussion.

Also in today's Forums,peterkessler discusses shared archives and what's going on Under the hood: "You can see us edging towards that slippery slope with the work we put into JDK-1.5.0. At installation time we take some of the classes from the bootclasspath and tease their class files into read-only and read-write portions as they would exist when loaded into the JVM, and build what's called a "shared archive". The archive can be memory mapped into subsequent JVM's (and the read-only portion shared between JVM's), saving class loading time. See the Class Data Sharing doc for details. We'll probably do more interesting things with these archives in the future (but I'm not pre-announcing anything)."



 

rexguo has a request for Mustang, in a discussion calling for Sun to fix the indentation in the JDK source code. He writes "I think equally important is having more comments. I was very surprised to find the lack of comments especially on the 'internals' code that is not part of the public API. Comments for these code are critical to the understanding of the codebase and why things are implemented in a particular way."

Note: today's daily blog was written by Chris Adamson (invalidname), Associate Online Editor for java.net


In Weblogs, Mark Roth invites you to Come discuss and help shape the future of the J2EE web tier: "On Tuesday Dec 7th at 11:00 AM Pacific, Roger Kitain and I will be hosting a JDC chat on the Faces 1.2 and JSP 2.1 technologies, which are part of the upcoming J2EE 5.0 platform. We look forward to chatting with you! The chat can be found on the SDN Chat Sessions page"

John D. Mitchell responds to yesterday's blog by Erik D. Meade,Fartlek - Increasing your Sustainable Pace. In Rhythms in Software Development, he says "the fartlek metaphor doesn't really work in the software development world because the stress of high pressure work doesn't e.g, make us more capable of sustaining a faster base pace or increase our peak performance." Instead, he says "a more appropriate metaphor for what Erik is talking about is the notion of rhythm. Humans, both individuals and groups, function in rhythms. The rhythms come in various granularities such as daily, weekly, seasonally, etc. and various types such as mental, physical, emotional, and spiritual."

David Walend is opposed to the proposed standard coding style that says generics should be denoted by a single letter. In Naming Generic Types, he says "some of us are old enough to have used systems with a limit the length of variable names. But I haven't seen anyone use 'x' as a generic double name in years (caveat coordinates). We left that habit behind because of the confusion it caused."


In Also in Java Today , one of the most powerful features of Apache XMLBeans is the ability to customize its code generation by supplying a configuration file. In her article Configuring XML Beans, Hetal Shah shows how this customisation brings a number of benefits in terms of flexibility, reusability, simplified code, and maintenance.

You don't want to instantiate objects when you don't have to. For example, you wouldn't want to create a Math object to compute abs(x). Daniel Savarese argues that conversely you don't want to overuse static methods in his JavaPro article When Static Methods and Code Collide. He writes "There's nothing wrong with a library presenting static methods as a convenience, but too often it is done without also providing the more flexible mechanism alongside it. It's better to give library users more choices rather than fewer."


In Projects and Communities, the dunamis project, in the Java Patterns Community extends the concept of proxying to allow dynamic delegation. Featured in a recent ONJava article, dunamis allows you to provide implementations of interfaces, abstract classes, and even concrete classes at runtime.

Members of the Java Tools Community can catch up on community activity in Issue 16 of the community newsletter. This issue highlights many new projects that have joined the tools community, a graduation, and a tip on using CVS auto-expanding keywords.


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Dotting i's, crossing t's, hoping to keep the lawyers away  
kfarnham

Carried from the field Blog

Posted by kfarnham Dec 6, 2004

Can you train for unsustainable pace?

I hope our international readers will permit me an American football analogy as I fill in for Daniel. Don't worry, it will come around to Java after a paragraph or two.

The date is January 2, 1982. The San Diego Chargers are in a playoff game against the Miami Dolphins, in a game that will go down as one of the greatest ever, tagged with the nickname "The Game No One Deserved to Lose". The Chargers jump ahead to a 21-0 lead in the first quarter, on their way to a seeming blowout. But somehow the Dolphins recover and tie the game at 24-24. Then the game emerges as a shootout, with the teams swapping touchdowns back and forth until it's 38-38. The players are ravaged by the effort, some losing over ten pounds over the course of four hours, with Chargers player Kellen Winslow repeatedly treated for a pinched nerve, cramps, dehydration, and more, later saying "I never felt so close to death before." Yet he manages to get himself back on field to block a potential game-winning field goal by the Dolphins, which puts the game into overtime, with the teams again marching up and down the field, alternately missing and blocking field goals. Finally, the Chargers kick a field goal and win 41-38. Players are too tired to celebrate or mourn and Winslow is not even able to walk off the field - he's carried off by two teammates.

For their troubles, the Chargers win a trip to Cincinnati the next week, where they play in a wind-chill of -59 degrees Farenheit (-51 C) and get blown away 27-7, ending their season.

All of which is meant to illustrate that you can survive the short-term crunch, but without recovery time, you collapse in the long run.

This sort of athletic analogy is offered by Erik Meade in his weblog Fartlek - Increasing your Sustainable Pace. He applies it to the "crunches" that are all too familiar in software development, noting " typically business misses two things in this process, starting from a sustainable pace and recovering. So they take teams, which are already working at an unsustainable pace, and slowly, continually turn up the pressure." He suggests the idea of the "fartlek", a running technique in which you introduce bursts of speed in the middle of a long-distance jog, allowing you to train for different levels of exertion and to handle the rapid acceleration and subsequent recovery. Unfortunately, what's often missing in the software world is adequate recovery, which makes the fast pace unsustainable.

Also in today's Weblogs, Eitan Suez's JDNC: "The Gap" .. between Swing and Business Application GUIsdiscusses where Swing's virtues end and where its problems emerge, and how the JDesktop Native Components (JDNC) address Swing's weaknesses: "this blog was originally going to be about JDNC but in the course of writing, I've discovered that JDNC is more of a derivative, a consequence of a more fundamental issue regarding most developers' love/hate affair with Swing."

In Scrum Gathering Oct '04 William C. Wake writes about a recent gathering for those interested in the Scrum agile process. "We spent a lot of our time trying out a variety of simulations and other means to help teams understand what it means to do Scrum. I contributed two exercises: Push Line/Pull Line (a demonstration of lean manufacturing), and Second Agenda (a role-play of a standup meeting)."

Note: today's daily blog was written by Chris Adamson (invalidname), Associate Online Editor for java.net


In Also in Java Today , the Core Java Tech Tip Converting Images to BMP/WBMP explains J2SE 5.0 support for working with the bitmap and wireless bitmap image formats. The tip also provides example of using different "compression types that are specified in the BMPImageWriteParam class by the type strings: BI_RGB, BI_RLE8, BI_RLE4, and BI_BITFIELDS. "

Mapping relational database tables to Java objects usually involves a lot of code, configuration, and a fair amount of trouble. The problem, according to Jim Paterson, is one of "impedence mismatch": "the object model is based on software engineering principles and models the objects in the problem domain, while the relational model is based on mathematical principles and organizes data for efficient storage and retrieval." But for small applications with more modest needs, dropping relational performance for object-orientation may be a good choice. In Simple Object Persistence with the db4o Object Database he introduces db4o, a small, embeddable, object-oriented database with a particularly Java-friendly API.


In Projects and Communities, Hans Mueller of the JavaDesktop community, has followed up his compendium of 50 Swing component libraries with an equivalent list for markup languages. His blog Your Christmas shopping troubles are over: more than 40 Java Markup Language Editors collects descriptions of Java tools for UML, HTML, and XML.

Mark Roth and Roger Kitain will answer questions about JSP 2.1 and JSF 1.2 which are designed to improve the alignment of these two technologies in the area of expression language, and to enhance their ease of use. Join the JSP and JSF edition of JavaLive December 7. 11:00 A.M. PST/19:00 UTC.


In today's Forums,fuerte kicks off a topic by declaring that It's more important that Java programs be easy to read than to write: "Graham Hamilton says that 'it's more important that Java programs be easy to read than to write'. [...] Wouldn't it be easier if Java had literal strings like C#, so that backslashes would not need to be doubled, and quotation marks wouldn't need to be escaped?"

roytmana has also started a thread, suggesting thatMustangshould Add Filter interface to java.util: "Please add a simple Filter interface to java.util and filtering method to Collection class. It is one of those simple universally useful interfaces like Comparable which really should be in java.util."

User mgrev has another suggestion: Start up specific implementation forums: " I suggest to create a new master forum that the individual developers at Sun can use to communicate implementation ideas for the 'small' stuff. For instance, the developer responsible for creating a new layout manager, say DockingLayout, can quickly an briefly post his idea about how to implement it and what features he intend to include. Then that can commented and if need arises the community can help to polish the idea."

Finally, rickcarson responds to suggestions that generics can straighten out casting problems, declaring in Re: Smalltalk that "I *loathe and despise* generics with a passion. I *also* don't like any of the other 'features' which mean that my 8+ yrs of highly tuned mental parsing of other peoples crap Java code just got made obsolete... (especially the syntactic sugar ones)."


In today's java.net News Headlines :


Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.

Can you train for unsustainable pace?  
kfarnham

In the middle Blog

Posted by kfarnham Dec 3, 2004

Is "would be nice" a compelling reason for a new language feature?

The Java Mustang forum continues to be a great source of new ideas and debate over enhancements to the next version of Java. One recent topic that's attracting a lot of attention is called Between operator. The idea advocated by original posteryishai is that Java should have a tertiary operator that returns true if an argument is between two values, as in:

 if (1 < var < 10) {
      System.out.println("var is greater than one and less than ten.");
   }

This has spun off a lot of responses. monika_krugnotes that it's little more than syntactic sugar for 1 < x && x < 10, and tsinger observes that it could be implemented as an isInOpenInterval method. But regexguy supports the idea, saying "This is such an intuitively obvious thing to read, and I have many times, over the years, wished I could write this very thing whether I was programming java, C++, f77, ..." And then patrikbenomakes three counter-arguments:

1) i think this would break the way expressions are evaluated, operator associativeness etc
2) it is not worth introducing new keyword even if this would be a solution
3) it would be first operator that takes three arguments (var, min, max) which introduces complexity to current expression evaluation scheme

The discussion continues on this topic — several replies have been posted since I started writing today's blog, so why not head over and join in?

Also in today's Forums,walter_bruce tries to clear up misconceptions about "extended primitives": [Extended primitives are] a solution for entities [that] perhaps should have been included in Java's set of primitive types but were not. Usually because they are only needed in particular application subdomains (eg, complex numbers or 3D points). Because Java provides no way to extend its set of primitives, programmers resort to encoding these as small objects currently. However the memory (and performance) overhead for small objects can be quite high and they could be more cleanly and efficiently represented as extended primitives if Java allowed them.

The discussion about making switch() andcase work with objects as well as primitives has brought up issues about languages that mix primitives and objects, like Java, and those that are objects-only, like Smalltalk. Some find Java's approach to make things harder than necessary —kcpeppe writes "Yes but even within this discussion topic (Mustang), there have been others who have spoken out against the over complication of the languge. I also know many others that are also not for the the feature but you won't most likely hear from them in this forum which is unfortunate."

In today's Weblogs, Eduardo Pelegri-Llopart calls attention to the filing of JSR-261: Java API for XML-based Web Services Addressing. "The JCP EC will be voting on this proposal in the next couple of weeks. If the proposal is approved, we expect a few additional members to have an EG that represents the interests of platform vendors, tool vendors and other types of users of the technology"

John O'Connor says You don't know beans about the next version of NetBeans: "unless you've checked out the latest NetBeans 4.0 RC1 release, you really don't know beans about NetBeans. If you've been using the 3.x line of NetBeans for a while, this new version may be somewhat challenging at first."


In Also in Java Today , Terrie Miller blogs about a classic aptitude test, asking Can You Handle the Robot Test?. "'The Robot Clerk Test' was administered by the US Census Bureau to interested Civil Service employees who had scored high on the Federal Service Entrance Exam. Those who scored high on the robot test were eligible to receive computer training and go on to better jobs in the Bureau as programmers, doing the work to process the data from the 1960 census."

Apsect-Oriented Programming can turn traditional programming models on their head, and that, in turn, can be challenging for tools like IDE's. Fortunately, IDE's and AOP are coming together. In Compiling an AspectJ Project Using Eclipse, an excerpt from the new ApectJ Cookbook, Russell Miles shows you how to download, install, and use the AspectJ Development Tools for Eclipse, which provide a graphic view of where AOP advice will be inserted into your code.


In Projects and Communities, the NetBeans community that Release Candidate 1 of the NetBeans IDE 4.0 is now available. The release plan highlights 4.0's major features: ant-based build system, J2SE 5.0 support, refactoring, mobility, web app development improvements, debugger improvements, and more.

The JiniCommunity's Harvester application container allows you to develop and deploy Jini applications by building "services using a servlet-like API, and the container handles some of the sticky issues in Jini - in particular it manages your codebase and provides an http server for codebase downloads.


In today's java.net News Headlines:



Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Note: today's daily blog was written by Chris Adamson (invalidname), Associate Online Editor for java.net

Is "would be nice" a compelling reason for a new language feature?  
kfarnham

A DRY wit Blog

Posted by kfarnham Dec 2, 2004

One aspect beats a hundred pastes

The first time I edited a piece on aspect-oriented progamming (AOP, also known as AOD for "aspect-oriented development"), I couldn't see past the logging examples and think of uses for AOP other than inserting new code into already-deployed instances. And while that's great, there's more to the concept, as Monika Krug writes in her first blog entry AOD and DRY.

DRY, in this case, means "don't repeat yourself", something that's often hard to do for small blocks of code that aren't suited to being their own methods, and hard to avoid when you've got that nice, friendly paste command on your menu bar. Her example shows a potentially much-repeated block of code for working through a possibly-empty Collection, and how an AspectJ aspect can eliminate the duplicate special-case blocks in not only the classes she's presented, but in any similar classes that might be developed in the future.

Also in weblogs, Andreas Schaefer expresses his concern about how Sun defends the Java trademark. In Sun vs. JavaGeeks.com: Does Sun own Java or only the Java(tm) Language, he discusses Sun's challenges to the name of the JavaGeeks.com website, saying " I was completely shocked that Sun is challenging this domain name especially because many other websites are using Java in their name"


Editor's Note: Chris Adamson is authoring this daily editor's blog for this first week of December. Daniel is very grateful.


In Also in Java Today , Elliotte Rusty Harold notes that instead of focusing on the ease that RELAX NG brings to tasks that can be accomplished using W3C Schema Language, you should look at the things that RELAX can do more. In RELAX NG with custom database libraries Harold writes "RELAX NG is not limited to one preordained collection of primitive data types with a limited set of facets for extension. RELAX NG enables developers to define custom type libraries that can assert any constraints a program can verify."

Michael Feathers says that passing nulls takes him back to warnings by his high school math teacher of the dangers of dividing by zero. In When Nulls Aren't Nasty, he explains that he passes in nulls all the time. He does it in test code not production code and gives examples of how and why.


In Projects and Communities, the Java EnterpriseCommunity's home page links to Satya Komatineni's notes on localizing server side applications. "Items include managing two locales for your server side applications: one for language and one for formatting."

One of the richest pages in the JavaPedia is the page devoted to Patterns. A recent post to the discussion suggests you "refactor toward that pattern or away from it depending on whether the pattern's consequences, strengths, and trade-offs are appropiate for the program."


Continuing with the debate of whether to make switch() and case work with any object or primitive, Monika Krug weighs in with a perspective on primitive and objects in today's Forums. "I think not everything needs to be an object. Primitive data types, if structures, loops, methods should be just that, not be forced into being objects. 'Almost everything is an object' as in Java is great, 'absolutely everything is an object' as in Smalltalk makes the language unnecessarily complicated."

murphee disagrees with some ideas regarding treating functions and methods as first class objects: "I think learning several completely different languages (Java: OOP,managed memory; C: structured programming, own memory management; SML: functional, managed memory;,...) is a benefit. It's a nuisance at first, but it broadens your view. At my University (TU Graz) we did exactly that (we got taught: C, SML, Java in that order), and this gives you the best of all worlds. BTW *only* learning Java is not a good idea; students should be exposed to manual memory management at least once in their life, so they can actually see the advantages of managed memory."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.


Note: today's daily blog was written by Chris Adamson (invalidname), Associate Online Editor for java.net

One aspect beats a hundred pastes  

Filter Blog

By date: