Design Patterns

Design patterns have been popularized by the book Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, and Grady Booch (Addison-Wesley). They are recurring forms in software development that you can capture at a low level and reuse across dissimilar applications. Within any application scope are problems you have encountered; patterns are the result of your recognizing those common problems and creating a common solution.

The first step to identifying the design patterns is identifying problems in generic terms. You already know that you need to relate GUI widgets on the client to business objects in the application server; you should create GUI widgets that observe changes in centralized business objects. You also know that you need to make those business objects persistent by saving them to a database. You should therefore look at a few common patterns that will help accomplish these goals.

Client Patterns

The user interface provides a view of the business specific to the role of the user in question. In the Network Application Architecture, it provides this view by displaying the business components housed on a shared server. Good client design patterns will help keep the user interface decoupled from the server.

The model-view-controller pattern

Java Swing is based entirely on a very important user-interface pattern, the model-view-controller pattern (MVC). In fact, this key design pattern is part of what makes Java so perfect for distributed ...

Get Database Programming with JDBC & Java, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.