Database or not?

admin

Administrator
Staff member
Ok here's my objective, creative a site whether vistors can select their own colour theme/schema, the selection is retained within cookies. The theme is control by various colours schema, example:
Red Theme will have, red background, white text, orange header, etc.. Blue Theme will have blue background, white text, cyan header, etc..

Now should the different themes be hard coded into a class, and have the class return the proper set of colours OR store these in mySQL and pull it out everytime.

My only concern is, every time a user go to another page the server will have to ask the server for the set of colour for that page. So if the user visits the mainpage, goes to the news, goes to the about page - that's 3 database access. Would it be less load, and faster to hard code these colour preferences into a class?

I can give justifications for either choice! I can't decide!
 
Back
Top