Welcome Guest, Not a member yet? Register   Sign In
Models... just for databases?
#1

[eluser]kyleect[/eluser]
I'm porting over a twitter class I wrote in to CI but not sure if it should be a model or a library. The class makes API calls to twitter and returns information. Much like a database. Would making it a model make sense? Where is the line between a model and a library? I've read the model section in the user guide btw. Just in case someone asks.
#2

[eluser]Colin Williams[/eluser]
Model makes most sense.

There really isn't much of a line between a model and a library. There doesn't have to be. If you have a library that manages data, then it's really just a model in library's clothing. I wouldn't be too concerned about it.
#3

[eluser]xwero[/eluser]
What makes you port the class to CI? Can't you add the class and load is as a library or helper?
#4

[eluser]Thorpe Obazee[/eluser]
kyleect, This is an interesting discussion.

http://forum.kohanaphp.com/comments.php?DiscussionID=23

But of course, you are free to do what want. It's not set in stone. Your choice.




Theme © iAndrew 2016 - Forum software by © MyBB