Information Architecture Strategy

r3a1's picture

He has: 28 posts

Joined: Aug 2005

I'm working on a site that involves 2000+ pages. They are organized in a wide variety of categories and sub categories. To make the matter a bit more complicated these pages will exist on 4 different servers so the load can be distributed as needed on each server. I am tasked with writing a scripts for the breadcrumbs and menu that will display appropriate information based on the user's location in the site. This site has many includes that handles layout with CSS and has other basic includes you might expect.

My goal is to keep all the paths to these includes and style sheets relative so that porting the entire site over each of the servers will not be a big deal and all the paths will not need to change with each copy of my scripts on the different servers.

My current solution is to keep all folders one level below the root level that way I always know where the includes and style sheets reside. The problem with that solution is that there is no way for sub directories to exist using my same script since the level of depth has changed. I was hoping for some opinions on this approach.

example of the directory structure:
- parentA [top level folder]
- partentA_childA [a sub folder that still exists at the top level]
- partentA_childB [a sub folder that still exists at the top level]
- partentA_childC [a sub folder that still exists at the top level]
- parentB [top level folder]
- partentB_childA [a sub folder that still exists at the top level]
- partentB_childB [a sub folder that still exists at the top level]

The only other approach I could come up with was that if I put a small file in every directory listing the paths to all the servers. Then that file could be used to determine where the style sheet are located and depth would be no problem as I could determine where those includes and style sheet reside.

Honestly I don't like either solution and I'm guessing that others have had to deal with this before. My problem might need some more explanation... which I'm happy to give and I really appreciate any help I can get.

Ryan

Busy's picture

He has: 6,151 posts

Joined: May 2001

I did a big site with many levels and the old ./ or ../ wasn't working so I just used a folder at root level for all includes and templates and used a set variable in each include
include $url_or_root directory/filename
editing a structure is easy as you'd just change one varaible and everything still works

No doubt with that many pages you'd be using a database so youd be using one file to keep the databsae query in, this breadcrumb etc can live in there

r3a1's picture

He has: 28 posts

Joined: Aug 2005

Well I thought about using a variable as you noted below, but I didn't think that would work because of the four different servers the page could reside on.

Quote: $url_or_root directory/filename

where I was thinking the possibilities would be something like
http://64.25.XX.XX/filename
http://64.26.XX.XX/filename
http://64.27.XX.XX/filename
http://64.28.XX.XX/filename

So my variation of your solution was to keep a file with the server names listed in each directory so I could compare the current location to the url's of the servers thus determining where I was in the directory tree so that I have the reference that you noted. Am I way off base on this and will your solution work? or does the complication of the four server indeed make my problem a bit outside the scope of your solution?

Busy's picture

He has: 6,151 posts

Joined: May 2001

But wont the structure remain the same or similar on all servers?
Even if they aren't using the variable method is just one adjustment to suit anywhere

r3a1's picture

He has: 28 posts

Joined: Aug 2005

Ok, after reading more carefully I think I see where we are missing each other. I have no way of making a DB query to get such information. Believe me I think that the fact that there is no type of CMS, or even some use of a DB used is a terrible idea. The fact is that it simply wasn't up to me. I can see how if I could hit a DB then I could use that information in it to get such variables, but I dont have access to one.

The only technologies I have access to is any client side scripting as usual which really doesn't apply here and ASP (no database associated with it).

Believe me when you are thinking how/why would anyone have a site that large that isn't DB driven I was thinking the exact same thing. I still don't have an answer other than money, which is laughable considering how much time (which is money) they would save managing this beast later.

Busy's picture

He has: 6,151 posts

Joined: May 2001

dang!
Maybe you should try talk them in to a rebuild - database driven

10 k to maintain for next 2 years or
5k to build db and 2k to maintain for 2 yrs

money talks Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.