The EEM approach to chemical hardness in molecules and solids: Fundamentals and applications