Welcome Guest, Not a member yet? Register   Sign In
Utility classes / code location.
#1

[eluser]Unknown[/eluser]
Hi there,

I jut started reading up on php frameworks last night. I'm a hobby programmer, so forgive me if some of my questions may seem like something that should be obvious. Smile

From why I have read about the mvc model, I get that the model aquires the data, the view presents it, and the controller binds it all together. Now let's say I was going to write a utility class of sorts... Say a file conversion utility of sorts, would I just write a standard utility class, and call it from my model as I was manipulating data? Or write it right in a model itself? Or is there a better "best practice" location?

Thanks!
#2

[eluser]InsiteFX[/eluser]
You could either write it as a library or helper.

Then just load it and call the methods.




Theme © iAndrew 2016 - Forum software by © MyBB