CodeIgniter Forums
web fetch funtion in MVC? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: web fetch funtion in MVC? (/thread-20945.html)



web fetch funtion in MVC? - El Forum - 07-26-2009

[eluser]cleansugar[/eluser]
If I want to get data from web.

Where should I program fetch function in?

Model or Controller?


web fetch funtion in MVC? - El Forum - 07-26-2009

[eluser]Wuushu[/eluser]
Or a library Smile


web fetch funtion in MVC? - El Forum - 07-26-2009

[eluser]Colin Williams[/eluser]
Use a model to encapsulate the management of the data from the web service. Use a library within the model to connect to the web service. It's just like how models use the database library.