views:

38

answers:

2

Hello all

I understand that everything dealing with database should be put inside a model class. But what about the data I get from a HTTP GET resource, like say a xml file, csv file or something like that. Should I make a helper for it? a library? or is it good in a model?

Regards

A: 

Yeah, if you are going to store the data from the GET resource in the database then using a model to process the data is definitely the way to go.

DRL
+1  A: 

Models should be used for anything involving data retrieval or storage, that includes calling webservices, queries, loading and parsing xml.

Then again this is just a suggestion, you could leave it all in your controller or use a library and it would make no difference other than that you're not conforming to MVC principles.

stef