Skip to main content

Code Generation

Posted by daniel on June 1, 2004 at 10:20 AM PDT

"Code generation [..] is not the design smell, but the solution to the design smell that you are stuck with."

In part two of Extensible Code Generation with Java,
Jack Herrington writes "a platform that requires an excessive amount of coding is a design problem. Unfortunately, we are often stuck with platforms that are, at best, not optimal, like J2EE."
He points out that in his example " the business model, and some of the logic, is actually in an XML model and not in the code. That means you can port your business model to other languages and technologies much more easily than you could port source code."

Coming back from an extended weekend? Take a look at what we featured yesterday, including the beginnings of a Swing Open Letter.

In today's
Weblogs, John Gage joins us as a blogger with his post on Future Directions. He blogs about's Java Education and Learning Community (JELC) which "was conceived at the first Lifelong Learning Forum in Madrid, Spain, a meeting where Scott McNealy and 40 representatives from 25 Ministries of Education around the world discussed common challenges in implementing a policy of lifelong learning. "

Budi Kurniawan has self-published a book that Richard Monson-Haefel writes about in How Tomcat Works. "Budi starts with a very simple (3 classes) web server and slowly, over the course of a dozen chapters, enhances that example until it becomes Tomcat. It's a really cool approach to explaining the inner workings of a system and I just love it. I'm staying up way too late reading the thing and learning a lot about how Tomcat works. You don't have to be rocket scientist to appreciate the book or understand it. If you have intermediate to advanced Java skills and know something about Servlets, you'll have no problem at all and you will learn a lot."

Michael Nascimento Santos is preparing to talk about "Simplicity, Scalability, Testability and Productivity with J2EE, AOP and Rich Clients" at an upcoming conference about free software in My talk at FISL and a new blog in Portuguese.

In today's
Forums, ivar writes of the need for a highlevel HTML Rendering widget. "HTML rendering in swing leaves something to be desired for those interested in modern CSS design. Having SWT/JFace use mozilla gecko as it's rendering engine is a huge incentive to use that toolkit set."

Jonathan Simon suggested that we start working towards an open letter summarizing the UI forum comments. Swapnonil's contributes to the Brainstorm for an open letter thread, writing "I have been reading the forum discussion taking place at over the last couple of days, and here is a summary of what I think a lot of us Swing developers want. 1. For Swing components to be more usable, it seems that they, not only have to emulate the look of native components, but also the feel of native components as well.[..] 2. More "Out of Box" the components.[..] 3. Change in the JInternal Frame behaviour.[..]4. Adopt and Add widely used open source layout managers like TableLayout, JGoodies Forms layout etc into the layout package. 5. Last but not least please give us an Application Development Framework over Swing API. I talking about exactly the same features that JFace adds over the SWT API."

Also in Java Today
, Adrian Colyer has taken up Ted Neward's challenge to explain AOP without the buzzwords . Colyer explains "The concepts and requirements that a design captures are also the most likely units of change as the software evolves. Design elements that have a 1-to-1 mapping to an implementation are easy to add, remove, and maintain. Elements that have a 1-to-n concept:implementation ratio are much harder to add, remove and maintain since there are multiple places in the implementation to be updated, and it is important to update all of them, and to update them consistently." He then explains the n-1 flipside.

Should exceptions be checked or unchecked? The argument continues in Brian Goetz's developerWorks article The exceptions debate. Goetz summarizes Bruce Eckel's complaints as being mainly complaints about bad implementations of exceptions and not the exceptions themselves and then says "properly using exceptions certainly has its challenges and that bad examples of exception usage abound, most of the people who agree with him are doing so for the wrong reason, in the same way that a politician who ran on a platform of universal subsidized access to chocolate would get a lot of votes from 10-year-olds". Goetz also summarizes the suggestions of Rod Johnson who "enumerates several categories of exceptions, and identifies a strategy for each. Some exceptions are basically secondary return codes (which generally signal violation of business rules), and some are of the "something went horribly wrong" variety (such as failure to make a database connection). Johnson advocates using checked exceptions for the first category (alternative return codes), and runtime exceptions for the latter category."

In today's Projects and Communities , C. Enrique Ortiz has written about " the J2ME Web Services [ ..] API's two optional packages standardize two areas of functionality that are crucial to clients of web services: remote service invocation and XML parsing"

The Java Communications community announces that "There'll be two sessions on JAIN SLEE, and one SAMS (JSR212) and a JAIN SLEE demonstration in the exhibitors area" at this year's JavaOne conference.

In today's News Headlines

Registered users can submit news items for the href=""> News Page using
our news submission
. All submissions go through an editorial review by news director
Steve Mallet before being posted to the site. You can also subscribe to
News RSS feed

Current and upcoming
Java Events

Registered users can submit event listings for the href=""> Events Page using our href=""> 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
Today RSS feed
. All members can subscribe to the email
updates for the site at the href="">
java-net Mailing Lists page. You must be logged in to subscribe
the javanet_Daily and javanet_Weekly lists. Also, once this page
is no longer featured as the front page of
it will be archived along with other past issues in the href=""> Archive.