跳过导航

editor

十一月 2005 上个月 下个月

Deadline day for JavaOne 2006 session proposals

Are you planning on speaking at JavaOne 2006? Not if you don't get your proposal in before the end of the day. The Call for Papers closes today.

I spoke at last year's JavaOne in support of a book I co-wrote, and it was a very different experience than other conferences I've spoken at. There's the size thing, obviously: our session had hundreds of people in attendance, up from the dozens at O'Reilly conferences I've done, or the five that attended a talk I did at ADHOC 2004.

More than that, though, the JavaOne sessions stress consistency between sessions more than smaller conferences. If you're accepted, you'll get a template for your slides, and you'll have to get them in months before the show, so they can be checked, edited, and polished by Sun and show staff. They also have enough experience to know what does and doesn't work in a session, so expect feedback about the scope of your talk, whether there's enough code or too much, etc.

By the way, rehearse! A lot! My co-author and I had to work through some technical problems with our demos at the show (he had just moved out to California, so collaborating was difficult), and we really didn't have everything nailed down until the morning of the session. So much for early prep, huh? Worse, my sense of timing was wildly off. Countering previous experiences where I had too many slides and blew my time, I went too far the other way, and even with 10 live demos (which require extra time, since show staff needs to switch monitors), we finished our 60-minute talk in like 35 minutes. Oops. Having nailed down the demos and the content weeks or months in advance would have helped.

In case you're wondering: no, your editor isn't proposing any sessions for this year. I've spent the year reading and editing other people's work, and I can see there are so many people out there with more interesting and more valuable things to talk about. Maybe you're one of them? I can name many java.net projects off the top of my head that I'd love to see sessions on, and there are probably many, many more I've missed that are worthy of a session. If you're doing something interesting, this is a good venue for letting people know about it.

By the way, is there a java.net project you'd like to see a JavaOne session on? Post it as a talkback here, and maybe send the project owner an e-mail. But do it today.


In Projects and Communities, the recently-published DNS Service Discovery API Reference for Java offers documentation for the Mac OS X Java bindings to Zeroconf / Rendezvous / Bonjour self-networking technology in a Javadoc format. Use this along with the upcoming book Zero Configuration Networking: The Definitive Guide to jump-start your Java-based Bonjour development.

Windows and Linux developers can access some USB devices with jd2xx, a Java wrapper to theFuture Technology Devices International (FTDI) D2XX direct USB driver. "FTDI chips are used in a variety of USB products such as serial converters and dongles." The project owner's jd2xx page hosts a simple programming example of accessing devices from Java.


The Book Club's discussion of Beyond Java kicks off a new chapter with Chapter 6: Ruby in the Rough: "Chapter 6 explores Ruby in depth as a possible successor to Java, or at least as a language that contains many of the traits you might expect to see in important emerging languages. 'I don't want this book to be an exhaustive review of programming languages. I'd like to point out one language and two frameworks (one in Ruby and one in Smalltalk) that have something special to offer. In this chapter, I introduce one possible alternative language, Ruby. I want to show you that some languages can improve on Java, but that doesn't mean that Ruby will succeed, or that it's the best possible alternative. The best that I can do, for now, is to show you one possible alternative, so you can see if the case makes sense.'"

Also in today's Forums,subanark proposes an @Implements annotation: "Random though of the day: Since we have an @Override annotation, why not an @Implements annotation to indicate that a method helps implement an interface. This would be useful mainly for readability, and also catches any typoes when constructing abstract classes."


In Also in Java Today, JBoss' Bill Burke is wondering aloud about how to declare his use of RuntimeExceptions. In the blog entry Throws clause best practice? he writes "I've always hated checked exceptions and always preferred using RuntimeExceptions. I usually find that I rarely have the ability in my code to recover from a particular exception thrown by a particular method and adding a checked exception to the throws clause would just require ugly try/catch blocks for my users. There are occasions though in some methods, I still want to throw a RuntimeException, but want to make it known to users that it is possible to recover from a particular exception."

Databases have tables, and Swing GUI's have tables. So why is it so difficult to put these two together? With a little connective JDBC code, it's not. In an excerpt from Swing Hacks entitledHacking Swing: A JDBC Table Model, you'll see how to create a Swing table from just a JDBC Connection object, using the database's metadata to discover the table's data and represent it in a Swing table model, suitable for use with an onscreen JTable.


In today's Weblogs. Sean Mullan wondersApache Java XML-Security 1.3 released, what's next?

Navaneeth Krishnan covers Day 1 at Foss.in in the blog entry FOSS.in : Intel, Google and Yahoo surprise me

In Thread Dump and Concurrency Locks, Mandy Chung writes: "Thread dumps are very useful for diagnosing synchronization related problems such as deadlock on object monitors. Introducing the Mustang enhancement in thread dump, deadlock detection facility, as well as the monitoring API to improve the diagnosability of java.util.concurrent.locks."


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.



Deadline day for JavaOne 2006 session proposals  
kfarnham

Games People Play Blog

发贴人 kfarnham 2005-11-29

Playing Sudoku and Quake 2 with Java

I usually don't have time do the daily Sudoku in the newspaper, but it's a smart diversion for when the opportunity presents itself, and something I've blogged about before -- the Sept 15 Editor's Daily Blog linked to Phil Milne's Swing-basedSu Doku workpad and evaluator.

So, you can play Sudoku in Java, but how about solving it? Any Java developer could probably whip up a brute-force search of the problem space, but this is badly inefficient, to put it nicely. Ideally, you should be able to express the inherent concept of Sudoku -- that every row, line, and region must contain the numbers 1-9 with no duplicates -- and let the computer efficiently work within those constraints.

As it turns out, Sudoku is a fine way to teach the concepts of "constraint programming", as illustrated by today's Feature Article,Solving Sudokus in Java, in which Yan Georget applies the Koalog Constraint Solver, a Java constraint programming library, to solve the puzzle and show how constraint programming works:

CP differs from naive enumeration methods by the fact that constraints contain powerful filtering algorithms (usually inspired by Operational Research techniques) that will drastically reduce the search space by dynamically reducing the domains of the variables during the enumeration phase (also known as the "search phase").

Hopefully, you'll find the ideas of constraint programming flexible enough to apply them to other problems you might need to solve.


Speaking of using Java for gaming, Jake2, the Java port of the GPL'ed Quake 2 game engine, recently got "slashdotted", with the popular technology site noting that Jake2's Java Web Start page allows you to download, configure, and launch the game from your browser. Web-Start-ing allows you to choose (and evaluate) two versions of the game, one using JOGL for its graphics, the other using LWJGL.



 

Also in Projects and Communities, the Java Web Services and XML Community page is spotlighting Lorna Stafford's blog entry on the advantages and disadvantages of XBRL, "an XML-based language which allows business information to be electronically communicated more easily than through other available formats." More information about the language is available on the XBRL home page.


In Also in Java Today, Alexander Libman and Vladimir Gilbourd's Comparing Two High-Performance I/O Design Patterns "investigates and compares different design patterns of high performance TCP-based servers. In addition to existing approaches, it proposes a scalable single-codebase, multi-platform solution (with code examples) and describes its fine-tuning on different platforms. It also compares performance of Java, C# and C++ implementations of proposed and existing solutions."

Stephane Bailliez's blog entry ClassLoaders in JEE 5 Specifications takes the Java EE 5 spec to task over the potential hazards and side-effects of its classloading model: "I have been reading the proposed final draft of the Java Platform Enterprise Edition 5 Specification (aka JSR 244) and noticed again that nothing has changed in the classloading area (OK, I did not send any feedback to the JSR group, so I'm guilty too). It is as vague as it has always been and do not impose anything which would clearly protect the deployed applications from server implementation libraries, otherwise known as class leaking."


Kirill Grouchnikov offers a Proposal for uniform support of third-party components in custom look-and-feels in today's Weblogs: "This posting proposes an approach for uniform support of third-party components in custom look-and-feels. The approach has been successfully adopted in Liquid and Substance look-and-feels."

In Fa

kfarnham

Prime Time Blog

发贴人 kfarnham 2005-11-28

Starter bugs for would-be JDK contributors

The announcement hit the front page on Thursday, a holiday in the U.S. and thus probably missed by a lot of readers, so we're putting it in the Spotlight: the JDK Community Starter Bug List is now up. As described by a getting started page, these are bugs determined by the JDK team to be a good place for would-be contributors to get started, as they're meaningful (not cosmetic), easy to fix, low impact (not likely to cause breakage elsewhere), and not on Sun's list of bugs to fix for Mustang.

If you've wanted to contribute to Java's ongoing development, but there's not a specific bug you're tracking, this is a good way to get started. That said, if there is some bug that's been on your own to-do list, the steps outlined in the "getting started" page can still help you claim a bug, collaborate, and contribute the fix.


In today's Weblogs, Gregg Sporar recalls "Years ago I worked on a fairly large project that had full internationalization support. One of our first customers ran the program in Spanish. And we had a simplified Chinese version. So I thought: "I know how to do this. I've done it before." But too much time had passed - I was overlooking a subtle issue. But what was it?" The answer: Do Not Forget the Encoding Flag:

Eitan Suez is Still Thinking About Annotations.. in which he offers "reflections on java 5 annotations, aspects, and more..."

In Running GlassFish on Mac OS X, Eduardo Pelegri-Llopart says: "Yesterday I tried the latest Mac OS X build of GlassFish. I only tried a simple 'hello world' application, and that worked fine but I had to hunt and peek a bit around to find how to do a few things, so read on for a somewhat detailed description of how to install and set-up GF and how to run that hello world WAR."

kfarnham

Black Friday Blog

发贴人 kfarnham 2005-11-24

Engaging in a little enterprise

Your editor is away-from-keyboard this morning, taking in some of the frenetic day-after-Thanksgiving sales - commonly known as "Black Friday" because it can put retailers "in the black" for the year - to pick up holiday gifts for family members. The front page items and this blog were prepared last night... though given the usual 5-6 AM grind, it's really only a few hours before I'd usually do it anyways.

After each punitive holiday rush, I swear that next Christmas I'm doing all my shopping online, but the only time I did substantially most of my shopping at Amazon was actually several years ago. Going to real stores works better when I'm browsing, when I don't already know exactly what I want. Not to mention, it keeps the kids interested and gets them out of the house, something that a web page can't do. There are things for which online shopping is great - my music shopping is about 90% iTunes, 10% brick-and-mortar, and having kids has made me long for something like WebVan to return to Atlanta - but there are some parts of the retail experience that don't translate well to the online experience, like discovering new stuff. And there's no web page that will keep my kids interested for more than a minute or two. Well, except for HomeStar.

Still, with the power of comparison shopping on the web, it surprises me when I find better prices in person than on PriceWatch. I was amazed that a store near me blew out its HP iPod Shuffles for $49... $20 below PriceWatch's current best price. So that's what my wife is getting for Christmas (shhh! don't tell her!).


In Projects and Communities, the JXTA Community project Drawboard is an application that offers graphical teleconferences, like a distributed whiteboard - when you draw something on your view, all participants can see it. The projects uses JXTA, which offers a simple peer-to-peer system that requires no configuration, or a definition of network address or port.

The November issue of the Jini Community Newsletter features an introductory article on JavaSpaces by Phil Bishop and NIgel Warren. The newsletter also links to Jini-related blogs from around the web, jini.org projects, news and upcoming events, and puts out a call for the annual Jini Community Contributor's Award.


The latest java.net Pollasks "Which of the following would be more useful to you... calling scripting languages from Java, or calling Java from scripting languages?" Cast your vote on the main page, then visit the results page for results and discussion.


caclark has An opinion on deliverables..... mainly the rhino implementationin today's Forums. "I was concerned that the latest Rhino release was not fully realized because it involved certain features that a poster (A. Sundararajan's Weblog) said was not to be included.... 'Although Mustang includes Rhino 1.6R1 (and probably will change to Rhino 1.6R2 before FCS), we are not including E4X (ECMAScript for XML) support in it. We had removed this feature primarily because of footprint consideration. Note that E4X Rhino implementation uses Apache XMLBeans (xbean.jar).' ... please explain to me how this is a good scenario regarding scripting implementation in the next version of the java platform. E4X is the only reason I personally would move to using Java 1.6 scripting (as it seems to currently be based on rhino)."

