Generating view factories