A good book to read on the subject is Jane Jacob's The Death and Life of Great American Cities. It's 60 years old now, and is concentrating on cities rather than towns, but you can see the points she is making play out in scenes like the article mentions.
https://en.wikipedia.org/wiki/The_Death_and_Life_of_Great_Am...