The Adapter Pattern: Java Design Patterns and Architecture, Part 19

The Adapter pattern is simply a class that adapts the functionality of one class to some required interface or set of methods. You can use it whenever you need a class that implements some particular ....

Facades: Java Design Patterns and Architecture, Part 18

The Facade pattern in Java is a very simple idea; basically, it means using a class to simplify the usage of other methods and objects. A while ago I had to work with someone who kept telling me that ....

The Factory Pattern: Java Design Patterns and Architecture, Part 17

A tutorial on the factory pattern in Java. The factory pattern involves creating one or more factory methods that instantiates and return objects, configuring them if necessary and making decisions ab....

DAO and Multiple Databases: Java Design Patterns and Architecture, Part 16

A tutorial on use a memory-based data structure to deal with data in your application, only using the DAO objects to write data to the database when the user selects save. We'll also review how the MV....

DAO and Multiple Databases: Java Design Patterns and Architecture, Part 15

A tutorial on extending the basic DAO pattern so that it can work with multiple databases. Also in this tutorial, extracting an interface automatically from an existing class.....

Getting Started With JUnit: Java Design Patterns and Architecture, Part 14

A tutorial on the basics of using JUnit to test your Java code. Testing is vital when you're writing database code, so this seems as good a place as any to put a tutorial on JUnit, even though really ....

DAO Factories - A First Look: Java Design Patterns and Architecture, Part 13

This is a tutorial on DAO factories in the Java DAO design pattern. We'll also take a look at some more MVC details. If you want some working JDBC code (for connecting to SQL databases with Java), dow....

DAO Classes: Java Design Patterns and Architecture, Part 12

In this tutorial we'll start looking at the DAO pattern, which consists of several optional parts. The most important bit is the DAO object (together with the transfer object that we saw in the last t....

Beans: Java Design Patterns and Architecture, Part 11

This is a really simple tutorial just on the idea of a bean in Java. The bean pattern (although calling it a pattern is saying a lot) is very useful as a transfer object in the Observer pattern or DAO....

The Singleton Pattern: Java Design Patterns and Architecture, Part 10

The singleton pattern allows you to have a single global instance of a class, available from any part of your program. This can make your code hard to follow if you're not careful, so you should use s....

An MVC Controversy: Java Design Patterns and Architecture, Part 9

Should your view talk directly to your model, or not? Some say yes, others say no. In fact, if you're writing a banking system, your model should not be exposed to the outside world; your controller n....

Implementing the Observer Pattern: Java Design Patterns and Architecture, Part 8

Now that we've got a taste of what the observer pattern is and how it works, we'll go the whole hog and implement it from scratch, creating a class that can fire events which listening objects can the....

The Observer Pattern - An Example: Java Design Patterns and Architecture, Part 7

We'll take a look at an example of using the observer pattern before moving on to implementing it from scratch in the next tutorial. It's easiest to remember all the different bits the observer patter....

The Observer Pattern - Theory: Java Design Patterns and Architecture, Part 6

A tutorial on the observer pattern, a vital pattern for constructing user interfaces and often useful even in non-user-interface coding. Observer is one of those patterns that seem like an impossible ....

Model View Controller - An Example: Java Design Patterns and Architecture, Part 5

This is a tutorial on using MVC in Java; I'll use Swing as an example, but don't worry if you don't know Swing because MVC is going to be somewhat the same, under the hood at least, regardless of what....

Model View Controller - the Theory: Java Design Patterns and Architecture, Part 4

The theory of Model-View-Controller, also known as MVC; this tutorial outlines what MVC is and how it works, before we go on to an example skeleton implementation in the next tutorial. MVC can be used....

Front End / Back End: Java Design Patterns and Architecture, Part 3

Front end vs. back end; one of the most fundamental concepts in software design. If you develop stuff at home or you're a one-man company, you need to understand both bits and how to separate them and....

A Note on Methodologies: Java Design Patterns and Architecture, Part 2

A bit of a note on software design methodology and changing trends in software design, from someone who's only SLIGHTLY bitter about being made to take part in scrums for the second time (the first ti....

Introduction: Java Design Patterns and Architecture, Part 1

In this short introduction to the course, I'll give you a little bit of an overview of what's in the course and how we'll be tackling the whole subject.....