Dilsberg:  Castle and Fortified Town
Dilsberg is both a town and castle and is an excellent example of the medieval fortified town.  Towns were built as the rallying points for middle class craftsman and merchants, and the castle provided local protection.  The inner portion of the town is fortified with the castle purposely designed as part of such fortifications.  There is not much left of the castle but it is still well worth seeing.

Dillsberg can be reached by going east of Heidelberg and then following a winding road into the hills above the Neckar River.  These pictures were taken in 2008.
Within the courtyard there is a cistern that goes down up to 45 meters (about 150 feet).  The tower is actually a spiral stairway that was part of a larger structure no longer extant.
Left, one of the gates leading into the fortified portion of the town.

The Dilsberg castle was built by the Counts of Lauffen around 1150 and was in the possession of the Rhein Palgraves since 1310.  The castle was built to protect the community that had been settled on the hill years prior and hold back the Palgrave who resided in Heidelberg.  However, possession of the castle gradually shifted to Heidelberg until finalized in 1310. 

The Elector of the Palatinate confirmed town rights to Dilsberg in 1347, and the castle was expanded to enhance its protection and use in extending influence through the region.  However, economic prosperity eluded the town, being too isolated from key trading areas, and thus the town's primary existence was to pay for the castle.  The castle was besieged by Imperial Catholic forces under Count Tilly in 1620, being handed over to Bavaria.  The castle somehow managed to avoid destruction in the 1680s, the same conflict that saw the destruction of the castle in Heidelberg.  The castle also managed to hold off French Revolutionary forces in 1799, but when the area was reorganized the structure was no longer useful for military or administrative purposes.  Its last garrison was disbanded in 1812.  Grand Duke Ludwig I found the largely undamged castle to be now useless and ordered it dismantled.  Much of the castle was then broken up and used for local construction.
Portions of the walls show the design work that allowed for upper stone floors.
Left, two views from above looking down on a walkway joining a battlement with the inner ward, and a view of the outer ward beyond.
Above and right, the streets within the fortified town.  The streets are narrow and the houses are still in large measure as they were several hundred years prior.