Welcome Guest, Not a member yet? Register   Sign In
Advice on web application design
#1

[eluser]panos konstantinides[/eluser]
Hello I have a design issue and I would like some advice from the more experienced developers in here. I have a use case where I need to update a user in the database. Before the update takes place I need to call an external web service. So the total flow of the system is

1) Check if the user can be updated by doing a SELECT in the database
2) If it can then call an external web service.
3) Parse the XML response (using DOM)
4) Update the database with the response.
5) Return a success or failure message.

What is the best way of implementing it? My colleague argues that I should implement all this functionality within a model and the controller should just call this model and then load the view. He argues that the controller should be confined to a maximum of ten lines per every function. I am reluctant to put everything in the model since this makes the model convoluted and it looses its original meaning, that of data manipulation only.

I come from a Java background and in the MVC frameworks I would use a custom class that does all this (and then the controller would just call this class), since the models are only a representation of data and do not contain lots of logic.

So now I am in a dilemma. Do I put all the logic in the model? If not, do I put it in a helper class? In the controller? Somewhere else? Any help is appreciated.

Regards

Panos


Messages In This Thread
Advice on web application design - by El Forum - 10-19-2009, 12:50 PM
Advice on web application design - by El Forum - 10-19-2009, 02:24 PM
Advice on web application design - by El Forum - 10-19-2009, 02:48 PM
Advice on web application design - by El Forum - 10-19-2009, 04:23 PM
Advice on web application design - by El Forum - 10-19-2009, 04:31 PM
Advice on web application design - by El Forum - 10-20-2009, 02:09 AM
Advice on web application design - by El Forum - 10-20-2009, 08:06 AM
Advice on web application design - by El Forum - 10-20-2009, 03:26 PM
Advice on web application design - by El Forum - 10-20-2009, 10:15 PM
Advice on web application design - by El Forum - 10-21-2009, 08:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB