JavaIdioms

Last edit September 10, 2014
(http://c2.com/ppr/wiki/JavaIdioms/html.zip -- fast download of all these pages.)


Java 5 Idioms

The word 'Idiom', in this context, should be taken to mean something like 'Common Practice'. This page isn't an appropriate place to put patterns, it's a place to put example of common solutions to java coding problems. If the Idiom linked to off this page has no code, then its a pattern. If its about using a related group of classes to solve a design problem, then it is a pattern too.

Architectural idioms: Memory management and reference/value semantics: Object creation and initialization idioms Enumeration and collection idioms: How to use interfaces: Exception idioms: Concurrency idioms Type-safety idioms Performance Documentation and commenting
  • FixmeComment -- on the usage of comments for marking code that needs attention

InnerClasses Networking, Remote Objects & Remote Method Invokation General workarounds, idioms, references and miscellanea: AntiPatterns & AntiIdioms:

Related Work:

Caveat: read the reviews on Amazon to check that the above two books are aimed at your level of experience. Also, you can find several of the patterns in these books, and the upcoming volume 3, on this page and elsewhere on the WikiWikiWeb. Volume 3 is out and claims to cover J2EE design patterns.

  • Concurrency : State Models & Java Programs, ISBN 0471987107
This book has a chapter on architectural styles for concurrent programs.

  • Concurrent Programming in Java: Design Principles and Patterns, ISBN 0201695812
The second edition of this book, which radically altered the chapter structure, is ISBN 0201310090.

  • Refactoring : Improving the Design of Existing Code, ISBN 0201485672
Strictly more about good coding than idioms but very relevant.

Related links: (see also other JavaLinks)
Please add any that you think of, and feel free to refactor the groupings. IdiomOrPattern?
CategoryIndex CategoryJava CategoryIdiom