Cascading Flow

05 Dec 2017

Flow. A good development flow is the most beneficial guideline you can create when coding a program. Large or small scale projects, collaborative or not, a good sense of flow when in development facilitates an understanding of current issues and means of resolving them without much headache or gripe. One of the largest contributors to a strong development flow is the proper use of design patterns, or ways of making the solution to one particular problem repeatable for other like problems. This can take the form of hard code in your program, or just the program’s organizational structure, but no matter where it is applied design patterns facilitate accelerated and intentioned design.

From the coding side, design patterns define a lot of how future code will be shaped. Design patterns such as factories set up means of producing varied solutions from a single “factory”. Using one class to create multiple distinct but similar items is a common practice with design patterns. Design patterns can also be used simply when enumerating all possible uses individually is impossible. Patterns such as observers and iterators can be used to handle as many items as necessary regardless of the state of the items they are attached to without requiring a wholly new piece of code for each possible item. To attest to the prevalence of design patterns you can look at the Java Swing library, which contains observer and factory elements among many others, and then take a step back to see that the Swing library itself is a member of the design pattern of the Java platform as a whole.

And from a structural side, design patterns give rules for file placement and organization that greatly improves the task of working on the project. While maybe not as impressive as building a factory to produce specialized objects, doing something as simple as placing all files that define the user interface in a directory called “ui” helps development quite a bit. It gives a clear location for all user interface related files, and assuming all other files are placed in their relevant directories, makes finding, editing, and creating new files intuitive within the program structure. In effect, it accelerates the flow of development by helping prevent programmers from stumbling around the potentially ginormous amounts of existing code trying to locate where to edit or add to. It might not be the flashiest skill, but organization is incredibly valuable.

The end goal of design patterns is to facilitate a healthy development process. A program where less time is spent on semantics and specifics, and more spent time on R & D will be more successful than a program being built without design patterns. And even when you are not intentionally using design patterns, often intuitively they make their way into your project. In fact it is far harder to purposely code something without using design patterns as you will come to find that just about everything you intuitively do typically matches a pattern. These patterns permit you as the programmer to seamlessly transition between code pieces and understand the function of code, and ultimately to get your program off the ground and keep it there with further maintenance faster than starting with a blank slate and no direction. A good development process will flow from component to component with little resistance; a flow aided by the adaptable structural concepts of a design processes.