O'Reilly logo

Database Programming with JDBC & Java, Second Edition by George Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required