Toen's notes on stacks construct the category of schemes as the category of etale sheaves (presheaves satisfying descent in the etale topology) on CRing^op with a jointly surjective cover by smooth monomorphisms (exercise: show that smooth monomorphisms of affines are etale) of representable functors (i.e. affines).
http://www.math.univ-toulouse.fr/~toen/m2.htmlhttps://ncatlab.org/nlab/show/Master+course+on+algebraic+stacks
He constructs algebraic spaces in a similar way, then constructs algebraic stacks using the same approach after a digression into homotopical descent theory (which generalizes readily to the approach taken in Toen-Vezzosi (Homotopical Algebraic Geometry).
The case of schemes is given a more general treatment in a fixed "geometric context", which is a category with a grothendieck topology and a fixed class of morphisms compatible with it. A scheme is then simply a "geometric variety" in the "algebro-geometric context", which is CRing^op equipped with the etale topology, where the fixed class of morphisms is the class of smooth morphisms of affines (morphisms corresponding to smooth morphisms in CRing).