coxcu has been working through a Swing performance glitch that pegs his CPU and reveals What finally led me to the problem: "I'm looking at a similar problem now, so I decided to write up how I solved the last one. Hopefully it will either help someone else out of a similar spot or spur someone to show me a better way. To recap, I had a Swing application that consumed 100% CPU while just sitting there. Trying to find the bottleneck with java -agentlib:hprof didn't produce anything that seemed like good data. I posted to this forum, and got some nice suggestions, but nothing worked. Since this wasn't really interfering with development, I put the problem out of my mind and hoped that it would go away. Later, I had someone run the software on a laptop that was much slower than my development machine. While the software was still useable, the problem was much worse. I could no longer ignore the problem."


Navaneeth Krishnan considers the ideas and implications of Web Continuation Servers in today's Weblogs: "Web continuations can change the way we think about web applications. Web continuations makes us think in a linear fashion i.e we can think of HTTP requests and responses as printfs and scanfs over the network and web applications can be coded like command line applications. It also makes web applications inherently stateful"

In Deliver Your Java Application in One-JAR!, Felipe Gaucho writes: "I can't distribute my application in a single JAR because there is a dependency with the MySql - and the driver couldn't be accessed inside the application JAR due to classpath details. This is a strange feature of the JAR tool because it forces the users to download several files or use an external unzip tool in order to unzip the files before running the aplication - very odd."

Finally, Joshua Marinacci checks in with a NetBeans on Mac Tip, namely "How to make NetBeans not lock up every couple of minutes while GC'ing."


In Also in Java Today, more and more businesses are turning to radio frequency identification (RFID), including retail, transportation, pharmaceuticals, and defense. The trick is integrating it with the rest of your enterprise application, ensuring that you still account for scalability, interoperability, security, availability, and so on. The dev2dev article RFID Technical Challenges and Reference Architecture by Puneet Agarwal, Ashok Banerjee, and Jeffrey Flammer, looks at one approach to integrating with a J2EE system.

Copying database data is a basic, yet endlessly complex task, because not all data copy operations are alike. But the sample database-copy classes you'll find in the article How To Copy Database Data Using JDBC provide a basic template for nearly every type of copy you need to perform.


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.



Engaging in a little enterprise  
kfarnham

Reelin' in the Years Blog

发贴人 kfarnham 2005-11-24

A short holiday note

It's the Thanksgiving holiday in the US, a time to be with friends, family, and football, so today's daily blog comes to you courtesy of the JDK Community and their home page item Thanksgiving Cooking for Engineers:

While the rest of the world continues on with their daily work lives those of us in the United States will be celebrating Thanksgivingthis Thursday and Friday. To help those in our engineering community that lack cullinary skills the editors suggest Cooking for Engineers. This is cooking for the analytical minded with recipes that include time lines. There is even a complete Thanksgiving Dinner recipe. Bon Apetite!!!


"Not So Stupid Questions" return in today's Feature Article.(Not So) Stupid Questions 6: Comparability of Minimum, Maximum Dimensions asks "How can you justify Dimension java.awt.Component.getMinimumSize() whenDimension does not implementComparable<Dimension>?" If you're AWT or Swing savvy, we hope you'll stop by the article's talkbacks and help figure this one out.


In Projects and Communities, are you interested in contributing to Mustang but not sure where to start? Try picking off a JDK Starter Bug. This new page lists bugs identified by the JDK team as being particularly suitable for outside developers to work on. A getting started page describes the criteria for starter bugs and shows how to claim a bug, collaborate on it, and submit the fix.

The Linux Java Community page recently noted a short blogabout JamVM, a new Java Virtual Machine which focuses on being extremely small, yet supporting the full spec, including finalization, soft/weak/phantom references, JNI, and reflection. The executable is about 135 KB on PowerPC and 100K on Intel, and has also been run on ARM and AMD64.


In Also in Java Today, Damon Sicore's recent JBoss Blogs entry Introducing JBoss Labs Podcasts announces "we've introduced Podcasts at JBoss, and they can be found at our community development web site, JBoss Labs. JBoss Podcasts will cover video and audio training for open source software as well as interviews with professional open source developers." A video feed is currently available and will soon be joined by an audio-only feed and an aggregated feed of all JBoss podcasts.

While programs in the Java language are theoretically immune from "memory leaks," there are situations in which objects are not garbage collected even though they are no longer part of the program's logical state. In Plugging Memory Leaks with Weak References, Brian Goetz explores a common cause of unintentional object retention and shows how to plug the leak with weak references.


In today's Forums,sekhar offers some clarifications in Re: Inheritance in jaxb2: "It is not always necessary to specify all the classes that are mapped in the JAXBContext.newInstance(..) call. JAXB 2.0 will compute a reference closure on the classes specified. (see javadoc for javax.xml.bind.JAXBContext.newInstance(..) for more information). In this case, since a parameterized list is used as the type of the property, I am not certain that this will work. We will look into this further. In the meantime, please try the above and let us know if it works."

rickcarson debates some of Beyond Java's thinking in Re: Chapter 5: Rules of the Game: "Economics. This is wrong. The reason that programmers will ditch one language for another is if it solves their pain. The reason I haven't switched to Python or Ruby for instance is that not only do they not solve any pains for me, but they cause new ones. Show me Ruby without warting, and Python without magic underscores, and I may become more interested. When I switched from VB/C++ to Java it was because it alleviated a huge pain. No such massive pain exists in the Java world (except Struts and XP weenies)."


Kirill Grouchnikov offers a humorous Crash course in writing code in today's Weblogs: "Following the previous entry on bug handling, here is the second chapter on writing code." Note that you'll need to read code to understand Kirill's treatise on how to write code.

In Debugging Swing - is it really difficult ?, Alexander Potochkin says "every experienced Swing developer knows that Swing components must be accessed from Event Dispatch Thread (EDT) only. Working with JComponents from any other thread may lead to unpredictable results. Funny thing, I took part in interviewing several java programmers who claimed to know Swing well, but at the same time some of them had no idea what EDT is."

Fernando Lozano reveals Great Expectations and a few disappointments with NetBeans 5: "I was always suspicious that NetBeans were a second-class citizen inside Sun, but a recent statement from Robert Brewin threw off many of my fears. Yet I think NetBeans is taking some wrong paths in spite of the great new features."


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.



A short holiday note  
kfarnham

My Old School Blog

发贴人 kfarnham 2005-11-23

How I learned to think different about languages

Taken together, two of the items on today's page remind me of my favorite Computer Science class in college. CS 108B, taught by my adviser Stuart Reges (Stuart, if you're out there, e-mail me sometime), was ostensibly about processing data, where 108A had been about representing data. But the real story is that 108B was a 10-week crash-course grand tour of computer languages, familiar and unfamiliar, designed to get us out of then-comfortable mindsets of BASIC and Pascal.

We'd basically slam through one language a week, each chosen largely for its striking difference from the others, and with the programming assignments intended to show the unique nature of programming in that language. We started with C, which a lot of us already knew, then moved on to C++. I totally didn't get object orientation then, and really wouldn't until I got into Java. The next week was Ada... I remember not liking it, but Wikipediainsists its Java-like in many ways, so maybe I just wasn't ready for it. Anyways, next we got into the crazy fun languages, LISP and Prolog.

With my eventual course of study, I ended up doing a lot more LISP and Prolog than most CS students would, and what I really like today about having learned them was how profoundly differenta line of thinking you have to adapt to really succeed with them.

The way I would express this to friends would be to say "how do you add 1 to every item in a list?" The procedural programmer would say something like "you'd do a for-next loop and increment indexn on each pass."

Yep, that's great... in C. But you can barely even express that logic in LISP. The right answer in LISP is to say "add one to the first element, then call yourself recursively with the rest of the list."

If you haven't done LISP, this is obviously insane. But if youhave done LISP, you're already thinking of the implementation of this in terms of car andcdr... or you already did so two paragraphs ago when I asked the question.

And take it from me, Prolog requires an even more open mind. Now you have to forget not only procedural programming, but program flow altogether. Instead, you throw a bunch of if-then rules into an evaluation engine and say "have at it". You don't know and can't know what's going to run when, and you don't care. For suitable problem domains, it's crazy liberating when you "get it".

So, these are things I keep in mind as the Book Club discussion of Beyond Java moves into its evaluation of possible successors to Java. While Java's been my bread-and-butter for almost ten years, I remind myself that maybe not everything is ideally represented by an object-oriented language, by Java syntax, etc. The things that LISP and Prolog do well, Java doesn't... will they become important to me in the future?

The latest chapter thread kicks off with Chapter 5: Rules of the Game. "Chapter 5's intro says: 'If you think about it, you instinctively know that some programming languages will definitely not be the next big one. Lisp is productive, but the average Joe can't understand it. Perl is rich and powerful, but it's subtly inconsistent, and is prone to produce unmaintainable code. With a little vision and experience, you can apply a similar kind of reasoning to understand the types of languages that might follow Java. I suggest that we define success loosely: the language should be recognized widely and adopted broadly among developers who now use Java. This chapter, then, suggests the characteristics that the language should have to have broad commercial success.'"


Also in today's Forums,delvento has some advice Re: Swing threading model: "In my experience a useful scheduling for the events is 'forget the old events and do the current one'. This makes possible to write very responsive interface in case you need e.g. to show something that depends on mouse position: often is NOT necessary to process the entire (maybe long) event queue. If the task to be performed is heavy, 'forgetting old events' is a very good solution (if it is possible, of course!)"


In Also in Java Today, tracing a career that includes the earliest days of Java and its public debut, and continues in today's open-source world, original Java product manager Kim Polese describes her career in the speech "Kim Polese Discusses Software Development in Silicon Valley". She goes on to talk about her new role as CEO of SpikeSource and the role of open source software in today's environment, identifying the "seven things that have changed" since she left Sun during the first internet boom to launch the push company Marimba. The hour-long program was presented as part of Stanford University's Stanford Technology Ventures Program, and is available only through iTunes by visiting iTunes' Technology Ventures Program page and finding the program in the list.

Have you tied Hibernate to your web application, only to discover that you need access to your data outside the web container? One option would be to develop separate means of accessing your data, but then you'd have redundant code to maintain. Jason Lee says there's a better way. In Hibernate for Java SE, he shows how to get and use your Hibernate Session, without dependencies on your container.


Tim Boudreau describes a feature he calls Simply insanely cool... in today's Weblogs: "Want to save huge amounts of typing? It's pretty rare that I stumble across an unsung NetBeans feature that's new to me, but this one has already saved me an enormous number of keystrokes. My hat is off to the editor team! This is simple yet amazing..."

Help Wanted: Intern to Spread the Word... Kathy Walraths says "If you're a student with a knack for creating Web content, do we have an internship for you! The Swing team has a job opening for a half-to-full-time student intern to help us get the word out about using JavaSE for rich client apps."

Alo

kfarnham

Do It Again Blog

发贴人 kfarnham 2005-11-22

Embracing test-first development and the web

OK, surely all developers get it by now: test-first development, agile methodology, short release cycles and perpetual buildability and releasability. But what about QA, support, DBA's and other people intimiately invested in the well-being of your application? They could probably be enlisted into the effort, if only not for the requirement that you have to know Java to write automated tests.

Or... not.

In our Feature Article, Fitnesse Testing for Fast-Paced Agile Web Development, Robert J. Miller advocates trying out Fitnesse for testing your web application. Yes, instead of JUnit:

Fitnesse is analogous to JUnit in that it is a testing engine built using Java technologies. However, Fitnesse is different because its user interface is a web application with test suites created and managed using wiki markup. The key difference is that JUnit is primarily used by developers, whereas Fitnesse's user interface is friendly to non-developers, too. The developer extends Fitnesse's testing engine to expose new assertion methods. Then any team member (technical or not) can use the wiki markup to populate and run these new assertion methods. In the end, the developers use both JUnit and Fitnesse; each for different purposes.


