Thursday, December 07, 2006

 

Internationalized logging, DAO design pattern, and for-each nuances

O'REILLY NETWORK'S ONJava.com NEWSLETTER
--------------------------------------------------
The Independent Source for Enterprise Java

==================================================================
What's so hot about BIRT?

100% Java Reporting for Eclipse.
Free downloads, demos and more...

http://www.oreilly.com/go/birt_jav12706

==================================================================

Greetings--

Java has such a great infrastructure for internationalization, right?
Anyone? Hey, wait a minute. It's a lot better than some other languages,
with good support for Unicode, and a standards-compliant Locale class
that's used to find appropriate localization files by way of the
ResourceBundle class. All of which is great, but in practice, it still
leaves the developer a lot to do by him- or herself, such as deciding
where to farm out the localizations--everything in one big bundle for the
whole app, or by class so your localizations are more reusable, or
something else?--and when to load them, how to have your code make use of
them, etc. And that's just for the user-facing part of your code. Have you
ever considered internationalizing your log messages, so that users can
help you resolve problems, of if your users are developers themselves and
want to help themselves?

In a new feature article, John Mazzitelli looks at "I18N Messages and
Logging" by way of the i18nlog open source project. "i18nlog allows you to
incorporate internationalized messages into your Java applications by
providing an API to annotate Java classes to identify your i18n messages,
obtain i18n messages from resource bundles in any supported locale, create
localized exceptions whose messages are internationalized, log i18n
messages using any logging framework, automatically generate resource
bundles in any supported locale, [and] automatically generate
help/reference documentation."

http://www.onjava.com/pub/a/onjava/2006/12/06/i18n-messages-and-logging.html

In a feature article from dev2dev, Dhrubojyoti Kayal offers "A Primer on
Spring's Data Access Object (DAO) Framework." "The business components in
J2EE applications typically use the JDBC API to access and change
persistent data in relational databases. This often leads to the mixing of
persistence code with business logic--a bad idea. The Data Access Object
(DAO) design pattern addresses this problem by separating the persistence
logic into data access classes. This article is a primer on DAO design
pattern, highlighting its merits and demerits. It then introduces the
Spring 2.0 JDBC/DAO framework and demonstrates how it elegantly addresses
the drawbacks in traditional DAO design."

http://dev2dev.bea.com/pub/a/2006/10/spring-jdbc-dao.html

In this week's feature article from java.net, Nishanth Sastry unveils some
surprising "Nuances of the Java 5.0 for-each Loop." "I present eleven
short items discussing various nuances of usage, pitfalls to be aware of,
and possible optimizations surrounding the use of the for-each loop. In
the first section, I discuss what kind of iterations are possible with the
for-each. The next section illustrates common programming errors in using
the for-each loop. The final section shows how to write new classes that
can be used as targets of a for-each loop."

http://today.java.net/pub/a/today/2006/11/07/nuances-of-java-5-for-each-loop.html

Recent O'Reilly Network weblogs of interest to Java developers:

Paul Browne: Dear Open Source Santa
http://www.oreillynet.com/onjava/blog/2006/12/dear_open_source_santa.html

Robert Cooper: Child's Play--Off Topic
http://www.oreillynet.com/onjava/blog/2006/12/childs_play_off_topic.html

Dejan Bosanac: Apache XML-RPC 3.0--No thanks
http://www.oreillynet.com/onjava/blog/2006/12/apache_xmlrpc_30_no_thanks.html

Check out more O'Reilly Network Java weblogs at:
http://www.oreillynet.com/onjava/blog/

Please join us again next week.

Chris Adamson, Editor
ONJava.com
cadamson@oreilly.com

==================================================================
Sponsored by db4objects

db4o is the open source object database, native to Java, which
slashes development time and achieves unprecedented levels of
performance -- up to 55x faster than Hibernate. Test-drive the
NEW RELEASE db4o V6.0 today!

http://www.db4o.com/s/javadb.aspx?src=Onjava

==================================================================

*** Java News and Weblogs ***

java.net Weblogs
http://weblogs.java.net/

O'Reilly Network Java Weblogs
http://www.oreillynet.com/pub/q/weblog_s?x-subject=3

Other Java News (channel -- LANG: JAVA)
http://www.oreillynet.com/meerkat/index.php

Java Cookbook Recipe of the Day
http://www.onjava.com/onjava/javacook/solution.csp?day=1

Java Events
http://www.onjava.com/onjava/events/

==================================================================
Register for ETel by January 8th and save

Registration is now open for the 2007 Emerging Telephony Conference.
Explore the strategies for taming disruption and exploit opportunities
being created by web telephony innovations.

Register by January 8th and save!
http://conferences.oreillynet.com/pub/w/50/register.html

==================================================================

*** Other Related O'Reilly Network sites ***

O'Reilly Network
http://www.oreillynet.com

XML.com
http://xml.com/

ONLamp.com
http://onlamp.com

O'Reilly Media
http://www.oreilly.com/

O'Reilly Java
http://java.oreilly.com/

***

ONJava.com Affiliates

Servlets.com
http://www.servlets.com/

JDOM.org
http://www.jdom.org/

------------------------------------------------------------------
Visit our Sponsored Developer Resource Pages and learn about cool
stuff from our sponsors!

Downloads - Free Training - Webinars - Updates

Inside Lightroom: http://digitalmedia.oreilly.com/lightroom/

------------------------------------------------------------------
Interested in sponsoring the ONJava.com newsletter? Please email us
at advertising@oreilly.com for rate and availability information.
Thank you!
------------------------------------------------------------------
To change your newsletter subscription options, please visit
http://www.oreillynet.com/cs/nl/home

For assistance, email help@oreillynet.com

O'Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
(707) 827-7000
------------------------------------------------------------------


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?