This imposing fortress was built to defend the main gates of Krakow. This photo was taken from the main gate which is called he Florian Gate.
It is an amazing structure and is designed entirely and exclusively for fighting. Any assault on either the Florian Gate or the Barbican would be under fire from the other. Furthermore, even if an attacker breached the gates of the Barbican they would find that they were still under attack from the Barbican walls, which were, designed so the defenders could fire down on and yet be shielded from an enemy inside the Barbican as well as outside. Originally a moat and drawbridge separated the two. But in later years a tunnel was built so the two fortresses could re-enforce each other and these tunnels could be flooded from the moat.