The Fast Way to $5000 is in today's Weblogs. Brian Leonard writes: "eBay just lauched a developer challenge. [You can] use NetBeans to get your unfair advantage. "

In Give Me My Commodity Text Widget Features, Please, Ben Galbraith says: "One of OS X's pioneering features was giving check-as-you-type, right-click-suggest spell checking to every application that wanted it, free of charge. The next text widget feature I want to see commoditized is auto-complete."

Scott Violet covers some Changes to Actions in 1.6: "In 1.6 we've overhauled Actions adding new features and fixing a handful of annoying bugs. For this blog I'm going to cover the new features and when you might use them."


In today's Forums,rcasha lays out the the case Re: Operator overloading (again) and functions: "Operator overloading definitely should be added. Those who don't like it are free not to use it. There was a similar debate against generics when this was proposed. Most of the arguments against operator overloading are flawed - in most cases the exact same arguments would apply equally to functions. Sure, an idiot might use the * operator to add instead of multiply, but wouldn't such an idiot create a function called 'multiply(X)' in such circumstances? Couldn't such an idiot create a function called "equals" to alter the contents of an object? If we're going to withhold functionality from Java just because there are idiots out there then might as well return to pencil and paper."

In Swing/JSP Compatiblity, smartinumcp asks: "Has any project given serious interest to developing a standard to allow client and web based versions for JSP and Swing. The current frameworks (struts, spring) actually push more work on the developer for the front-end then supporting multi-client environments. Our XML configuration seem targeted towards the server and persistence layers. Without a true standard at the HTML and desktop client level we will still remain bound to manual writing or rewriting code. I recommend Sun takes some of the lead on this to combat one of .NET's key strength and to keep the maintainability of our code for future iterations."


In Also in Java Today, Bruce Eckel is working through some thoughts on Self-Bounding Generics: "There's one rather mind-bending idiom that appears periodically in Java generics. Here's what it looks like: class SelfBounded<T extends SelfBounded<T>>. This has the dizzying effect of two mirrors pointed at each other, a kind of infinite reflection. The class SelfBounded takes a generic argument T, T is constrained by a bound, and that bound is this class, with T as an argument."

In the past few years there has been a proliferation of frameworks that allow for lighter, faster, and loosely coupled Java projects. These frameworks not only let you decouple your Java project from the application server for unit testing, they also allow for more agile refactoring, testing, and design techniques. Franz Garsombke's Java J2EE Hibernate Extreme Makeover: Architecture Edition tells the story of a large-scale refactoring effort implementing Spring and Hibernate as the underlying infrastructure tools.


In Projects and Communities, the Maven Jini Plug-In helpsMaven -based developers get Jini projects up and running quickly, by offering a service generation goal, starting and stopping of the various Jini starter kit services (reggie, mahalo, etc.), and a configurable RMI runtime using JRMP, JERI, or JERI/JSSE.

The Javolutionproject offers a real-time framework which atempts to make embedded applications faster and more predictable. This is accomplished through safe and transparent object recycling, class and object pre-allocation, and fast base classes in its util, lang, io, and xml sub-packages.


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.



Embracing test-first development and the web  
kfarnham

Pretzel Logic Blog

发贴人 kfarnham 2005-11-21

Prelude to a slow week?

To our international readers: this might be a slow week in terms of developments from the U.S. Let me explain how I think this came about. Thursday is Thanksgiving, a national holiday. Nearly everyone also gets or takes Friday off, making it a four day holiday (Friday is particularly infamous as a shopping day for the various winter holidays).

Given that this is now a four-day holiday, people start travelling. That makes for some brutal jams on the highways and at the airports (this was the premise of the memorable 1987 film comedy Planes, Trains, and Automobiles). So, if you can't get a flight or don't want to be on the roads at a "bad time", maybe you leave a little earlier. Like Wednesday morning.

Or maybe Tuesday? When I was a grad student 15 years ago, and I TA'ed a section of the media production class, I found that about a third of the class had bailed on Tuesday night. Of course, they missed out on learning how to use the audio board, so they screwed up their projects later in the semester. Note to media production TA's: trick your students by fading down the master volume (or panic black on a video switcher). See how many students methodically look at the controls to diagnose what's really wrong, and how many throw up their hands and insist it's broken. Explain to the latter group that the reason it doesn't work is because "volcano gods are angry."

So as of 1991, everyone's counting Tuesday as part of Thanksgiving vacation... and remember, this started as a single day off. You can figure where things have gotten by now. Our local school district is taking the whole week off. Even a certain university of some repute is trying out a one-week break. For a holiday based around a single meal! Seriously. I think it may just be payback for the fact that commercial interests trying to get everyone into the stores have turned the holiday into a prelude to the December shopping season: the combined hordes of Christmas and Hanukkah have overrun Thanksgiving and they're marching on Halloween!

At any rate, the java.net front page will be with updated content through the week. Even if Friday's does get posted from Fry's Electronics' early-morning "door-buster" sale across town. My family needs DVD players, video games, and iPods.


In today's Weblogs, Daniel Brookshier has An interview with Brian Koontz, creator of the Open Source Technology program at North Lake College: Open Source for college credit? Yes, it's true! Daniel interviews Brian Koontz, Computer Science program coordinator and OSS zealot at North Lake College. Brian created a certificate program for Open Source Technology at North Lake College in Texas. Daniel Brookshier interviews Brian about the certificate and the open source impact of open source.

James Gosling wants you to know that ZFS Rules! "I have to admit that I hadn't been paying as much attention to the ZFS filesystem as I should have. I finally read through the slides and some of the other documentation, and I really got jazzed. In past lives I have been a Unix SysAdmin, and fussing with filesystems was the #1 pain in the ass (remember ncheck, dcheck and fsdb?). I couldn't believe that ZFS could be as easy and powerful as the documentation said it was, so yesterday I scrounged up a couple of extra drives, slapped them in my Opteron box, and took it out for a spin. Wow. It is that easy."

What are your favorite public REST endpoints? Eduardo Pelegri-Llopart asks this because "One of the new features of JAX-WS 2.0 is its support for REST endpoints. We want to test the implementation and write some demos. What are your favorite public REST endpoints?"


In this week's Spotlight, There are only a few days to go for the JavaOne 2006 Call for Papers, which closes on November 30. The CFP page offers guidance in what attendees want -- specifically "talks that deepen their practical knowledge" -- speaker selection criteria, and policies that proposals need to adhere to. Potential JavaOne attendees can voice their opinion on what kinds of sessions they'd like to see on the java.net Planning JavaOne 2006 Forum.


In Projects and Communities, the OpenSymphony project TestNG "is a testing framework inspired from JUnit and NUnit but introducing some new functionalities that make it more powerful and easier to use." Its advantages include support for JSR 175 annotations, flexible test configuration, default JDK functions for runtime and logging (meaning it has no dependencies), and a powerful execution model.

Dan Hushon's blog entry java.net Sun Grid Eco-system Development offers an introduction to Sun Grid's core environment, and lists a series of potential services that could be built atop the grid. "Please join us in theSun Grid Community, sign up a new project, get some free grid time, and let's move this vision forward."


In today's Forums,chris_clark has some questions Re: Migration to the Type Checking Verifier: "Sun has said that it will 'help' tool vendors to get their products to comply with the new bytecode verifier spec, as outlined in JRS202 and appearing soon in Mustang. But as far as I know, it hasn't yet said what form this help will take. My own view is that if Sun could provide a tool to generate (or regenerate) the StackMapTable attributes from a classfile's bytecode, it would be extraordinarily useful."

The Beyond Javabookclub discussion notes author Bruce Tate's rhetorical questionWhy Not Just Fix Java? "You might argue that we need to fix Java, not scrap it. That would be easy if you could pinpoint the problems. If you thought the problems were in the language itself, you could just do some major surgery and offer a new version of Java. That's easier said than done. Sun has been very careful to preserve backward compatibility at all costs. If you look at the lack of commercial acceptance for Visual Basic .NET, it's easier to respect Sun's point of view. Microsoft made some radical changes to the language and libraries , and they weren't well received. Regardless of whether it's a good idea, Sun will continue to be conservative to protect customers."


In Also in Java Today, the Java platform's Java Foundation Classes/Swing (JFC/Swing) components are a complete package of graphical user interface (GUI) widgets. By using Swing components, you can create rich, easy-to-use GUIs in your applications. Using these components can greatly improve your application's user-friendliness. The article Customize Your JList Display focuses on one component, the javax.swing.JList object, and shows you how to customize what it displays to the user.

If you've read Bruce Tate's "Beyond Java," or his article Technologies to Watch: A Look at Four That May Challenge Java’s Development Dominance, you're probably aware that he considers Ruby to be of particular interest to Java developers. And he's not the only one. He cites several early Java luminaries who are now loudly extolling their positive experiences with Ruby. But what is it? Ruby the Rival, brings together Tate and a collection of prominent Java authors, bloggers, and developers to see what's behind the surge of interest in Ruby, and how it relates to Java. Is Ruby doing things that Java really can't, and what does Java need to do or be in order to remain on top? James Duncan Davidson, Robert Cooper, and Bill Venners weigh in with their opinions on Ruby and Java, and whether or not they're really rivals.


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.



Prelude to a slow week?  
kfarnham

I Just Go Blog

发贴人 kfarnham 2005-11-18

The JavaOne 2006 clock ticks away

The earlier-than-usual JavaOne 2006 -- it's in May, not late June -- is bound to catch some people unawares. In particular, if you plan on speaking, then you'd better plan on having your proposal done in the next two weeks. Less, actually.

James Gosling offers this reminder in his blog entry JavaOne is Getting Closer, in which he suggests: "Do a really good job on your abstracts: there are always far more proposals than available time slots." He also pitches the annual contest:

It's time to start thinking seriously about ideas for the T-Shirt hurling contest. Cash! Free passes to JavaOne! You just have to figure out how to get some t-shirts into the audience. Last year was a real lesson in engineering: 2 out of 3 entries broke, but in interesting ways.

kfarnham

Some Change Blog

发贴人 kfarnham 2005-11-17

So long, getContentPane().add()

If you've seen Graham Hamilton's blog entry My Favorite (Dead) Java Boilerplate, then you know about how Mustang will obsolete the following boiler-plate Swing code:

   JFrame f = new JFrame ("Sample");
   JButton b = new JButton ("OK");
   f.getContentPane().add(b);

In earlier versions of Java, if you just didf.add(b), it would compile, but you'd get a runtime exception.

OK, time to ask: why?

Hans Muller owns up to it, and has an explanatory history, in his weblog post JFrame.add() contentPane Pain: The Complete Story:

The 1.0 and 1.1 releases of Swing were delivered on the original Java 1.x platform. Our audience was AWT developers who typically wrote small apps by subclassing java.awt.Frame and overriding paint() or setting its layout manager and adding children. When we decided to create JFrame's substructure there was a debate about the wisdom of automatically mapping JFrame.add() to JFrame.getContentPane().add(). The reason I rejected that approach is that this "convenience" is a shallow illusion. To complete the illusion one would have to redirect get/setLayout(), and addComponentListener(), and getComponent() and getChildren() and so on. In addition to making it tough to actually get inside the JFrame itself, the complete illusion would be asymmetrical since the source of events or a layout manager's container wouldn't match what a developer would expect. So in the interest of consistency, not education, we did not automatically redirect JFrame.add() to the content pane.


Also in today's Weblogs Konstantin I. Boudnik returns with Java. Quality. Metrics (part 4), which offers "more about quality methods and stuff ... we can use a few methods to insure our product quality and guarantee that we're digging at least in right direction. Another one I was about to mention is code coverage."

Arun Gupta discusses interoperability in Sun (sleepless) in Seattle: "Although it drizzled in Seattle most of last week, but Sun was prominent at least in one corner. 5 of us (Harold, Vivek, Mike, Manveen and myself) from Sun Microsystems attended the Microsoft hosted plugfest last week. This is part of Sun's effort to improve interoperability between Java and Microsoft's Windows Communication Foundation or WCF (a.k.a. Indigo)."

