Tomatoes need constant sun. Flowers and plants do better in urban balconies.
I have had small back yards, roof gardens and balconies in large cities since 1976.
Back yards are the best, I believe.
Rooftop gardens have to be watered constantly, same with patio gardens.