Skip to main content

Flexible dependencies

Posted by daniel on June 11, 2004 at 11:01 AM PDT

Is the ground you are standing on too solid?

Robert C. Marting begins his column "Agile Software Development: Principles, Patterns, and Practices" with The Abstract Server Pattern. It is such a simple concept (which is a good thing). In his example he has a button which is used to turn a light on or off. The problem is that the button, in the initial implementation, depends on knowing about the light. This violates "the Dependency Inversion Principle (DIP) [which] recommends that we not depend on concrete volatile classes." These are the "classes that are most likely to change and have significant impact upon their clients. Also clients that depend upon concrete classes are not easily extended."

Are you powering someone else through your contributions?
In today's
Weblogs, Bruce Tate takes a look at people, tools, and ideas that he thinks may be Water for your rocket. Bruce would certainly make other people's lists.

Do you have any format recommendations for toString()? GerryG answers Malcolm Davis' question by saying he generally adds "two methods in my objects: toString(), which emits HTML, and toString( boolean useHTML ) which if passed false emits a log-friendly string, or if passed true then it calls the default toString() for a result.

I generally write both methods as soon as I'm done adding attributes and get/set methods. [I]t helps me understand the design (in a way similar to test-driven development)."

Pierre Delisle announces a the new jstl-spec-public project which will "promote this goal of increased transparency [into] the JavaServer Pages Standard Tag Library (JSTL) expert group (JSR-052)."

Satya Komatineni blogs about his content management system and the tools he uses in Tomcat, a bit of Aspire, and a touch of master pages: Microsoft Access never looked so good".

In today's Projects and Communities, the Linux Journal has a story on how the Red Hat Eclipse team used "GCJ to compile Eclipse into native binaries that could run without having a JVM installed."

The community manager looks back on where has come since launch and thanks all of you for your help in What a difference a year makes.

In Also in Java Today Andrei Ciorioanu continues his series on developing a Java desktop application with Data Models for Desktop Apps. He makes a case for implementing a data model for your desktop widgets even though it may at first appear to increase the complexity. He explains that you actually reduce the complexity because the "data model doesn't normally have to know anything about the GUI that uses it. This makes the code more maintainable and reusable."

In Taming the Tiger: Understanding Generics, Tarak Modi begins with the standard Vector example that illustrates a benefit of Generics. Modi quickly moves on to Wildcards, creating your own parametrized types, and using generic methods. The article is a quick introduction to what you can do with generics.

"If someone releases something for free use I'll use it."
In today's Forums, jwenting writes in the been there... thread that "I won't let anyone force me how to release my own products (which is why I steer well clear of anything GPL, GPL forces you into a licensing structure I don't want)."

Howard responds to the question on stylesheet files saying "Let's assume you can trust the headers. When you use the @Shell component, you can specify a stylesheet parameter. Normally, you bind stylesheet to a fixed value: ognl:assets.stylesheet Instead, you need to compute it dynamically: ognl:stylesheetForBrowser".

Also in been there..., mdi writes that he has "worked for several companies that were very keen on using GPL software, and then making sure that our software never linked close enough to require distributing our code. If we modified the GPL code, we released our changes, of course. We played up the 'Open Source' card in our marketing, but never really released much code."

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.