This question may seem off topic, but I am really stuck here. I have to create a website which allows users to search for available services and book services online. Services will have categories and vendors providing those services. If I do it without objects then it seems simple and easy. But I decided ti implement with mvc.
1) As we have a few simple business logic is it good to use mvc ?
2) As http is stateless I have to create objects from database and store it back on every request. Is it really feasible and good ?
3) If I make a data mapper then how to use it with domain objects. Controller should create domain objects using data mapper and store them back.
4)It sounds too complex to me. Suppose a user has booked some services and he wants to cancel one, now according to information expert pattern user should be responsible for cancelling services. Doesn't it sound too complex that we create user object from database edit its service list, cancel a few and store it back. Rather I can fire a single query and get the work done.Should I store user object in session ?
I have read a lot of books on oops, but I get confused implementing it on web. On web every article has different approach contradicting each other.
Aucun commentaire:
Enregistrer un commentaire