In our Featured Article,App-Managed JDBC DataSources with commons-dbcp, Ethan McCallum looks at managing your own database connection pool: "Need a connection pool but maybe not one provided by a container? This need still comes up in special cases--tightly managed environments, CD-ROM distribution, etc.--and there's no need to reinvent the wheel yourself. Ethan McCalllum shows how the Apache Commons package commons-dbcp can help."


rexguo has a JavaOne 2006 request Re: Desktop in today's Forums: "Media presentation and management applications that include videos, photos and music. This is what a lot of people are using computers for. We are developing one such app and will be most happy to showcase it at JavaOne 2006 to show the power of Java2D and JSR-231."

In the Book Club forum, rickcarson is unimpressed by criticisms of Java. In Re: Chapter 4: Glass Breaking, he writes: "As for the choices that people make, you cannot legislate against stupidity. But, in most cases, did the people involved deliberately set out to make the worst possible decision? No, probably not. So what is the cause of the problem? Is it not that we have all these pundits and experts (self proclaimed usually), who tout the latest 'silver bullet' solution to all that ails us - whether that is Struts, Agile programming, XML or whatever. (See also: todays Dilbert)"

In Also in Java Today, David A. Chappell's XML.com blog entry ESB vs Biztalk Debate Gets Heated in Barcelona relates a stunning story of how his SOA-oriented conference presentation was interrupted by a Microsoft Evangelist. "While giving a presentation at the Enterprise Architect Summit in Barcelona, on the subject of ESB and other SOA-related infrastructures, I got into a public altercation with a couple of Microsoft guys who were in the audience. It turned into a pretty heated debate over core architectural fundamentals, which we hammered out in front of an audience of about 75 unsuspecting conference-goers. I have to say that in all my years of public speaking this sort of spontaneous public debate has never happened quite like this. The conversation that ensued brought to light some really important issues regarding some fundamental differences between the use of an ESB as the foundation of building a Service Oriented Architecture vs. using a combination of Biztalk and WCF (formerly known as Indigo)."

The Sun Developer Network Expert Assistance for Developers is offering help from the source: the J2SE engineers themselves. The program allows SDN members to send in a question about Java Studio Creator, J2SE 1.4 or 5 (core - no desktop), and, starting in December, Sun Studio 10 or 11 for Solaris and Java Studio Enterprise 7 or 8. E-mailed questions will receive a reply from a J2SE engineer within 24 hours. During the beta period, the service is free.


In Projects and Communities, the tenth Jini Community Webinartakes place Wednesday, November 30, and features Codemesh's Alex Krapf on "C++ Legacy Integration With Jini Technology". "This Webinar will discuss problems that are commonly encountered in such a situation and describe integration and porting approaches that can be used to move forward, adopt Jini technology, all while maintaining your C++ legacy application."

The sixty-second issue of the weekly JavaTools Community Newsletter welcomes seven new projects to the community, and makes a call for input on JavaOne 2006 activities. The weekly tool tip is on running free software projects, and points to Karl Fogel's online book Producing Open Source Software - How to Run a Successful Free Software Project, available for free under an "open copyright".


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.



So long, getContentPane().add()  
kfarnham

What's Number One? Blog

发贴人 kfarnham 2005-11-16

Will maintainability hinder Java's dominance?

If you don't like seeing Java criticized in this blog, then I'll bet you don't care for Wednesdays, which is when we've been rolling out news chapters of Beyond Javain the book club discussion. But don't go there yet. Today's weblogs bring up a completely new concern about Java and its long-term viability.

In Is Java the wrong language for business programming?, John Reynolds relates an argument that Java is less maintainable than one might think, a concept summed up in a colleague's statement that "COBOL programmers are interchangeable, Java programmers aren't." Elaborating, John says:

Jim is not a luddite, but he is tenaciously pragmatic. In his experience in managing large projects, he has found that any competent COBOL developer can maintain another programmer's code, but Java modules are often inextricably tied to their authors. Despite coding practices and design reviews, the Java modules take on the personalities of their owners. The nuance of each Java programmer seeps into the code that they produce.

John thinks that the difference in language maintainability -- if there is one, and that's hardly proven -- is that COBOL discourages abstraction while Java encourages it. This may give rise to Java code that makes sense to its original developer because it represents his or her world-view, values, sense of life, etc, and that another person with radically different values and ideas may not be able to work with that code particularly well.

Do you buy this? I'm somewhat inclined to agree... I've inherited code with obtuse abstractions that I couldn't get behind (e.g., a scheduling program whose point of contact was aSecretary that took Appointments). But on the other hand, when Java is self-documenting (Javadoc) and when we've been repeatedly encouraged to use design patterns, so that we can share in commonly-accepted good answers to common problems, is competant but unmaintainable code really a widespread problem, and is it specific to the language? John's blog is getting some thoughtul comments, and if you have some thoughts on the matter, please join in.


Also in today's Weblogs, Aloïs Cochard advocates JXTA in Stopping use of socket: Advantage of using JXTA Technology: "For a long time, the internet protocol was the only solution to transport information through internet networks. But this protocol has limitations and developers need a new protocol to communicate, JXTA is the answer."

A question from Zarar Siddiqi: "There is no API in Java that tells you the current line of code being executed. So how does Log4J do it?" The answer is in his blog entry, Sneaky, sneaky Log4J.


The Book Club discussion of Beyond Java continues in today's Forums. The threadChapter 4: Glass Breaking kicks off: "Chapter 4 begins laying out the case against Java: "I've developed a good instinct for trouble on the river, and at work. In this profession, I generally know when a technology smells wrong, or dangerous, and I guide my customers away. I'm sensing that danger around Java right now. It's getting too difficult to manage, and both evolutionary and revolutionary steps to remedy the problem are failing us. In this chapter, I'll introduce some of the basic problems."

In the Mustang Snapshots: Project Feedback discussion, ylzhao has some questions about Hardware Acceleration in Mustang: "Recently, I have read some materials about the OpenGL-based Java2D pipeline hardware acceleration improvement in Mustang, and this feature is available in Tiger also, though it is disabled by default. On Windows platform, DirectX is the core rendering engine and supports hardware acceleration, and this factor is more important in the next Windows verion - Vista. So I have a question: What API does the windows version of JDK use to rendering graphics and images? Does it support hardware acceleration by default or only use soft rendering?"


In Projects and Communities, the resultsof the JCP 2005 Elections are in. Four new Executive Committee (EC) members have been selected. For the Standard/Enterprise EC, the top two vote-getters are Intel Corporation and Hani Suleiman, and for the Micro Edition EC, the winners are Sony Ericsson Mobile Communications AB and Symbian Ltd.

Apple has released J2SE 5.0 Release 3 for Mac OS X 10.4.2 or later. The new version is a 42 MB installer that can be downloadedfrom Apple's web site. The release notes list the many bugs fixed with this release. Note that as was the case with previous J2SE 5.0 releases for Mac OS X, Java 1.4.2 remains the default version of Java.


In Also in Java Today, the Sun Developer Network Channel launches today (November 16) at noon PST (20:00 UTC). The pre-launch announcement asks: "wondering how to use your college degree to break into the lucrative software development market, or do you just want some free posters, T-shirts and other stuff for your dorm room? Come hear from Chris Melissinos, Chief Gaming Officer, Sun Microsystems; Walter Hardy, President of W. Hardy Interactive; and Tor Norbye, Senior Staff Engineer on the Sun Java Studio Creator Team on how they got started in software development and the tools they used."

So, you want to write a super-slick MP3 player in Java, but you can't support crazy "skins" with arbitrarily shaped windows, because all Java windows are rectangles... or can you? In an excerpt from Swing Hacksentitled Hacking Swing: Translucent Windows, you'll see how to use the AWT Robot's screenshot facility and some custom imaging to offer translucent and/or arbitrarily shaped windows, even on platforms that don't actually support them.


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.



Will maintainability hinder Java's dominance?  
kfarnham

Breakdown Dead Ahead Blog

发贴人 kfarnham 2005-11-15

Making your web app manageable

Surely, you've had a "what the heck is my code doing and why" moment. What makes it worse is when your code is in production on a remote server. So now what do you do?

One option is remote debugging, but that may be lower level than what you need. Sometimes what you need is the ability to arbitrarily call methods of your own to get reports on the web app's state or to issue commands to it. In short, you need the ability to remotely manage the web app. This, of course, is the point of Java Management Extensions (JMX), and in today's Feature Article,Using JMX and J2SE 5.0 to Securely Manage Web Applications, Zarar Siddiqi shows how it's done:

JMX (Java Management Extensions) supplies tools for managing local and remote applications, system objects, devices, and more. This article will explain how to remotely manage a web application using JMX (JSR 160). It will explain the code needed inside of the application to make it available to JMX clients and will demonstrate how to connect to your JMX-enabled application using different clients such as MC4J and jManage. Securing the communication layer using the RMI protocol and JNDI is also covered in detail.


In Projects and Communities, the Java Enterprise Community project Blueprintshas released the second early access version of the Blueprints Solution Catalog for Java EE 5. The new catalog, available for download, includes design guidelines and more new code for AJAX and JSF applications.

The Jini Multicast Monitor Tool for Sun Grid is "a debugging aid that provides visibility into the Jini discovery and join protocols while developing Jini enabled applications on Sun Grid." It repackages Jini Multicast Monitor Tool as a Sun Grid resource.


sduv welcomes JavaOne 2006 suggestions Re: Core Enterprise in today's Forums: "Hello, I am the track lead for core enterprise this year. I am very excited about the 'Call For Ideas' we are trying new, for 2006 JavaOne. Looking to hear your comments about the last JavaOne and suggestions for 2006. The Core Enterprise Track is a particularly difficult one to design. Some statistics will tell the story better: It is the single largest track: 25 technical sessions and an equal number of BoFs. We received 450 proposals last year, just in this track. So, roughly 1 in 10 proposals gets the nod. We get many great proposals and it was quite hard dropping some of the good ones. Well, that is a good problem to have, I suppose.."

carcour wants Mustang to Improve JFileChooser: "Is it possible to improve the JFileChooser by adding sorting capabilities and Arrange icons by like what's available in the Windows native filechooser. I think these are very important features and Java really needs that. Synthetica look and feel has implemented these features in their look and feel so I'm sure it won't be hard for you guys at Sun to do it."


Joshua Marinacci speaks up for Java's role in "Web 2.0" in today's Weblogs. InWhy use Java for Web 2.0?, he writes: "There's been a lot of talk lately about Web 2.0, and which technologies are going to take us there... Many feel that the future is ultra-thin browser based client platforms like XUL or Ajax but I think that Java has a place, and will continue to grow in the future."

In My Favorite (Dead) Java Boilerplate, Graham Hamilton looks at some annoyances that new versions of Java will do away with: "As part of both Java SE and Java EE, we have been working to simplify common tasks. Here are my five favorite examples of how we are eliminating common boilerplate."

In Arrival of the 2.0's, tech term musings, Michael Nielsen writes about the "arrival of the 2.0's (catching up on the news: Maven and OpenOffice.org), and various other musings on tech-terms from the perspective (flashes from the past) of in-flight reading material...."


In Also in Java Today, the article Java ESB Projects Team Up on JBI reports on an open-source Java Enterprise Service Bus partnership: "Iona Technologies and LogicBlaze will collaborate on their respective Enterprise Service Bus (ESB) projects, with a plan to deliver a unified Java Business Integration (JBI) implementation. The mounting cooperation, execs say, will make it much easier for enterprise architects and devs to choose an open source ESB option. At issue is the chore of providing a common JBI implementation for Celtix (Iona's ESB) and (LogicBlaze's ESB). 'Under this alliance, both Celtix and ServiceMix will contribute code to each other's projects, and we will integrate that code into the underlying [platform] so that each project may reuse and redistribute the other's source code', Tom Miura, LogicBlaze CEO, told IDN."

Want to play a game? Java Boutique's Drew Falkman wants towrite one: "I don't know about you, but when I was a kid and first learning how to program, there was only one reason: games. In my mind that was the pinnacle—there was no higher pursuit in the world of programming. I wanted to make games." In Open Source Java Game Utilities: LWJGL 0.98 and Game Gardens he takes a look at two open source libraries to help you get started writing Java games.


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.



Making your web app manageable  
kfarnham

Lowdown Blog

发贴人 kfarnham 2005-11-14

Is "Beyond Java" wrong about productivity and tools?

Now that more people are kicking around the ideas of Beyond Java-- not just its back-cover blurbs, but the text of the book itself -- we're starting to see some more in-depth, carefully reasoned discussion and criticism of the book and its ideas.

Navaneeth Krishnan digs into two of the books central tenets in his Weblogs entry, Beyond Java? He summarizes the book's premise of programming productivity vis-a-vis the developer who's largely connecting a web interface to a database and writes:

Well ...to be honest, I would say that Java application development has never been as productive as it is today. Yes , seriously .. and I think a lot of people would agree with me on that. Long before joining Sun I used to work for a consulting company. And I don't remember any of our customers choosing java because it was the most productive option around. [...] One of our biggest customers who came by opted for a Java based solution. Why? Vendor independence. They were attracted by the fact that they didn't have to be tied to a particular vendor for their solution.

Navaneeth also goes head-on into the book's frequent criticism that Java's use of tools to overcome complexity is a crutch:

Speaking of tools, Bruce does not seem to be a great fan of tools or generated code (And that's where I think he misses the point). He states that even if you are using a tool, you need to understand the code that your tool generates and that generated code is difficult to maintain. I don't agree with that observation.

If a tool is good enough,one does not need to understand generated code (ask a VB developer). And generated code can actually be easier to maintain. How many of us take a look into RMI and JAX-RPC stubs that our tools generate ? Even JSPs are generated code, but I don't remember ever trying to understand it. JSF takes the paradigm a step further.


If you haven't yet had your say on Beyond Java, why not join the Book Club discussion of it in the Forums? Continuing the discussion, Breaking the Myths (was Re: Chapter 3: Crown Jewels) says: "Tate concludes Chapter 3's assessments of Java's strengths by stating a set of what he calls 'myths' that could lead to Java's undoing. They are: 1. Java's leadership is unassailable... 2. Java is a great applications language... 3. Java is the most productive language... 4. Commercial Interests Drive Most Java Innovation... 5. Big Things Usually Come from Likely Sources. What do you think of these claims? They're explored in upcoming chapters, but right now, do these seem like "myths", and if they are, what does that mean for Java?"

skpimparkar has an embedded-oriented request for Planning JavaOne 2006 in the message Requirement of knowledge than information: "I would like if the topic of different java distributions be discussed at java one conference. e.g. Sun Java, IBM j9, etc. Specifically, for porting the applications to the embedded devices that support jvm or kvm, this knowledge is important. Usage of JNI technology has proved of great help to me, but faces various problems if need to use for SUN's Java distributions against IBM's J9 and port onto devices such as mobiles. So, if the developer has core knowledge of JVM, KVM and their practical inferences and tips from Gurus lively, it will be of great help. Even if very good professional guides are available for these, sometimes they fail to shape the understanding of technology and disperse into the veins of developer and become simply user guide and supportive material."


Also in today's Weblogs. Kelly O'Hair writes about Needing a New Heap Dump Format: "Currently heap dump snapshots from Java applications take various forms, and the most common one has been the HPROF binary or textual formats. It's about time we create a more formal heap dump format, with a real specification."

In Java EE Performance at JavaOne, Scott Oaks says: "The JavaOne Call for Papers is out, and I'm torn between talking about new, exciting performance issues and revisiting old (but somehow still-recurring) performance myths."


This week's Spotlight features the OSWorkflow project: "The OpenSymphonyproject OSWorkflowoffers an extremely flexible workflow system that can be plugged into existing applications, whether or not they're OpenSymphony-based. OSWorkflow differs from other workflow offerings by working at a lower, more flexible level. For example, OSWorkflow does not mandate a specific GUI tool (in fact, the recommended approach is to create workflows 'by hand' in XML). The project's philosophy is that quick plug-and-play workflow frameworks are typically not sufficient to satisfy enterprise requirements, so OSWorkflow offers a more developer-oriented, 'hands on' approach."


In Also in Java Today, the article Embedded Dev Wages Spike, Job Index Says has good salary news for embedded developers in particular, and other developers as well: "Wages for developers with expertise in embedded systems spiked in Q3 2005, according to the latest IT survey data from the Yoh Index of Technology Wages. Overall, wages for other, more traditional appdev skills remained strong, as hourly rates for .NET, Java, C/C++ and DBA-related skills all remained near or above $50 per hour, on a nationwide basis. IDN provides the latest Yoh stats, and shows changes from Q2 (ending July 31)." It also shows Java salaries in the upper tier of developer wages, though not increasing as fast as some others, and lists the 13 U.S. regions where software developers are in the greatest demand.

Do you need an easily replicated cache, perhaps for duplication across a cluster or persistence for crash recovery, but one without the usual hassles? Ben Wang wants you to consider a "Plain Ol' Java Object" cache. "A POJO cache is a system that acts as an 'object-oriented' and distributed cache. In this system, once a user attaches the POJO to the cache, the caching aspect (e.g., replication and persistence) should be transparent to the user. A user would simply operate on the POJO without worrying about updating the cache content or maintaining the object relationship. There is no explicit API called to manage the cache." In JBoss Cache as a POJO Cache, he shows how JBoss Cache implements these principles, and how you can use them.


In Projects and Communities, the brief tutorial Java EE 5 "Hello World" application in NetBeans shows how to use NetBeans and GlassFish application server to create and test a simple "Hello world" Java EE 5 application with EJB 3.0 and dependency injection in JSF. It walks through the download and setup steps, creating the Java EE 5 application and an EJB 3.0 Bean, and calling the bean from a web application.

The Robotics Community project RSCLprovides "a framework to develop applications to simulate and control a mobile robot. It has been used successfully with vastly different medium sized (~150 lb) autonomous ground vehicles." Full working source has been released, available in CVS. Reference implementations and documentation will be made available soon.


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.



Is "Beyond Java" wrong about productivity and tools?  
kfarnham

Your Wildest Dreams Blog

发贴人 kfarnham 2005-11-11

Startling speed in the latest Mustang build?

OK, I don't have an Intel box in the house, meaning I can't run the Mustang weekly builds as they drop each week, but the flow of developments has me wondering if I should get some appropriate hardware to join in the fun.

Two weeks ago, we saw a fast new bytecode validator rolled out, with a challenge to Crack The Verifierand ensure that this speed doesn't compromise security. Now we have the news that Mustang's HotSpot Client gets 58% faster in build 59. Osvaldo Pinali Doederlein explains further:

Mustang is adding new optimizations to HotSpot, not news, we expect the JVM to learn new tricks at every release. But the great news is that Sun just added a great performance enhancement to HotSpot Client. Yep, the other HotSpot... the one that never appears in benchmarks aimed to make Java or particular JVMs look good. Unfortunately, you can't realistically use the Server VM in most client apps, from simple database front-ends to action games, as it loads slower, eats more RAM, and it's not included in the more ubiquitous JRE package.

The optimizations target more efficient use of registers -- which may be more crucial on the x86 architecture than on comparatively register-rich CPU's like SPARC and PowerPC -- and Osvaldo's tests with SciMark2 shows an overall increase of 58% from Mustang build 58. In two of the five tests, client HotSpot beats the server version, and several of the tests show a better than 100% improvement. Osvaldo points out that some of these are array-intensive, which should be good news to anyone whose code is Collections-intensive. The near-tripling of the Fast Fourier Transform benchmark ought to be a big help to pure-Java media code, as FFT's are often used in digital signal processing (for example, in getting frequency bands and levels from playing audio).

It will be interesting to see how much of a boost J2SE client applications pick up "for free" when run on these latest Mustang builds. If you see a distinct improvement, consider talking it up in the Performance forum.


Also in today's Weblogs, Simon Phipps notesThe Java Up-tick, in which he offers "a note from my JavaOne Tokyo keynote, in which I muse about whether languages are really where the action is..."

In Convenience kills the Cat, Andreas Schaefer writes: "The decision by the Ant development team to put the junit task archive (ant-junit.jar) into Ant's lib directory without the junit archive is maybe convenient but caused me to waste some time to figure out why the same Ant script works on my box but not on my coworker's box. Both solutions outline on Ant's FAQ have their drawbacks and I think that this is another example where convenience is a good source to waste them on the long haul."


The latest java.net poll asks "Does Java support affect your purchase of consumer electronics like mobile phones and media players?" Cast your vote on the front page, then visit the results page for results and feedback.


In today's Forums,marla_parker asks for JavaOne 2006 suggestions for thejava.net Community Corner: "The java.net Community Corner on the pavilion floor of the JavaOne show is back! The wiki for the Community Corner is linked from the java.net JavaOne wiki, which should be used to list all the Technical Sessions, BOFs, and other activities and contributions by java.net members at JavaOne. The java.net Executive Board has some new ideas for the Community Corner this year, which we will post here, but we invite you to post your input here as well. See the wiki from last year if you were unable to attend and want to know what the Community Corner was all about."

tobega discusses Java's strengths in the Book Club thread Re: Chapter 3: Crown Jewels: "I think the single most important advantage of Java is that my debugging time has been so drastically reduced. I only now have to find errors of logic, not errors of omission, like memory leaks, memory overwrites, etc. If Java could take that foundation and move with it, becoming more itself, that would be great. Of course, the platform independence and the JCP are important factors, too. "


In Projects and Communities, the article New System Tray Functionality in Mustang introduces Mustang's new SystemTray and TrayIcon classes, which allow you to add graphics, popup menus, and tooltips to the system tray. This allows you to access the Windows Taskbar, GNOME notification area, and KDE system tray from Java. The tutorial also shows how to use the tray to provide status updates.

Do you have questions about Project GlassFish, Sun's open source Application Server and Java EE 5 implementation? Next week's week-long SDN Ask The Experts session features GlassFish Manager Jim Driscoll and Community Leads Carla Mott and Amy Roh. You'll be able to ask them your questions about GlassFish from Monday, November 14 through Friday, November 18.


In Also in Java Today, the article Sun Enters Phase 2 Java-.NET Interop reports that "Sun and Microsoft engineers continue to work on up-the-stack interop between Java and .NET. Sun pledged to enable Java interop to Microsoft's Windows Communication Foundation (WCF) by developing and distributing open source implementations of key WS-specs." According to Sun's Joe Keller, the advantages are better end-to-end development and deployment across operating systems, better leveraging of legacy software assets, and encouragment of SOA adoption.

Do you need to test an EJB but not necessarily under production conditions? Perhaps you need to test your EJB without the benefit of a container at all. The dev2dev article Streamlining Your EJB Tests with MockEJB, by Eoin Woods and Alexander Ananiev, may help: "This article introduces a library, MockEJB, which provides one possible solution to the problems of testing EJBs by allowing them to be tested inside or outside the EJB container. Built on top of existing mock object technology, MockEJB allows developers to develop and unit test their EJBs as plain Java objects (outside of the EJB container) before later deploying them to the container for integration testing. Once in the container, you can use MockEJB to thoroughly test EJBs by controlling the beans' environment and allowing unexpected conditions to be simulated."


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.



Startling speed in the latest Mustang build?  
kfarnham

Our Guessing Game Blog

发贴人 kfarnham 2005-11-10

Try our challenging generics quiz

Java Tech columnist Jeff Friesen wanted to write something on the topic of generics in J2SE 5.0, but the basic generics intro had been done a lot of times already. Indeed, the Java community seems to have already moved from trying to understand generics to debating their value, as you may have seen on some of the forums over the last few months.

So Jeff came up with a novel format: a 20-question quiz, inspired by a generics FAQ, that tests how well you reallyknow generics. That's the challenge presented in today's Feature Article,Java Tech: Generics and You. As he introduces it:

How much do you know about generics? Based on your amount of generics knowledge, are you comfortable with having to maintain another developer's generified code, should your project manager tell you to do so? Perhaps you have not taken the time to determine how much you know about generics and how much you still have to learn. If you would like to assess your generics I.Q., you might find this article a helpful test of your generics knowledge.

I have to tell you, being only toe-deep in generics myself, I found the test rattling. If your only exposure to generics has been through the genericized java.util collections classes, the conceptual depth required to succeed on the test is pretty intimidating. But, have a shot at it. See how you do, and think about whether advanced generics will help you with your work.


In Projects and Communities, the latest JavaTools Community Newsletter announces three graduations from the community incubator: SimpleDBM, a Java database manager; mdevinf, a Swing GUI for accessing WURFL mobile device information; and SubscriptionCycle, which allows you to publish content to your subscribers in multiple formats. The newsletter also rounds up tips on java.net RSS support.

The Embedded Java Community home page notes the availability of VIA's Java Cryptography Service Provider implementation. As described in an announcement (PDF, 50 KB), the VIA JCP allows access to the cryptographic hardware integrated into all recent x86 VIA microprocessors. The VIA JCP implementation is available from the company's downloads page.


Desktop development dominates today's Weblogs. Alexander Potochkin begins by showing off Mustang's TabComponents in action: "There have been a lot of publications about adding a "close" button to a tabbedPane, and all the solutions are really inventive and not easy to achieve. So we are going to talk about Mustang's "tabComponents feature" because it is the most preferable and clear solution for JTabbedPane customizing."

Scott Violet offers a flexible Swing design strategy in WeakReferences and Actions: "In my last blog I delved into why one might use Actions. In this article I'm going to cover how Swing's component support Actions. Eventually I'll wind up in why you should know about WeakReferences."

Itching to use Mustang's OpenGL pipeline to integrate Swing and OpenGL? Romain Guy has a preview in Twinkle, a Java2D/OpenGL Demo: "I have spent the past few days playing with JOGL and the new OpenGL pipeline in Mustang. Here is a sneak preview of a soon to be released demo."


In today's Forums,tackline reveals some interesting performance details in Re: Does the HotSpot JIT compiler optimize ... ?: "ByteBuffer.put/get eventually call intrinsics sun.misc.Unsafe methods. If you download the Mustang source, hotspot/src/share/vm/oops/memoryOop.cpp maps from Java to intrinsic names. hotspot/src/share/vm/opto/library_call.cpp is the business end. If the bytecode of the calling method is too long, then HotSpot will not inline methods. To inline intrisics used by NIO into your code requires multiple levels of inlining. Therefore, keep your inner loops in short methods."

Another performance question comes up in Java NIO performance, in which mas7871 asks: "I want to process a pipe delimited file that has two fields per line. First, I wrote a program using a BufferedReader and using the .readLine() method and measured the time it took using start and end GregorianCalendar objects. Second, I wrote another program using a ByteBuffer and Channels to read the file and using the same technique as above to measure the time interval. To my surprise the performance is the same(~6.5 seconds)! Could someone please help me understand why there wasn't any performance difference? (Also, I wrote a program in C# and it processed the file in 1.5 seconds)."

In Also in Java Today, Integration Developer News reportsIBM Ships Free Geronimo-Based J2EE for SMB: 'By mid-November, IBM is slated to ship a free J2EE app server, based on Apache's latest Open Source Geronimo app server, and tuned for departmental IT staff, as well as small- and mid-sized businesses. IBM's Websphere Application Server- Community Edition, available for free, will bring together Apache's Geronimo, a Cloudscape database, connectivity drivers for Cloudscape and other DBs, and an enhanced UI."



 

In a bonus ITConversations pick of the week, JBoss founder, chairman and CEO, Marc Fleury talks with Scott Mace "about the state of professional open source, Java and EJB3, Eclipse, .Net, Mono, application development for rich Internet clients, Red Hat's success and detractors, Sun's detente with Microsoft, and why trained physicists such as himself make good Internet application innovators."


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.



Try our challenging generics quiz  
kfarnham

The Present Blog

发贴人 kfarnham 2005-11-9

The Book Club discussion reaches "Beyond Java"s turning point

A new chapter is open for discussion in the Book Club forum's discussionof Beyond Java. The thread Chapter 3: Crown Jewels kicks off:

Chapter 3 looks at Java's innate strengths, though it concludes those strengths may not be today what they once were. Bruce Tate writes "I get enormous productivity jolts out of Java's incredible community, and countless open source projects. The open standards and the JVM mean that my knowledge, and my applications, can move from place to place. Java's been tremendously successful. You've seen my views about why it was popular. If you're to understand what might possibly come after Java, you need to ask questions about Java's continued success:

  • What makes Java hip, and draw such a wide variety of people?
  • How has the open source community thrived, in times, despite Sun and the power vendors?
  • What are the indispensable technical underpinnings that make Java successful?
  • What makes Java so adaptable that programmers can build everything from web sites to databases?"

In some ways, this is really the turning point of the book. Assessing everything that Java has done right, and what has contributed to that success, it then starts to ask the book's key question: have we gotten as far as Java can take us?

I hope you'll join us for further discussion in the forum. If you haven't read the book, don't panic: java.net's Online Books offers a 14-day free trial of the Safari Bookshelf, which includesBeyond Java.


Also in today's Forums,joe_walker wonders about Ajax? in the Web Tier thread of the Planning JavaOne 2006 forum: "There's no Ajax on this list - I'm assuming there isn't another area for it? I'm seeing quite a bit of interest in tools like DWR."


Zarar Siddiqi relates some all-too-familiar experiences with bad project management in today's Weblogs. In Developer thinks he'll make a better PM, he writes: "Although I've been a core developer for a significant part of my career, I do often come in contact with the business-types who drone on about requirements while the eager-to-please IT shop keeps saying yes to even the most unfathomable requests."

John O'Conner has several updates from JavaOne Tokyo on his blog. On the front page, we're featuring JavaOne Tokyo '05: Extreme GUI Makeover, in which "Scott Violet and Hans Muller wow the audience with Extreme GUIs."

In Linux vs Windows? Maybe a lesson here for Java vs Whatever, Bruce Boyes has soem ideas about helping Java: "A couple of paragraphs here may serve as a reminder of why the 'best' solutions don't always win, what we could do about it, and what really matters as we sell Embedded Java."


In Also in Java Today, the JavaOne Call for Papers is open through November 30. This is the place to propose Technical Sessions, Tutorials, Industry Panels, Technical Case Studies and Birds-of-a-Feather Sessions (BOFs) for JavaOne 2006, being held May 16-19 in San Francisco. Subject areas for presentations are Core Platform (Java SE), Core Enterprise (Java EE), Desktop, Web Tier, Tools, Mobile and Embedded Devices, and Cool Stuff. Potential JavaOne attendees can also offer ideas for conference content by posting suggestions on the Planning JavaOne 2006 forum.

At last month's Web 2.0 Conference, Tim O'Reilly sat down for a discussion with Sun Microsystems COO Jonathan Schwartz and Mozilla Foundation president Mitchell Baker, in which they discussed the emerging web and issues of distribution, community, extensibility, and more. For Java developers, Schwartz makes some particularly striking comments, saying that everything Sun does will be open sourced, but also challenging conventional wisdom on just what the value of open source is. ONJava has put this session into a 48-minute podcast, called The Community of Web 2.0, which you can get from the ONJava site or via the O'Reilly Podcasts feed in your podcast client of choice.


In Projects and Communities, the GlassFish project is asking the community to help with promoting the open source Java EE 5 application server. GlassFish is asking the community to vote for the web-page button they like best. You can check out the designs and vote for your favorite button through November 14.

The JavaDesktop Community project ituneschecker performs a variety of consistency checks on an iTunes music library, such as checking that all tracks in the library exist on disk and vice versa, checking that every track appears in at least one playlist other than the master playlist, etc.


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.



The Book Club discussion reaches "Beyond Java"s turning point  
kfarnham

Tuesday Afternoon Blog

发贴人 kfarnham 2005-11-8

JavaOne Tokyo 2005 begins

When my alarm -- and I'm talking about a child, not a clock -- went off at 4 AM this morning, it was already Tuesday afternoon in Tokyo and the end of the first day of JavaOne Tokyo (日本&#35486;).

Several java.net bloggers are at the conference -- including John O'Conner, Gregg Sporar, andJoshua Marinacci-- and they're providing coverage, opinion, and a taste of their own activities at the conference. John's blog entry JavaOne Tokyo '05: Technical Keynote outlines strategies for Java ME, SE, and EE covers the "road maps" keynote, with John Pampuch's presentation of the Java SE road map, and Mark Hapner discussing the future of J2EE development.

We've also kicked off a JavaOne Tokyo 2005 forum, for both attendees and non-attendees to discuss conference going-on's. The Welcome mesasage says "This forum is for discussion of JavaOne Tokyo 2005 - what's going on, what you want to see, what you thought of the keynotes and sessions, etc. Hopefully, it will also be useful for those not at the conference to get a sense of the conference activity. Registered users can create topics and post new messages. Unregistered users have read-only access."


In today's Feature Article, Srini Penchikala looks at Implementing Validation Rules using Aspects: "This article provides an overview of AOP-based data validation implementation in a sample loan processing application. We will look at validation rules for data fields with different validation requirements, which is common in most real-world applications. We will use annotations-based aspects (using AspectJ) to dynamically weave validation rules into existing application code where the data validation is required."


Also in today's Weblogs, N. Alex Rupp says farewell in Final Entry: Revisiting My First Assumption: "This will be my last blog entry in this space. Reexamining assumptions made in the first entry, jotting down some closing thoughts, and laying some clues as to what follows."

Brian Leonard says, "Creating JSF compliant web applications using a WSIWIG editor used to cost you. Not any more." The details are in his blog entry Create This.


In Also in Java Today, "the Spring framework minimizes architectural dependencies and externalizes composition in your applications, but applications also need to be managed. Fortunately, Spring 1.2 includes sophisticated JMX integration support -- and JMX delivers a practical management infrastructure for your applications." In Extending Spring JMX support, Claude Duguay takes Spring JMX a step further, showing you how to add notification events to methods and attributes transparently. The resulting code lets you monitor state changes without cluttering up your Java objects.

In the latest J2EE Tech Tip Sun's Neeraj Bajaj discusses The Schema Validation Framework (SVF). Also known as the Validation Framework, SVF "offers advanced capabilities to efficiently validate XML against a schema [and] provides for much faster performance as compared to the schema validation approach in JAXP 1.2."


In Projects and Communities, source code for the JAXP Reference Implementation project are now available from the JAXP Sources Project. JAXP 1.3, the Java API for XML Processing, currently ships as part of J2SE 5.0. Sources for the new version, JAXP 1.4, are part of the jaxp-sources project. The sources project also links to the JAXP 1.4 spec and the JavaDoc.

The GlassFishproject is forging a new effort to be more compatible with .NET. GlassFish will offer open-source implementations of web services necessary to interoperate with Windows Communication Foundation, Microsoft's web services platform. More info is available in the java.net blogs GlassFish to Interoperate with .NET and More Interoperability with .NET.


In today's Forums,flozano makes a call for a more practical JavaOne 2006 schedule guide in Re: Grab Bag: Other Ideas for JavaOne: "The tool (and maybe the printed guide) should list sessions and BOFs by time/date and not only by topic. With so many sessions at the same time you have to choose which ones you'll attend."


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.



JavaOne Tokyo 2005 begins  
kfarnham

Question Blog

发贴人 kfarnham 2005-11-7

What the java.net community is thinking

Truth be told, there's usually some sort of motivation behind the java.net Poll that's launched every Friday. Nothing nefarious, I think, and we try not to be biased, but usually there's an idea that we have that leads to our asking a poll question, sometimes as a way of confirming or debunking commonly-held beliefs. Or, preferably, to kick off conversation.

Consider this week's question -- I hope I'm not going to bias the results by discussing it openly -- which asks "How often do you write Java Native Interface (JNI) code?" This actually came from all the forum conversations about the size ("bloat", some would say), of J2SE 5.0. It occurred to me that if Java really has everything and the kitchen sink, then you shouldn't need to go JNI very often, since you should be able to do everything in Java, right? (Rhetorical question - don't answer yet)

