Help needed 3 tier-architecture

Reply

Join Date: May 2007
Posts: 432
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training

Re: Help needed 3 tier-architecture

 
0
  #11
Jun 8th, 2009
I think you are misunderstanding what tier-3 architecture is.
It's a design patter used to organize large scale projects, and when used in software development, it is usually implemented using OOP.

But you can't take a single example class, like that, and "apply" tier-3 architecture to it.
Classes are used to implement tier-3 architecture. Tier-3 architecture is not used to improve single class designs.

The example I originally posted included 3 classes, each of them requiring at least one more base class, and an index script.
That is as simple an example of tier-3 architecture as I can give.
(I could probably boil it down to less code, and throw out the base classes, but it would be pretty much the same code)

If you want to know how to implement tier-3 architecture, I suggest you go closely over that example (the manual is your friend here), because anything less than that won't be enough to properly demonstrate it.

It's not really that complex once you get a hang of how OOP works in PHP.
So I suggest you start there.

I'll be happy to help if you have any questions about that.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 78
Reputation: navi17 is an unknown quantity at this point 
Solved Threads: 5
navi17 navi17 is offline Offline
Junior Poster in Training

Re: Help needed 3 tier-architecture

 
0
  #12
Jun 9th, 2009
Basically i m using smarty in my projects which keeps presentation logic different from application logic. that is a 2 tier architecture.
Now in 3 tier architecture i need three layers. business, presentation and model layer.

1)Presentation layer(suppose web form displyed at the front end)
2)application layer(logic at back end)
3)model layer(sql queries).

now tell me one thing we need different files to handle each layer.?
for every layer different file.?
am i right?
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 432
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training

Re: Help needed 3 tier-architecture

 
0
  #13
Jun 9th, 2009
Not really. There is no specific way to implement n-tier architecture.

But typically (when implemented in OOP), each layer is put into it's own class. Whether or not those classes are defined in separate files is irrelevant (although people tend to put one class per file... easier to maintain that way).
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 78
Reputation: navi17 is an unknown quantity at this point 
Solved Threads: 5
navi17 navi17 is offline Offline
Junior Poster in Training

Re: Help needed 3 tier-architecture

 
0
  #14
Jun 10th, 2009
thanks for the reply atli.
pls tell me which is better 3 tier archtecture and mvc? and how?
which structure you are using in your projects?
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 432
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training

Re: Help needed 3 tier-architecture

 
0
  #15
Jun 10th, 2009
That's a huge question.
I bet there could be entire books written about the answer to that

Ultimately, I doubt there really is a definite answer to that.
The example I posted in the beginning is roughly what I like to do with my applications. It looks like a MCV design, but, as I've found out, it is more like a Tier-3 design.

You should really just pick on and try it out... see how you like it. Then try the other one and compare.

I'd recommend trying MVC first. It's less constricted.
You could always download one of the popular MVC frameworks and study how they work.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC