http://www.castlewales.com/caerphil.html
Caerphilly Castle is one of the great medieval castles of Western Europe. Several factors give it this pre-eminence - its immense size (1.2h), making it the largest in Britain after Windsor, its large-scale use of water for defense and the fact that it is the first truly concentric castle in Britain. Of the time of its building in the late 13th century, it was a revolutionary masterpiece of military planning.
One of Henry III's most powerful and ambitious barons, Gilbert de Clare, lord of Glamorgan, built this castle. His purpose was to secure the area and prevent lowland south Wales from falling into the hands of the Welsh leader Llywelyn the Last, who controlled most of mid and north Wales. De Clare built other castles on the northern fringes of his territory for the same purpose, such as Castell Coch. He had seized the upland district of Senghenydd, in which Caerphilly lies, from the Welsh in 1266 to act as a buffer against Llywelyn's southward ambitions. Llywelyn realised the threat and tried but failed to prevent the castle from being built; it was begun on 11 April 1268, was attacked by Llywelyn in 1270, and was begun again in 1271. This time it was completed without hindrance. Its message was not lost on Llywelyn, who retreated northwards. Apart from the remodelling of the great hall and other domestic works in 1322-6 for Hugh le Despenser, no more alterations were carried out, making it a very pure example of late 13th-century military architecture.
Following information from:
http://www.middle-ages.org.uk/siege-weapons.htm
Siege Weapons and Warfare
The Medieval era of the English Middle Ages saw the advent of the Crusades to the Holy Land and the construction of hundreds of castles at home. A totally new form of warfare and weapons were introduced to England with the castles and following the experiences fighting the Saracens and their fortresses during the Crusades - Siege Warfare. Siege warfare tactics and weapons varied according to the role of Defender or Attacker.
Medieval Siege Weapons DesignSiege weapons were made to order! They were far too cumbersome to move from one place to another. In a siege situation the commander would assess the situation and the siege weapons design requirements to break a siege. Engineers would instruct soldiers as to the design and construction of siege weapons and siege engines.
Construction of Siege Weapons
Medieval Siege warfare and building siege weapons was an extremely expensive business! All sieges had to be carefully planned and the exact type and number of siege weapons had to be established. Medieval Lords, knights and their Siege Engineers identified the weakest parts of the Castle or town that they needed to attack and planned the design of the siege engines accordingly. A workforce including carpenters and blacksmiths had to be transported to the site. The surrounding area was checked out for materials and supplies. Armed men and soldiers were expected to help prepare for the siege by helping to build the siege weapons and engines. Many elements needed to be taken into consideration when designing siege weapons.