This book studies a general class of convex stochastic optimization (CSO) problems that unifies many common problem formulations from operations research, financial mathematics and stochastic optimal control. We extend the theory of dynamic programming and convex duality to allow for a unified and simplified treatment of various special problem classes found in the literature. The extensions allow also for significant generalizations to existing problem formulations. Both dynamic programming and duality have played crucial roles in the development of various optimality conditions and numerical techniques for the solution of convex stochastic optimization problems.