In this paper, we will introduce and study the homological dimensions defined in the context of commutative rings with prime nilradical. So all rings considered in this paper are commutative with identity and with prime nilradical. We will introduce a new class of modules which are called [Formula: see text]-u-projective which generalizes the projectivity in the classical case and which is different from those introduced by the authors of [Y. Pu, M. Wang and W. Zhao, On nonnil-commutative diagrams and nonnil-projective modules, Commun. Algebra, doi:10.1080/00927872.2021.2021223; W. Zhao, On [Formula: see text]-exact sequence and [Formula: see text]-projective module, J. Korean Math. 58(6) (2021) 1513–1528]. Using the notion of [Formula: see text]-flatness introduced and studied by the authors of [G. H. Tang, F. G. Wang and W. Zhao, On [Formula: see text]-Von Neumann regular rings, J. Korean Math. Soc. 50(1) (2013) 219–229] and the nonnil-injectivity studied by the authors of [W. Qi and X. L. Zhang, Some Remarks on [Formula: see text]-Dedekind rings and [Formula: see text]-Prüfer rings, preprint (2022), arXiv:2103.08278v2 [math.AC]; X. Y. Yang, Generalized Noetherian Property of Rings and Modules (Northwest Normal University Library, Lanzhou, 2006); X. L. Zhang, Strongly [Formula: see text]-flat modules, strongly nonnil-injective modules and their homological dimensions, preprint (2022), https://arxiv.org/abs/2211.14681; X. L. Zhang and W. Zhao, On Nonnil-injective modules, J. Sichuan Normal Univ. 42(6) (2009) 808–815; W. Zhao, Homological theory over NP-rings and its applications (Sichuan Normal University, Chengdu, 2013)], we will introduce the [Formula: see text]-injective dimension, [Formula: see text]-projective dimension and [Formula: see text]-flat dimension for modules, and also the [Formula: see text]-(weak) global dimension of rings. Then, using these dimensions, we characterize several [Formula: see text]-rings ([Formula: see text]-Prüfer, [Formula: see text]-chained, [Formula: see text]-von Neumann, etc). Finally, we study the [Formula: see text]-(weak) global dimension of the trivial ring extensions defined by some conditions.