Some notes on towns and buildings.
Much of Europe is dotted with miniature forts, and Germany is no different. These structures are often quite old and correspond to the French chateau. Students of military history might recall that a series of chateaus served as the means to delay and break Napoleon's attacks during the Waterloo campaign. The German "Hof" has the same characteristics. German peasants, as small property owners, used what surplus wealth they could garnish to turn their residence into small fortresses. Simply put, the hof was square or rectangular in layout, with one primary entrance into a courtyard. The buildings formed much of the outer defenses with the gaps between walled.
Hofs are typically found in rural areas, as seen in the two examples at left (above, near Grimsburg; below, near Rockenhausen). However, some can be found within towns. These started as separate residences which were gradually incorporated into a growing town over a period of several hundred years. The photos below show a section of Saalburg, with a close up of the courtyard.
Over time, new development has been replacing these sites.
The growth of towns tended to negate the defensive characteristics of some structures, though the general layout remained. This growth of towns was made possibly in large measure by the development and expansion of common law. Even during the so-called dark ages, towns in Germany relied mostly on the outer wall, an indication of a general level of unity and security within the town. In contrast, towns in Arabia, both prior to and during the Islamic era, are subdivided into hundreds of small fortified zones, as the people within cannot rely upon their neighbors to prevent general theft and mayhem.
Below, a Google Earth view of two hofs in the Pfalz.