In this paper, we apply a relatively new technique which is called the exp-function method to construct generalized solitary and periodic solutions of Calogero-Degasperis-Fokas (CDF) equation which plays a very important role in mathematical physics, applied and engineering sciences. The suggested algorithm is quite efficient and is practically well suited for use in these problems. Numerical results clearly indicate the reliability and efficiency of the proposed method.