We propose a new statistical mechanics model for the melting transition of DNA. Base pairing and stacking are treated as separate degrees of freedom, and the interplay between pairing and stacking is described by a set of local rules which mimic the geometrical constraints in the real molecule. This microscopic mechanism intrinsically accounts for the cooperativity related to the free energy penalty of bubble nucleation. The model describes both the unpairing and unstacking parts of the spectroscopically determined experimental melting curves. Furthermore, the model explains the observed temperature dependence of the effective thermodynamic parameters used in models of the nearest neighbor (NN) type. We compute the partition function for the model through the transfer matrix formalism, which we also generalize to include non local chain entropy terms. This part introduces a new parametrization of the Yeramian-like transfer matrix approach to the Poland-Scheraga description of DNA melting. The model is exactly solvable in the homogeneous thermodynamic limit, and we calculate all observables without use of the grand partition function. As is well known, models of this class have a first order or continuous phase transition at the temperature of complete strand separation depending on the value of the exponent of the bubble entropy.