May 26, 2019
Hot Topics:

More articles by Jeff Langr

Working With Design Patterns: Odds and Ends

The design patterns book lists 23 design patterns, but that's just the beginning! Many more patterns exist, including the specification pattern, lazy initialization, object pools, and the utility class pattern.

Working With Design Patterns: Abstract Factory

One of the bigger challenges with using design patterns is knowing when to use one pattern over another. The abstract factory creational pattern looks similar to the builder pattern but is used to help solve a different problem.

Working With Design Patterns: Factory Method

Your production code isn't the only place you will find a use for design patterns. The factory method pattern helps you answer a question about how to organize your test classes.

Building a Simple BlackBerry Application Interface

Building applications for the BlackBerry involves a few interesting wrinkles. Explore some of these challenges in building a front end for a new BlackBerry unit testing framework.

A Unit Testing Framework for the BlackBerry

What do you do when there's no effective unit testing framework for your programming environment? Why, build your own, of course! Building a simple unit testing framework for the BlackBerry provides some interesting insights into the BlackBerry programming environment.

Working With Design Patterns: Iterator

Patterns exist for virtually all common programming challenges, even one as simple as "how to traverse a collection of objects." The iterator pattern provides a consistent solution for something that programmers do daily.

Working With Design Patterns: State

The state pattern can help simplify complex conditional logic by representing individual states as classes, each with its own simple behavior.

Working With Design Patterns: Mediator

Objects talking to each other and no one in control? Messages going all over the place? The mediator pattern can help you control the chaos!

Working With Design Patterns: Interpreter

Many of the design patterns lead a double life—the structure of some patterns are exactly alike, but the intent differs. An interpreter is a composite whose purpose is to support interpretation of a simple grammar.

Working With Design Patterns: Chain of Responsibility

The chain of responsibility pattern allows you to emulate a real-life chain of command. In a chain of responsibility, a request moves from handler to handler until someone is able to manage and return it to the client.

Working With Design Patterns: Builder

A common theme in design patterns is organizing things so as to separate high-level policy from low-level underlying details. The builder pattern does just that, by allowing a single construction policy to be realized by many different implementations.

Working With Design Patterns: Prototype

Like the abstract factory pattern, the prototype pattern helps you adhere to a clean design by moving object creation into a polymorphic hierarchy. When using the prototype pattern, you create objects by making copies of already existing instances.

Working With Design Patterns: Singleton

The singleton pattern is one of the simplest in the catalog of design patterns. Lurking beneath its simplicity is the potential for testing trouble!

Working With Design Patterns: Bridge

Separating interface from implementation is a fundamental object-oriented strategy, one that's also the essence of the bridge design pattern. You can use the bridge pattern to help solve the more complex problem of separating tangled hierarchies.

Working With Design Patterns: Facade

Object-oriented languages provide great opportunities to isolate complexity in a system. A facade buries an unwieldy interface behind a simplified one.

Working With Design Patterns: Adapter

Not all design patterns are complex. The adapter pattern provides a simple mechanism for conforming an interface into one that's more useful for a client application.

Working With Design Patterns: Visitor

Visitor is often viewed as a complex pattern that's often regarded as difficult and troublesome. But, the appropriate use of visitor demonstrates what's at the heart of good object-oriented design.

Working With Design Patterns: Memento

The Memento design pattern presents a consistent solution for storing state, allowing you to build undo and redo support in your applications with ease.

Getting Test Doubles in Place

Test doubles (aka fakes or mocks) are a great tool that allow for deeper ability to test-drive solutions. The most common way to use test doubles is to pass them via constructors or setters. But there are at least a couple other solutions.

Principles for Agile Metrics

Deriving metrics in an agile software development process can be an integral part of managing and improving execution. As with any tool, metrics used poorly can actually damage a project. A set of guiding principles for agile metrics can keep your team on track.

Simple Thread Control With Java's CountDownLatch

Take advantage of Java's CountDownLatch to simplify your multithreaded applications.

Doing TDD Well

The fundamentals of test-driven development can be learned in minutes. As with any discipline, TDD can take a career to master. Using these tips can help developers on this path to mastery.

