The latter is called Piyyutim, and is a type of prayer traditionally only sung by men.
A great deal of poetry was written, by poets such as Dunash ben Labrat, Solomon ibn Gabirol, Judah ha-Levi, David Hakohen and the two Ibn Ezras, in a "purified" Hebrew based on the work of these grammarians, and in Arabic quantitative metres (see piyyut).