In this thesis, we study stable commutator length (scl) in graphs of groups by analyzing surfaces in the corresponding graphs of spaces. We give a linear programming algorithm computing scl in a large class of graphs of groups including those with cyclic vertex and edge groups. The algorithm implies that the unit norm ball of scl is a rational polyhedron. We also establish a linear programming duality method to show sharp lower bounds of scl in graphs of groups, subject to a local n-relatively torsion-free condition on the inclusion of edge groups into vertex groups. As an application we prove a uniform sharp lower bound of scl in graph products.