The current resultson that are pretty interesting, because while 58% of respondents say they've never used JNI, that means 42% haveneeded to go JNI. That's higher than I personally expected. What's even more interesting to me is that the old use case for JNI was that you'd need to go native to get functionality provided by the native OS or some native library that wasn't in Java. I always figured that was a very J2SE use-case (for example, I'm writing some Java-to-QuickTime stuff for Mac and Windows), and if most Java developers are writing web apps, it makes me wonder "what is it that they going native for?"

A few other polls where I think we got interesting results and/or discussion:

  • Does humor belong in javadocs? - The question is borrowed from Frank Zappa (who had an album called "Does Humor Belong in Music") and from my own experience - I've written snarky comments, but been ticked off by others' too-cute docs and method/classnames. The same dichotomy shows up in the comments: people had really strong opinions, pro and con, on this one.
  • When do you think you'll write your last line of Java code? - A counter toBeyond Java: more than a third think they'll be writing Java code in 20 years which, from anecdotal evidence, is longer than the typical programming career. A strong statement of support, but will it hold up?
  • How appropriate is Java for beginning programmers? - Kind of inspired by Beyond Java's claims that Java has abandoned the non-hardcore-Enterprise programmer, but more motivated by a result from ONJava's 2005 poll which got zero responses from Java developers under 18 years of age. And yet Java is used on the Advanced Placement Computer Science Exam in the U.S. Still, respondents here thought that Java was indeed a good language for beginners. Eat your veggies, kids -- Visual Basic will make you stupid.
  • What is your preferred source for learning about new products and projects? - We do both formal (feature articles) and informal (weblogs, forums, wikis, etc.) on the site, and wondered about the merits of the two: filtered and carefully-produced versus off-the-cuff and anyone-can-post. Maybe the bigger story is how much the online sources have trumped offline.
  • How many lines of Java code do you think you've ever written? - Kind of an implicit "Bozo filter" on this one. We put the top option at "more than 1,000,000" lines of code, even after figuring that someone who started on Day One of Java in 1995 would have to average a remarkable 100,000 lines of code a year to make this. Possible? Maybe - with 240 weekdays a year, that's 417 lines of code a day, so remotely possible with generous formatting. But have 12% of our readers really written this much code? Pretty hard to believe...

