Jianping Wang wrote:It really just confuses me. Controller and Model? So If Controller means actions and Model means data, why not combine them together as ActionRepository?
In the Sun course which accomplished the certification you learn to put the model server side and the controller client side. Of course no where in the assignment it says you need to use that approach.
Roel De Nijs wrote:Here you'll find more info about the approach I used.
Your solution is surprisingly simple. I have a RoomServices with 5 methods: find, findByExample, add, remove, book. You have only two, find and book!!!
In MVC, I will choose a different aproach: view doesn't know controller, while controller knows view. Example likes this. To me it is more intuitive: controller forces listener(spy ) into view, when view takes any actions, listener will feedback to controller and controller will take some actions according to it interest.
Jianping Wang wrote:Your solution is surprisingly simple. I have a RoomServices with 5 methods: find, findByExample, add, remove, book. You have only two, find and book!!!
That's your own fault: add and remove are not required, so why would you add them to your interface? And you use 2 find-methods, I just use one to take care of the must requirement to search for rooms.
subject: MVC? what's Controller really mean? Why not combine Model(Data) and Controller(method) into one...