View Full Version : Multiple Tier System
sladmin
13-05-2007, 06:31 PM
Hi guys,
This is something I've been niggling at for ages now and I have decided to give it a go.
What I want to be able to do is create a multiple tier system for any website. For instance say I have a directory site that needs more than one tier I want to be able to do this without having a 'set' amount of tiers.
Can anyone please give me some help on this? Do I need to create multiple tables via asp code or can it be done more easily?
Anyone have some code in ASP VB I could take a look at?
Many thanks in advance,
siphilp
14-05-2007, 08:25 AM
N-tier your meaning Presentation - Business - Data?
ASP isn't the most object orientated scripting language in the world. If your going for this type of architecture which i encourage you to do,then I would recommend you go down the asp.net(C#) route ;)
sladmin
14-05-2007, 02:49 PM
Well what I mean by a multiple tier system is that so I can add a sub category under any category any number of times. For example I might have: Directory > Norfolk > Plumbers
but then I might also need: Directory > Norfolk > Stalham > DJ's > Mobile DJ's.
This means that I will need to be able to create a sub category whenever I need to. Usually the way I do this would be to have a table for each 'level' in the site. The only way I can think to do this is to create a table with ASP which then links to other tables.
Any Ideas? I don't really want to be learning a new programming language.
Thanks,
siphilp
14-05-2007, 04:50 PM
ah we're on different levels :|
Will have a think
delie
23-05-2007, 10:12 AM
Well what I mean by a multiple tier system is that so I can add a sub category under any category any number of times. For example I might have: Directory > Norfolk > Plumbers
but then I might also need: Directory > Norfolk > Stalham > DJ's > Mobile DJ's.
This means that I will need to be able to create a sub category whenever I need to. Usually the way I do this would be to have a table for each 'level' in the site. The only way I can think to do this is to create a table with ASP which then links to other tables.
Any Ideas? I don't really want to be learning a new programming language.
Thanks,
Instead of creating a table for each level, why not just create a generic table and a lookup table:
e.g.
Directory > Norfolk > Plumbers
Directory > Norfolk > Stalham > DJ's > Mobile DJ's.
Generic category table:
[Id ] [Category]
1 - Directory
2 - Norfolk
3 - Plumbers
4 - Stalham
5 - DJ's
6 - Mobile DJ's
Lookup table:
[Id] [parentCategoryId] [CategoryId]
1 - 0 - 1 (directory)
2 - 1 - 2 (directory / norfolk)
3 - 2 - 3 (norfolk / plubmers)
4 - 2 - 4 (norfolk / stalham)
5 - 4 - 5 (stalham / djs)
6 - 5 - 6 (dj's / mobile dj's)
This way you can also state that a category belongs to multiple parent categories, should you ever need to.
I've always designed my categories like this too but I've never really had to go beyond 3 levels.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.