Introduction
In the previous chapter, we learned about code reusability and how to clean up our code base by extracting common functionality and logic from modules that can be included as needed throughout our project, preventing unnecessary code duplication.
This is an important concept to grasp as it forms the base for Ruby's excellent package management system known as RubyGems, which we will dive into further in this chapter.
Most applications consist of inputs and outputs. Facebook will have data in the form of photos and status updates (as input), and users, in turn, will see other users' photos and status updates (as output). Additionally, a banking application will load data from a database (as input) and present it to the user in the form of charts and tables (as output). The input data sources will vary per application, but the concept of inputs and outputs is essentially the same.
Data is fed into the application, some sort of processing is performed,...