We present a set of new analytic solutions aimed at self-consistently describing the spatially-averaged time evolution of the gas, stellar, metal, and dust content in an individual starforming galaxy hosted within a dark halo of given mass and formation redshift. Then, as an application, we show that our solutions, when coupled to specific prescriptions for parameter setting (inspired by in-situ galaxy-black hole coevolution scenarios) and merger rates (based on numerical simulations), can be exploited to reproduce the main statistical relationships followed by early-type galaxies and by their high-redshift starforming progenitors. Our analytic solutions allow to easily disentangle the diverse role of the main physical processes regulating galaxy formation, to quickly explore the related parameter space, and to make transparent predictions on spatially-averaged quantities. As such, our analytic solutions may provide a basis for improving the (subgrid) physical recipes presently implemented in theoretical approaches and numerical simulations, and can offer a benchmark for interpreting and forecasting current and future broadband observations of high-redshift starforming galaxies.