Shear Deformation in Polymer Gels and Dense Colloidal Suspensions