As the haggada is the poetic, so the halakha is the legal element of the Talmud (q.v.), and arose out of the faction between the Sadducees, who disputed the traditions, and the Pharisees, who strove to prove their derivation from scripture.
It is not logically distinguishable from the halakha, for the latter or forensic element makes up with the haggada the Midrash, but, being more popular than the halakha, is often itself styled the Midrash.
Among the chief attempts to codify the halakha were the Great Rules (Halakhoth Gedoloth) of Simon Kayyara (9th century), based on the letters written by the Gaonim, the heads of the Babylonian schools, to Jewish inquirers in many lands, the work of Jacob Alfassi (1013-1103), the Strong Hand of Maimonides (1180), and the Table Prepared (Shulhan Aruch) of Joseph Qaro (1565), which from its practical scope and its clarity as a work of general reference became the universal handbook of Jewish life in many of its phases.