How to create a class view