Nonstop Mega Mix
Who says Java doesn't have mixins?
OK, I'll admit it - I went to an ApacheCon session on Ruby yesterday, to see what the big deal is. There's syntactic sugar, sure, but there are some interesting liberties taken with the ideas of object oriented programming.
One of the neat ones is mixins, which offer a way to bring some commonly-used functionality to many parts of your code. There isn't really a straightforward Java analogy for this - you can use an interface to declare that many classes share a similar capability, but you can't use it to actually share the implementation between classes (indeed, it's a good thing that classes can implement the interface in different ways).
One analogy you could make is that a mixin resembles a cross-cutting concern in aspect-oriented programming, because in both cases, you're trying to put the same code in many different places.
Mohan Radhakrishnan takes this a big step further in
In today's Feature Article, by explicitly using AOP to deliver mixins in Java. In Writing Mixins using AspectJ, he uses the concept of event-notification code, something that many classes will have to support, yet most will do in pretty much the same way. In the article, he offers three progressively simpler versions of supplying common event-notification code: an AOP version without mixins, one with mixins, and one that uses J2SE 5.0 annotations to declare AOP join points.
"I spent a good chunk of last week fussing with how rocky internationalization support can be... Enough software failed to handle these [cases] that it was pretty awkward. I won't name names, but I did file bug reports."
Eitan Suez has had
"Epiphany is to Gnome what Camino is to MacOSX: a web browser that uses Gecko but its UI uses the Gnome and GTK APIs for a user interface. Epiphany was designed to fit in on a Gnome desktop. Indeed, it is the endorsed web browser for Gnome."
In Handling Type Codes in Your Domain Models, Jacob Hookom writes:
"With complex enterprise systems, we often times find ourselves with lots of 'flags' or 'types' within our database tables. Utilizing Hibernate's UserType facility, we can handle these types in such a way that will carry extra behavior and information within your domain models. "
In Projects and
the JDK Community spotlights JVM performance: "Record setting Weblogic 9 set the world records running on Sun's Hotspot JVM. David Dagastine blog has more examples of Sun Hotspot JVM performance leadership. SOOOOO how does JRocket work with a Java Client? Kirill Grouchnikov gives a hint by yelling out show me the money."
The 65th issue of the JavaTools Community Newsletter features news from a number of projects, a list of new community projects, a tip for using Eclipse perspectives, and a call for JavaPolis attendees to meet community leaders Fabiane Bizinella Nardon and Daniel López, who are attending this week's conference.
In today's Forums,
mayhem appeals for a performance improvement in
Re: EA based lock removal in Mustang-b63!:
"Of course, it's understandable that you don't have enough time/resources to implement stack allocation for the Mustang release. But still, IMHO it's probably the most important optimization missing in Hotspot to make Java performance competitive with C/C++ in certain areas (for example scientific and game programming). Another potential benefit of stack allocation is improved performance of iterators and "closure expressions", which can also aid implementation of other, more functionally oriented programming languages in the JVM."
From the Mobicents project,
Google Talk Voice opening up
: "The google team seems to be delivering on their promise to document and standardize the XMPP voice extensions: http://www.jabber.org/jeps/inbox/jingle.html and http://www.jabber.org/jeps/inbox/jingle-audio.html Any takers for a Jingle RA and JCC provider?"
In Also in
the JDC Tech Tip Variable "Arity" Methods introduces J2SE 5.0's support for "varags methods", which allows a method to take a variable number of arguments. "Prior to JDK 5.0, if you wanted to pass an arbitrary set of arguments to a method, you needed to pass an array of objects. Furthermore, you couldn't use variable argument lists with methods such as the format method of the MessageFormat class or the new to JDK 5.0 printf method of PrintStream to add additional arguments for each formatting string present... JDK 5.0 adds a varargs facility that's a lot more flexible."
BusinessWeek claims Java's hold on the enterprise is slipping in Java? It's So Nineties, wondering "can it possibly be that Java -- once the hippest of hip software -- has become a legacy technology, as old and out of style as IBM's (IBM) mainframe computers and SAP's corporate applications? Mounting evidence points to yes." Javalobby founder Rick Ross' commentary criticizes the article's selection of evidence and sources, calling it "a grab bag of potshots at Java from people who have a clear and obvious interest in trying to gain something at Java's expense. "
In today's java.net
News Headlines :
- Sun to Ship Derby DB
- AjaxAnywhere 22.214.171.124
- yFiles 2.4 - Graph Library
- JGroups 2.2.9 Final
- Big Faceless PDF Library 2.6.5
- Koalog Constraint Solver v3.0
Registered users can submit news items for the
href="http://today.java.net/today/news/">java.net News Page using our
form. All submissions go through an editorial review 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
Current and upcoming Java
- December 12-16, 2005 - JavaPolis 2005
- January 9-12, 2006 - Enterprise Java Architecture Workshop Mexico
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
Archives and Subscriptions: This blog is delivered weekdays as
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 href="http://today.java.net/today/archive/">java.net Archive.
Who says Java doesn't have mixins?