The ability of bacteria to interact with and respond to their environment is crucial to their lifestyle and survival. Bacterial cells routinely need to engage with extracellular target molecules, in locations spatially separated from their cell surface. Engagement with distant targets allows bacteria to adhere to abiotic surfaces and host cells, sense harmful or friendly molecules in their vicinity, as well as establish symbiotic interactions with neighboring cells in multicellular communities such as biofilms. Binding to extracellular molecules also facilitates transmission of information back to the originating cell, allowing the cell to respond appropriately to external stimuli, which is critical throughout the bacterial life cycle. This requirement of bacteria to bind to spatially separated targets is fulfilled by a myriad of specialized cell surface molecules, which often have an extended, filamentous arrangement. In this review, we compare and contrast such molecules from diverse bacteria, which fulfil a range of binding functions critical for the cell. Our comparison shows that even though these extended molecules have vastly different sequence, biochemical and functional characteristics, they share common architectural principles that underpin bacterial adhesion in a variety of contexts. In this light, we can consider different bacterial adhesins under one umbrella, specifically from the point of view of a modular molecular machine, with each part fulfilling a distinct architectural role. Such a treatise provides an opportunity to discover fundamental molecular principles governing surface sensing, bacterial adhesion, and biofilm formation.