By the way, do you have a poll idea? Comment on this blog and we'll consider it for upcoming weeks. Thanks.


In this week's Spotlight, the recently-launched Sun Grid Developer Community offers tools and resources for the development of standards, infrastructure, architecture and partnerships for the Sun Gridpay-as-you-go service. Many resources are available on the community wiki, and the community's project space offer a place to collaborate on projects that run on or are interfaces to Sun Grid, or help with development of grid applications. You can also join the Pilot Project and get 100 free hours of CPU time on the grid.


In Projects and Communities, the balloting phase of the JCP 2005 Elections remains open to eligible members through Monday, November 14. The Executive Committee guides the evolution of Java, and consists of both major stake-holders and other community members. All JCP JSPA 2 Members are eligible to take part in the election.

The WS-XML Community news items notes the availability of the Sun Java Streaming XML Parser, aJSR-173 StAX implementation and part of Project GlassFish. SJSXP is a non-validating, XML 1.0 and Namespace1.0 compliant XML parser. This faster "pull model" of XML parsing also simplifies parsing multiple documents.


Joshua Marinacci talks about My LA-JUG Peabody Presentation in today's Weblogs: "Last week I gave a presentation on Project Peabody for the Los Angeles Java Users Group, and I think it was well received. What's that? You've never heard of Project Peabody?"

Kirill Grouchnikov introduces Mylar - a very useful Eclipse plugin: "If you are working in Eclipse, you will find that Mylar plugin can be very handy. It monitors your interaction with the workspace and filters out the classes / methods / fields that you do not use or change. The resulting view of the workspace is much more focused on your current task."

In Scatter Plots in Japex, Santiago Pericas-Geertsen digs deeper into benchmarking: "Earlier in this blog I introduced Japex, a simple yet powerful tool to write micro-benchmarks in Java. At the time, I've only touched on the basic features by briefly explaining how to write a Japex driver and a Japex configuration file. Today, I'd like to talk about a brand new feature: scatter plots for displaying benchmark's results."


In Also in Java Today, Chuck Cavaness asks: "Is it conceivable that anyone in the business of building software hasn't heard of the Struts framework? From developers that are just starting out in the business to those long in the tooth, the name 'Struts' surely must ring a bell. But if you haven't spent your development time in the Java world or haven't had the need to build web applications, Struts might only be a buzzword that you've added to your resume." In the "whirlwind tour" that is What Is Struts, Chuck traces the beginnings of Struts, explains its advantages, and shows a simple example of a Struts action.

"A proxy provides a surrogate or place holder for the target object to control access to it. It introduces a level of indirection when accessing an object. The JDK dynamic proxy, which has been available since JDK 1.3, is often used to create proxies dynamically. The JDK dynamic proxy is simple to use, but the JDK dynamic proxy approach requires the target objects implement one or more interfaces. What if you want to proxy legacy classes that do not have interfaces? You can use the CGLIB library." In Create Proxies Dynamically Using CGLIB Library, Jason Zhicheng Li lists some of the popular frameworks that already use CGLIB -- including Spring AOP, dynaop, Hibernate, EasyMock, and jMock -- and then shows how to use it for your proxy needs.


Book Club correspondents question Beyond Java's focus on web apps in today's Forums. In Re: Chapter 1: Owls and Ostriches, rickcarsonwrites: "My current thinking with Web 2.0 and social networking is that with a lot of these things we're handing off work from our local computer to the network. Eg the advantage of web based email, is that I can go anywhere and still read my email. The advantage of Flicker is that I can go anywhere and still view my photos (and I can share them with others). And so forth with things like podcasting and blogging. The net is becoming not so much a distributed processor, but a distributed data storage. I think we will continue to see tools that enable people to easily move the content they create out onto the net (what is a home movie but a video podcast after all?). But the interesting thing is that the net is language agnostic. I don't really care if the page which serves up my html is in Java, VB, Ruby or 'the next big thing'. Perhaps I'll start caring if the state of the art on the front end can be advanced to become a much better user experience - a distributed phat client. If that happens, then won't it be true that the network really is the computer?"

kcpeppe continues the discussion on Re: Operator overloading (again) and functions: "What my business is in this forum is to add to the discussions based on my experiences and education with computer languages. Operator overloading is a artifact of having operators in the language. IMHO a better direction is to remove operators from the langauge. That said, it is not going to happen in Java, nor would I want it to for arguments that I've made in other threads in this forum. "==" and "=" both have a clear function. They are notationally clean. If you were to confuse the meaning of "=" you will produce code that is difficult for me to read. So it doesn't matter is I use it or not because others will."


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.



What the java.net community is thinking  
kfarnham

Simple and Clean Blog

发贴人 kfarnham 2005-11-4

Beefing up your Trails app

A while back, Chris Nelson introducedthe Trails web application framework, an admittedly Rails-inspired system for pulling together the basics of a web application -- putting a web interface atop CRUD database manipulation -- with a minimum of fuss, hassle, or heavy lifting.

The trick with some simple frameworks is that they end up being too limiting. Fortunately, Trails is more sophisticated than it might appear at first glance. As Chris puts it:

To steal a great quote from Larry Wall, the inventor of Perl, Trails is designed "to make easy things easy and hard things possible." I hope I convinced you last time that easy things are indeed easy. Now it's time to look at some of the features that allow you to build a real application.

In our Feature Article, Further Down the Trail, Chris shows how to create one-to-many relationships, customize the order in which things are displayed, customize the kinds of widgets used to present editable items, and how to validate user input.


In Projects and Communities, the SwiXml project is a small GUI generating engine for Java applications and applets. GUI's are described in XML documents that are parsed at runtime and rendered into javax.swing objects. Swing programmers can start writing descriptors without learning a new XML dialect, as class names translate into tag names and method names into attribute names.

The newly-released Mac OS X 10.4.3 update apparently fixes Eclipse bug 95475, "Eclipse get progressively slow under Mac OS X 10.4 (Tiger)". One comment in the bug log is typical of widely-reported experiences with 10.4.3: "I can confirm that the fix works. My Eclipse was running horribly, every time. After upgrading the OS last night it appears to be normal."


The latest java.net Pollasks "How often do you write Java Native Interface (JNI) code?" Cast your vote on the front page, then visit the results page for results and discussion.


There are more JavaOne 2006 suggestions in today's Forums. In Re: Desktop, flozano writes: "I think Java apps need to pay more attention to packaging, and JavaOne could help a lot to spread best practices and unite people to define standards in this area. You should invide people from JPackage and Debian to help on this. It's not ok to have dozen copies of the same libraries (like Log4J) around my system, because each and every app has it's own lib folder with third-party jars they deppend on. Besides eating up disk space, this prevents us from getting class code sharing and so from running many Java apps concurrently. It's also not ok to have each app install its own JRE and sometimes one prevents the other from working properly. I'm tired to fix Windows registry, environment and manualy erase Java exes and dlls from windows\system folders. We need something alongside the Linux packaging system, maybe integrated as a new JWS."

Mixed feelings prevail in the Book Club discussion of Beyond Java. In Re: Chapter 1: Owls and Ostriches, rickcarsonsays: "It is interesting to see someone who has written Java books lose interest in the language. But is there something genuinely 'wrong' with the language, or do they just need a change, some fresh air? I think that Java is still evolving, some good (annotations), some bad (generics), some in between (autoboxing seems like a good idea but I have recently seen some posts about nasty problems it can introduce with things like == ). Which is interesting. Up till about 1.3 I pretty much whole heartedly agreed with everything that went in (particularly 1.2 was a good step forward). Subsequently I do find myself a lot more in the 'conservative' or 'grumpy old men' camp."


When Vikram Goyal says I want a piece of the pie in today's Weblogs, he's talking about action in the J2ME space: "While everybody, and I mean everybody, is talking about the coming death of Java and thedemise of Struts, nobody seems to be realizing that their is a new frontier on the Java horizon. Java on the mobile phone is making big money."

In the announcement JAX-WS Project Created on Java.net, Doug Kohlert writes: "A new JAX-WS project has been created on Java.net. This project is for the reference implementation of JSR 224 that Java API for XML Web Services."

Simon Brown addresses some feedback to his webapp series in Comparing webapp frameworks : Why?: "'Imho this is a complete waste of time and it will be another biased comparison without any real use whatshowever.' So, why am I doing this?"


In Also in Java Today, "High-volume database traffic is a frequent cause of performance problems in Web applications. Hibernate is a high-performance, object/relational persistence and query service, but it won't solve all your performance issues without a little help. In many cases, second-level caching can be just what Hibernate needs to realize its full performance-handling potential." John Ferguson Smart's Speed Up Your Hibernate Applications with Second-Level Caching examines Hibernate's caching functionalities and shows how you can use them to significantly boost application performance.

Is a Struts-based web application completely testable? You can apply DbUnit to the database and JUnit to your business logic, but the Struts actions themselves have proven a gap in testability. InTest-Driven Development Using StrutsTestCase, John Ferguson Smart writes: "testing Struts actions has always been difficult. Even when business logic is well confined to the business layer, Struts actions generally contain important data validation, conversion, and flow control code. Not testing the Struts actions leaves a nasty gap in code coverage. StrutsTestCase lets you fill this gap."


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.



Beefing up your Trails app  

Mustang progress front and center

I've pointed this out a few times, but the openness of the Mustang project is really a remarkable thing. Remember, this is the version of Java that we're all going to be downloading and running next year, and its development is in full view of the coding public. Earlier in the week, we saw the unveiling of the Crack The Verifierinitiative, which challenges developers to find holes in Mustang's radically-overhauled bytecode verifier.

Check out the recently-updated right column of the JDK Community page and you'll also find the Mustang list of committed bugs... 700 by my informal count of the Mustang b58 list. And some of those are coming from you, the Java community, with contributed fixes now tracked on their own page, in response to requests from contributors.

