JavaOne Conference Trip Report

Application Architecture Insights From Sun's Java Technology Gurus

Stu Stein is head of Java Consulting for Sun, and this talk was about new ways to design and build software using Java.

He broke up a good Java app into three parts, or tiers: Presentation (front end), Processing (middle tier), and Data (back end). These correspond roughly to client, services and resources. An important decision to make is where to cut the classes with the network. Use coarse grained APIs to decrease friction in the interfaces of objects. Clients should be stateless. Services should have small coherent APIs to the world; they provide outlets to clients.

The four stages for design in Java might be:

  1. Logical design
    Design the presentation and business objects and backend resource abstractions
  2. Intermediary design
    Define mediators for interactions
  3. Physical design
    Partition objects across network and select resource implementations
  4. Service design
Abstract the target of storage to increase reuse. C++ is the new assembler...

Optimize where necessary; if you separate things right, you can scale by adding hardware. Enterprise JavaBeans provide middleware abstraction, declarative persistence, transaction demarcation and authentication.