Tools, Iterations, and Stories

For all the things that tracking tools and iterations are good for in an agile team, teams should focus on delivering completed business value via stories.

Testability and Design

How important is testing in software development? Explore the relationship between testability and design.

Considering Test-After Development

Should you write tests first, or write the code first, and then write tests after? Explore the time it takes to develop the same solution using both techniques.

Working with Design Patterns: Null Object

Some of the best patterns weren't documented in the original Design Patterns book. The Null Object is an important pattern that can help keep some sanity in your code base.

Working with Design Patterns: Observer

The observer pattern provides a great way of avoiding troublesome two-way dependencies in your applications.

Design Pattern: Proxy

The proxy pattern provides a protection layer for your objects by exposing a stand-in to interested clients. I'll explore one possible use for the proxy pattern in this article.

Working with Design Pattern: Decorator

The decorator pattern gives you the flexibility to wrap special behavior around objects. Unlike inheritance, which gives you the ability to predefine specialized behavior, using the decorator pattern allows you to dynamically attach specialized behavior.

Working with Design Patterns: Composite

The composite design pattern allows simplification of code through the use of a recursive class relationship. Learn how the design pattern can be incrementally derived by slowly building upon pieces of the solution.

Working with Design Patterns: Strategy

The Strategy design pattern allows your classes to switch between various algorithms. Discover how to take advantage of this pattern in order to create a simpler, more maintainable, and more easily unit tested system.

Copying Arrays in Java 6

The new arraycopy method supports more than just copying the entire contents of a source array into a target. It allows for a source and target start index, as well as a length that represents the number of elements to copy.

Working with Design Patterns: Flyweight

Take advantage of a design pattern that Java itself heavily depends upon.

JavaOne Spotlight: OpenJDK

Even if you did not attend JavaOne this week you have probably already heard the term OpenJDK. Here is the who, what, and where behind the announcement.

Working with Design Patterns: Template Method

Template Method is a design pattern that presents one solution for eliminating common duplication between two or more related classes. Work through an example and try it out yourself.

Working with Design Patterns: Command

It's always possible to slowly refactor toward a better design. The improved version of the code demonstrates the Command Pattern, one of the more useful recognized software design patterns. In this example, your need to test proved to be in alignment with good design concepts!

Test-Driving a Java Command Line Application

Can you write unit tests against a command-line app? Should you? Here is a chance to test-drive one possible solution.

Can Refactoring Produce Better Code?

See how refactoring can become an essential part of crafting software that can be maintained over the long run at reasonable cost.

Comments on Comments on Comments

Another view on a long debated issue: comments within code.

Why Pair?: Challenges and Rewards of Pair Programming

Take a close look at the advantages and disadvantages of Pair Programming and see if it is the right approach for your team.

Java 5's DelayQueue

See how the power of the Java 5 queue implementations, including DelayQueue, as they define constructs for common queueing needs in a thread-safe manner.

Pair Programming Dos and Don'ts

Explore the key rules of Pair Programming - a way for development teams to improve the quality of the software they produce.

A Brief Introduction to Agile

Discover the conceptual framework where customers, iterative and incremental delivery are key.

Writing a Simple Automated Test in FitNesse

Here is your chance to test a web application, a web services API, a desktop UI, or something else.

Moving Forward with Automated Acceptance Testing

Download a tool to help you set up automated acceptance testing for your team. You will also install it, start it up, and begin to learn about its editing capabilities.

Java 5's BlockingQueue

BlockingQueue is one very useful building block that can help you quickly and confidently build your own multithreaded applications.

The Need for Automated Acceptance Testing

How would you like to automate some of your testing. See how that is possible.

Using Foreach Loops in J2SE 1.5

Gain simplicity in your J2SE 1.5 source code by utilizing Foreach Loops.

The Formatter Class in J2SE 1.5

Java 1.5 introduces a new class named java.util.Formatter that allows you to do string formatting similar to the printf function in C.

Looking at Varargs in J2SE 1.5

Get a head start on J2SE 1.5 (codename Tiger) while it is still in beta. Learn about the new varargs language feature.

Extending the Java 2 Collections Framework

Tech Workshop

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date