One of my other developer programs doesn't even publicize its bug list, so you can't even know whether the bug you're filing is a duplicate, not to mention whether a fix is coming or is even being considered. Mustang's openness is a welcome counterpoint.


In Projects and Communities, the JavaPedia page CajoServletoffers a strategy for J2EE developers to incorporate Cajo, a distributed computing framework. The servlet loads and configures the Cajo ItemServer as the J2EE application loads, so you can reuse your existing J2EE work while incorporating Cajo.


The Book Club discussion of Beyond Java is moving ahead in today'sForums, with the thread Chapter 2: The Perfect Storm: "Chapter 2 begins 'To know where Java is going, you've got to know where it came from. You need to remember the conditions that caused us to leave the existing dominant languages in droves. You must understand the economic forces that drove the revolution. And you cannot forget the sentiment of the time that pried so many of us away from C++, and other programming languages for the Internet.' It argues that Java benefitted (and propelled) a number of important trends: OOP, backlashes against Microsoft and C++, programming for the Internet. It also talks about the tremendous amount of Java open source development, arguing that it is the open source developers who are driving innovation in the Java space. Whatever comes next will have to learn from Java: 'Java completely rewrote the rulebook defining what it takes to be a commercially successful programming language.'"

ivelin writes about an interesting Mobicents effort in Google Talk Bot Example: "I started working on an example that allows Mobicents services to appear as GoogleTalk users and do useful things such as anwering what time it is. So far I managed to get the RA to connect and show up as an active user in the GoogleTalk app. Still working on the SBB. I had to upgdrade to the latest smack.jar. The one committed with the RA seemed to be from 2004. Will this break the PTI customizations? "


Simon Brown is Comparing webapp frameworks in today's Weblogs: "Struts, WebWork, Stripes, Spring MVC, Wicket, Tapestry, JSF, etc, or even rolling your own. With so many J2EE web application frameworks to choose from, how do you decide which one to use?"

John O'Conner is seeking international input on the bug Bidirectional Text Inconsistencies: Bug # 4701238: "Swing components show inconsistencies in laying out Right to Left (RTL) text. How should this be resolved?"

In Cleaning the servlet requests from Html Injection, Felipe Gaucho writes: "Web Application Security Vulnerabilities are a tricky area that needs creative solutions. Several frameworks solve a lot of problems for you and it may cause a weak perception about what really happens into the underneath code. This entry comments the Html Injection Filter - a set of classes that prevent Html injection into Cejug-Classifieds Project."


In Also in Java Today, "The Java platform's object-oriented nature is key to creating powerful, reusable code and applications that are easy to maintain and extend. To take advantage of these capabilities, you must not only master the syntax of the Java programming language but also gain a practical understanding of what objects are all about. More importantly, you must understand how to structure a Java technology application from the ground up to make the most of objects." The Book Excerpt: Java Objects: From Concepts to Code (Second Edition)introduces three generic collection types (ordered lists, sets, and dictionaries), specifics of several Java collection classes, and then shows how to use collections to solve real-world problems.

In Taconite 1.0 Released, the Ajaxian.com site introduces and discusses a new open-source AJAX framework based on concepts from the W3C DOM Level 3 Load and Save specification. "Taconite automatically updates the current Web page's DOM based on the XHTML supplied by the developer. As such, Taconite eliminates the need to write document.createElement and document.appendChild statements to update the DOM following an Ajax request." It isolates developers from quirks between browsers and works with any server-side technology, such as J2EE.


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.



Mustang progress front and center  

The book club discusses "Beyond Java"

The Book Club forum is kicking off a lengthy discussion of Bruce Tate'sBeyond Java, a book that's already prompted responses from java.net bloggers (including John Reynolds, Vikram Goyal, and Fernando Lozano). The book's premise is that while Java has been a breathtaking success - even re-defining what it means for a computer language to be successful - that it has reached the limit of what it can achieve in many important ways, and that innovation is starting to occur outside of the Java realm.

We're going to discuss one chapter per week, by opening a new thread for each chapter. This first week is an exception, though, since the introductory chapter is short and largely exists to introduce the broad themes and ideas of the book. So, we've launched threads for chapters 1 and 2.

The discussion of Chapter 1: Owls and Ostriches begins:

Chapter 1 establishes the pros and cons of keeping your head in the sand, ignoring what's going outside of Java. It argues that when a language is in its prime, this is perfectly appropriate, even beneficial, as it's better to spend your time with the language du jour than to look for alternatives. But when a language starts to show signs of wear, it's time to start looking for alternatives. Is it time? The chapter uses the analogy of boiling a frog, which doesn't even realize it's boiling until it's too late.

The next thread, Chapter 2: The Perfect Storm, discusses the perhaps inevitable rise of Java:

Chapter 2 begins "To know where Java is going, you've got to know where it came from. You need to remember the conditions that caused us to leave the existing dominant languages in droves. You must understand the economic forces that drove the revolution. And you cannot forget the sentiment of the time that pried so many of us away from C++, and other programming languages for the Internet." It argues that Java benefitted (and propelled) a number of important trends: OOP, backlashes against Microsoft and C++, programming for the Internet. It also talks about the tremendous amount of Java open source development, arguing that it is the open source developers who are driving innovation in the Java space. Whatever comes next will have to learn from Java: "Java completely rewrote the rulebook defining what it takes to be a commercially successful programming language."

If you want to participate but haven't bought Beyond Java, or if you're not sure you want to, you can try before you buy with the java.net Online Books service, Safari Bookshelf, which offers a 14-day free trial. Once you've joined, you can read Beyond Java online.


Else where in today's Forums, suggestions continue to pour in for Planning JavaOne 2006. In Re: Tools, mgrev writes: "I would be very interested in how Sun are going to get the JavaBean Component market started. Not before there are oodles of really good component will the desktop truly take off. Today .NET outweight Java 10 to 1 in this area since the component support is so much better on that competing platform. Basically it easier to make an advanced component and edit that is Visual Studio. Some connection to JSR-273 would be good."

Chet Haase is echoing the call for JavaOne 2006 input in today'sWeblogs. In JavaOne 2006: Ideas for Desktop Talks?, he writes: "In the interest of having the Greatest JavaOne Ever, I'm putting out this request: what would you like to see at the conference? What are the must-see topics? What speakers should we try to get? What are particular talks you'd like to hear? What are cretive new ideas for the conference overall, or for covering particular topics?"

John O'Conner relates a ruinous gotcha in NetBeans 5.0 Beta...ouch: "I use NetBeans every day. I like it. However, there's one thing that really irks me...and that's when a tool destroys code."

In "Death to the Browser" - bring on a real application platform, Kirill Grouchnikov scoffs at a buzzword-happy prediction of the next generation internet interface, since Java already does it: "All in favor of reinventing the wheel - raise your hand. All others - continue using Swing"


In Projects and Communities... Does JSF imply JSP? Not necessarily. "Facelets steps outside of the JSP spec and provides a highly performant, JSF-centric view technology... The difference is under the hood where all the burden of the JSP Vendor API is removed to more greatly enhance JSF performance and provide easy plug-and-go development."

A messageto the dev@jxta.org list that the JXTA-RM project is ready but needs testing beyond the LAN. The project intends to provide reliable multicast in JXTA, as there is no multicast implementation based on UDP transport. Part of the solution is the Java Reliable Multicast Service (JRMS) library, which isolates applications from multicast details.


An important question tops Also in Java Today: Is AJAX the right client-side solution? "There is an enormous amount of hype surrounding AJAX, as well as criticism. It's only natural that there is a great amount of skepticism about whether AJAX will be just another passing fad, but some very big names in software are jumping on the bandwagon." In Is AJAX Here to Stay?, Jordan Frank looks at the advantages of and criticisms against AJAX and argues that the increasingly consistent handling of AJAX by the major browsers will help secure its relevance for future web application development.

In Learning Java 2D, Part 2, Robert Eckstein moves beyond graphics primitives like shapes and text and digs deeply into images, showing how Java 2D manages BufferedImages internally and how you can apply filters to them. It also introduces double buffering techniques in Java2D and hardware-accelerated VolatileImages.


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.



The book club discusses "Beyond Java"  
kfarnham

Invoke Blog

发贴人 kfarnham 2005-11-1

AOP made DIY

One of the knocks against Aspect-Oriented Programming may be the inexplicable hand-waving voodoo that is used by some frameworks to implement the concept. Some AOP implementations extend the Java language, others require their own JVM. It's only natural that you may feel you're losing control of your code by handing it over to AOP this way.

So here's a thought: do the AOP yourself. Through the use of dynamic proxies (and other approaches), you can intercept method calls and apply cross-cutting concerns yourself. This is the theme of today's Feature Article,Implement Your Own Proxy-Based AOP Framework by Jason Zhicheng Li:

To help you understand and demystify AOP, this article shows you how to create a simple AOP framework using both JDK dynamic proxy and CGLIB. This framework supports declarative transaction management. This article uses Java 5 features, including annotations and generics. Since JDK dynamic proxy is simpler, this article starts with dynamic proxy.


In case you missed yesterday's announcement of the Crack the Verifier initiative, today's Weblogsfeatures Graham Hamilton's Help Crack The Java Verifier: "Sun is asking the developer community to help attack the new bytecode verifier in Mustang. Here's some background on how and why the community can help here."

Zarar Siddiqi has written The ultimate toString() method: "I can't remember the times I had to dump a crude toString() method into one of my classes and have it return the properties of the class just so I could track down a blasted Exception. It had previously occurred to me that perhaps creating all these toString() methods was not only cumbersome, but also a waste of time."

In RFID in passports: bad idea, Bruce Boyes writes: "The US State Department tries to patch up a poorly conceived application of technology which is inappropriate for the task."


Suggestions for Planning JavaOne 2006 kick off today's Forum entries. According to Re: Mobile and Embedded Devices, "The session (TS-7091) on Java for the Blu-Ray Disc player last year was sold out and wasn't broadcast to another room or repeated. There's clearly a great deal of interest in this, and the players should be on the market by the time of JavaOne. I'd like to see a session specifically on how to get a BD-J SDK and develop interactive media content for the platform."

toshe has a question about annotations and GlassFish: "Does anyone have examples using annotations in the web contaner of GlassFish? I need examples how to annotate servlet, JSP page ot tag handler (java or tag file). Using the old schema (2.4) seems that no annotations are used. When i try to specify 2.5 schema in web.xml i receive this exception: Caused by: org.xml.sax.SAXParseException: TargetNamespace.1: Expecting namespace 'http://java.sun.com/xml/ns/j2ee', but the target namespace of the schema document is 'http://java.sun.com/xml/ns/javaee'."

On Wednesday, we'll be re-launching our Book Club forum, with an extended discussion and analysis of Bruce Tate's thought-provoking and controversial Beyond Java. If you want to read ahead to be ready for the discussion, but you don't have the book, you can check it out as part of the Safari Bookshelf, our online book service, which also offers a 14-day free trial.


In Projects and Communities, the Java Communications Community project Bluesock offers a lightweight Windows Bluetooth Socket API implementation of JSR-82. The current version supports RFCOMM, over-the-air encryption and full authentication, with OBEX to follow in the next release.

The Jdon project has just released version 1.3 of its framework. Jdon describes itself as a RAD tool for writing a small-to-medium size J2EE application, and as an IOC and AOP framework that is so componentized that everything is replacable... even the framework itself.


In Also in Java Today: "Life moves quickly for the technologist, so it's imperative to stay young and vital in one's tech career." This is the key to Avoiding Oblivion in Your Tech Career Using the analogy of Shakespeare's renowned soliloquy from As You Like It on the seven phases of life, Michael Havey (author of Essential Business Process Modeling) offers tips on how you can sustain technology excellence well into your golden years.

When you type a link into a text editor, it will automatically convert into a hyperlink, a standard feature in most rich text editors. Java Swing provides support for HTML mainly through the JEditorPane class. Though the default implementation does not provide the capability for automatic link detection, the API does provide the required hooks to implement this feature. In Add automatic link detection to your Swing apps, the authors describe how to extend JEditorPane functionality to automatically detect and update hyperlinks and respond to hyperlink events.


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.



AOP made DIY  

过滤博客

按日期: