Platinum Sponsors

SUN

ELCA

Gold Sponsors

AdNovum

Credit-Suisse

Silver Sponsors

SAP

SyBOR AG

Partners

Netcetera AG

JUGS - Java User Group Switzerland

Stadt Zürich Wirtschaftsförderung

cR Kommunikation

Eveni AG

LiSoG - Linux Solutions Group e.V.

Star Alliance

ICTnet

simsa

Creatronic Media Supply

Media Partners

Netzwoche

inside-it.ch

javamagazine

InfoWeek

IT Reseller

JavaSPECTRUM

APRESS

Stefan Tramm

Stefan Tramm

(403) Revisiting the Anything Pattern

Peer-Refereed Talk

Wednesday, 2007-06-27, 12:10 - 12:50, Arena 6

  • Stefan Tramm - Netcetera (speaker)
  • Jason Brazile
  • David Oetiker
  • Stefan Rufer
  • Stefan Ferstl
  • Daniel Eichhorn

Topics

Download the presentation

Abstract

The Anything design pattern was first introduced at EuroPLOP 98 as one
component of a set of Do-It-Yourself reflection classes [1]. It was
initially presented as a structured data container primarily useful
as a generic configuration parameter. The Anything pattern features a
serialized string representation of an easily parsable but human readable
composition of lists and associative arrays, similar to alternatives
provided by S-expressions [2], JSON [3] and more recently XOM [4]. The
original implementation of the Anything was in C++ and based upon the
ET++ Framework [5]. However it was soon ported to Java by IFA and Andre
Weinand and further enhanced in 1999 by itopia and Marcel Rueedi.

This paper describes recent extensions to the Java Anything [6], which
provide support for features interesting in database applications. In
particular, datatypes for Dates and BigDecimals have been introduced
to use the Anything as an universal DTO (Data Transfer Object) [7] as
well as the implementation of an AnyDAO (Data Access Object) [8], which
among other features, includes support for efficient batched inserts.
This allows an intuitive programming interface and intermediate data 
format useful for providing continuous offline unit-testing and simplified
development and debugging cycles.

Additionally, further uses of the Anything pattern are explored including
the use of the Anything to support a "data-as-code" paradigm, where a
set of "primitives" is implemented that can be "scripted" at 
run-time
via an Anything, providing an extreme case of dynamic configuration.
Finally, the features of the Anything are compared and contrasted with
various existing alternatives, and a list of possible future enhancements
is presented.

References

[1] P. Sommerlad and M. Rueedi, Do-it-yourself reflection, in EuroPLOP 98:
    Third European Conference on Pattern Languages of Programming and
    Computing, 1998. [Online].
    Available: 
http://hillside.net/europlop/HillsideEurope/Papers/DIY_Reflection.pdf
[2] R. L. Rivest, S-expressions, Internet Engineering Task Force, Internet
    Draft, 1997. [Online]. Available: 
http://theory.lcs.mit.edu/~rivest/sexp.txt
[3] D. Crockford, The application/json media type for javascript object
    notation (JSON), Internet Engineering Task Force, RFC 4627, Jul 2006.
    [Online].  Available: http://ds.internic.net/rfc/rfc1738.txt
[4] M. Reinhold, XOM: Integrating XML into the Java programming language, in
    JavaONE 2006: Proceedings of the JavaOne Conference. Sun, 2006.
[5] A. Weinand, E. Gamma, and R. Marty, ET++ an object oriented application
    framework in C++, in OOPSLA '88: Conference proceedings on Object
    Oriented programming systems, languages and applications. New York,
    NY, USA: ACM Press, 1988, pp. 4657.
[6] S. Tramm, java-anything, Visited Nov 2006. [Online].
    Available: http://code.google.com/p/java-anything/
[7] Data transfer object, http://en.wikipedia.org/wiki/Data_Transfer_Object.
[8] Data access object, http://en.wikipedia.org/wiki/Data_Access_Object.