Hi,
I am trying to find/develop a best way to name and organize Views class to be consistent and flexible.
I am working on a project witch involve an model called Song. It's kind of a midi song in a database with attibutes about authors, name ... to make it simple.
Now I want web pages that permit to create a new song, edit a song, delete it or simply view it.
I also want a list page that list song by authors, by instrument (a typical search and return a list). the idea is to make the list editable via ajax. people change something on a list and it saves it to the browser when done without quitting the list. Very useful to modify many list at the same time.
There is also a page to create/upload 5 song at a time.
I was searching the best structure for my Class Based View. Right now I came up with this one:
class SongForm
def get_new_song
def post_new_song
def get_modify_song
def put_song
def get_delete_song
def delete_song
class SongListForm
def get_list_song(search infos)
class SongView
get_Song
ok that's about it. It look wrong, one big class and to very small one. I would like some pointer to some best practice to create this kind of CRUD as RESTFUL.
Thank you very much