943,902 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1832
  • PHP RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Jun 8th, 2009
0

Re: Help needed 3 tier-architecture

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.
Reputation Points: 93
Solved Threads: 70
Posting Pro
Atli is offline Offline
526 posts
since May 2007
Jun 9th, 2009
0

Re: Help needed 3 tier-architecture

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?
Reputation Points: 15
Solved Threads: 6
Junior Poster
navi17 is offline Offline
118 posts
since Oct 2007
Jun 9th, 2009
0

Re: Help needed 3 tier-architecture

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).
Reputation Points: 93
Solved Threads: 70
Posting Pro
Atli is offline Offline
526 posts
since May 2007
Jun 10th, 2009
0

Re: Help needed 3 tier-architecture

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?
Reputation Points: 15
Solved Threads: 6
Junior Poster
navi17 is offline Offline
118 posts
since Oct 2007
Jun 10th, 2009
0

Re: Help needed 3 tier-architecture

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.
Reputation Points: 93
Solved Threads: 70
Posting Pro
Atli is offline Offline
526 posts
since May 2007
Jun 28th, 2011
-1
Re: Help needed 3 tier-architecture
I want to know that how 3-tier architecture works?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
afsha khan is offline Offline
1 posts
since Jun 2011

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: IP-to-Country converter (php script)
Next Thread in PHP Forum Timeline: Dynamic Includes





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC