PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Feb 24, 2020 10:56 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Nov 21, 2011 3:15 am 
Offline
DevNet Master
User avatar

Joined: Sun Feb 15, 2009 12:08 pm
Posts: 2794
Location: .za
I'm working on a gallery type site and the client wants the initial gallery scroller to display in the following order:

1. Fashion
2. Beauty portraits
3. Music
4. Fine Art
5. Places and faces
6. Food
7. Love

I'm not really troubled by how to create this but what bothers me is future-proofing it. Imagine this scenario: a new directory ('Simplicity' is added to the mix and the client wants it between Music and Fine Art. I could simply add the new gallery into the array but what if i wanted this to be an automated process; how would i do it?

Any ideas about this would be welcomed; not looking for code but more for insights into how this problem can be approached / handled.

_________________
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering


Top
 Profile  
 
PostPosted: Mon Nov 21, 2011 10:09 am 
Offline
DevNet Resident
User avatar

Joined: Wed Apr 01, 2009 1:31 pm
Posts: 1532


Top
 Profile  
 
PostPosted: Mon Nov 21, 2011 10:34 am 
Offline
DevNet Master
User avatar

Joined: Sun Feb 15, 2009 12:08 pm
Posts: 2794
Location: .za
The file option is one i might consider; the project is almost finished so i don't want to (or couldn't at this time) create a back-end as well, albeit a simplified one.

Currently i have this idea: I have a base class that will accept the array containing the directory names as an argument (for the constructor). Then there are two additional classes; call them A_Page_Model and A_Gallery_Model that will create galleries, they will then use the array to create the galleries. This method works good for me and other developers but not so well for a client with 0 experience in scripting. This whole method would mean manual entry of the new values so good-bye automation if i go with this route.

Another thing i have to consider is ease of use; if i have to handle this myself that's no problem but i might not always be available to do an update when the client requires it. So it boils down to 3 potential users that will do 'changes' to this: me, 3rd party programmers & the client themselves. I can add comments for other programmers but the client is the big issue. I consider all clients tech-noobs till proven otherwise and i can't have them messing around in the script :|

_________________
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering


Top
 Profile  
 
PostPosted: Mon Nov 21, 2011 10:41 am 
Offline
DevNet Resident
User avatar

Joined: Wed Apr 01, 2009 1:31 pm
Posts: 1532
If you store the list in a text file, you can use the modification time to determine when to regenerate the cache file.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group