Welcome Guest, Not a member yet? Register   Sign In
How To Go About This
#8

[eluser]jalalski[/eluser]
[quote author="Matt Egan" date="1229830896"]Should I even use the same size thumbnails? I think that photo galleries with unevenly sized thumbnails are pretty ugly. (I'm also looking at this from a design standpoint)[/quote]

This sounds like an excellent opportunity to create a function 'create_thumbnail()' and encapsulate the logic in there. Then if you need to change things later on, that is the only place to change.
Or, if there is more involved, create a library module that handles the images for you.

[quote author="Matt Egan" date="1229830896"]How much should the model do? I'm really kind of confused about this. Should my model actually make markup? For example, when I pull all of the photo data out of the database, then go ahead and produce some HTML then just output the created variable as a string into the View?[/quote]

The Model should handle the data needs of the application. I wouldn't put the thumbnail creation, nor the markup creation there. That sort of stuff is application logic and belongs in the Controller (or the library if you follow the previous suggestion). The Model will handle the loading and saving of your images and provide you with a standard API to the data models, which shouldn't really change much as the application develops.

HTH


Messages In This Thread
How To Go About This - by El Forum - 12-20-2008, 03:41 PM
How To Go About This - by El Forum - 12-20-2008, 05:39 PM
How To Go About This - by El Forum - 12-20-2008, 06:17 PM
How To Go About This - by El Forum - 12-20-2008, 11:33 PM
How To Go About This - by El Forum - 12-20-2008, 11:44 PM
How To Go About This - by El Forum - 12-21-2008, 05:54 AM
How To Go About This - by El Forum - 12-21-2008, 05:59 AM
How To Go About This - by El Forum - 12-21-2008, 06:19 AM
How To Go About This - by El Forum - 12-21-2008, 07:59 PM
How To Go About This - by El Forum - 12-21-2008, 10:47 PM
How To Go About This - by El Forum - 12-22-2008, 03:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB