Here are two important generalizations of the notion of topological space:

1) C*-algebras.<br>
Given a space <i>X</i>, one considers the set of continuous functions from <i>X</i> to &#8450;.
One then looks at all the properties of this set (it's an algebra, it's a Banach space, ...).
One relaxes a bit the conditions (allow the multiplication to be non-commutative): there you get the notion of a C*-algebra.

2) Stacks.<br>
Given a space <i>X</i>, one considers the collection of all maps <i>Y</i>&rarr; <i>X</i>, where <i>Y</i> is an arbitrary space.
We then look at at their properties (they form a category over <i>Top</i><sup>1</sup>, there exists a notion of precomposition with a map <i>Y'</i>&rarr;<i>Y</i>, they behave well w.r.t open covers, ...). Relax some conditions, and you'll get the notion of a stack.

> By focusing on <b>out</b> of a space <i>X</i>, you get the notion of C*-algebra.<br>
> By focusing on maps <b>into</b> a space <i>X</i>, you get the notion of stack.

<br>
<hr>
<sup>1</sup>Here, *Top* refers to the category of topological spaces.
Stacks are encountered more often in algebraic geometry. In that case, one uses the category of schemes in place of *Top*.