STANFORD, Calif.

ALL right, class, here’s your homework assignment: Devise an app. Get people to use it. Repeat.

That was the task for some Stanford students in the fall of 2007, in what became known here as the “Facebook Class.”

No one expected what happened next.

The students ended up getting millions of users for free apps that they designed to run on Facebook. And, as advertising rolled in, some of those students started making far more money than their professors.

Almost overnight, the Facebook Class fired up the careers and fortunes of more than two dozen students and teachers here. It also helped to pioneer a new model of entrepreneurship that has upturned the tech establishment: the lean start-up.