[eluser]bapobap[/eluser]
Hi there,
I'm currently re-building an application bit by bit and am trying to do everything the right way. I have a quick question if anyone can help. I think an example will help.
A user uploads a photo
I take the photo, convert it and resize it, move it to where it needs to be stored
I add a row to the database
I'm fine with controllers and views but I'm still slightly confused as to what should be the correct way to handle this with Models/Libraries. At the moment I have a Photo library, which has all the necessary methods needed to handle converting the image, resizing it, putting it in the right place etc. The photo model then has a few methods to add/delete database records which the photo library then calls.
Should I maybe have all of this functionality in the model, or maybe all just in the library or am I doing things wrong? It just gets a bit confusing having a set of photo views, a photo controller, a photo library then a photo model, all to handle what is essentially, add/edit/delete.
Any advice is appreciated!