aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes 2-tier, 3-tier? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "2-tier, 3-tier?" Watch "2-tier, 3-tier?" New topic
Author

2-tier, 3-tier?

Liang Anmian
Ranch Hand

Joined: Jun 25, 2004
Posts: 119
Hi guys,

After reading so many posts from this forum, I realized that many people mentioned about 2-tier and 3-tier design. I will like to know the difference. I'm not even sure how many tiers my design has.

Thanks.


Current Status:<br /> <br />SCJP 1.4<br />SCJD (in progress)
joe lin
Greenhorn

Joined: Dec 07, 2004
Posts: 28
hi Liang ,
I think you should read some materials about MVC.
the MVC pattern will tell you how to built a three-tiers application.
regards!


Looking for better solution...<br />SCJP1.4
Wei-ju Wu
Ranch Hand

Joined: Feb 16, 2005
Posts: 147
Simply said,

2-tier:
- Data Access layer
- Fat Client (GUI + Business Logic)

3 (or n)-tier:
- Data Access layer
- Business layer
- Thin client

I would say that MVC is a concept independent of the number of tiers.


"The UrlyBird catches the certificate. And he's gonna FlyByNight"<br /> <br />SCJP 1.2/5.0, SCJD, SCBCD, SCWCD, SCEA
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
I am also not sure if the number of tiers is connected with thin or fat client. I had 3-tiers (at least I'd like to think I did), but I had my business tier client-side.

So I feel that I had a combination of 3-tier and fat client design.

Frans.


SCJP 1.4, SCJD
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11277
    
  59

Hi Liang,

Got a day or two to spare

Take a look at "Should lock methods be callable by the client", which delves into what a thin client (also misnamed as 3-tier) and thick client (misnamed as 2-tier) is, and arguments for why some people believe one option might be required along with counter arguments.

If you get tired and can't read to the end: the end result is that either choice seems to be acceptable at present.

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Steve Taiwan
Ranch Hand

Joined: Jul 01, 2003
Posts: 166
Before I started to program the project, I read
lots of articles of javaranch but was hard to decide
which way to go. After reading the following article,
I decided to go with 3 tier. This article is a classic argument
between 2 and 3 teir.
http://www.coderanch.com/t/184224/java-developer-SCJD/certification/Should-lock-methods-callable-client

If you don't have time to read through the whole article,
the conclusion is 2 or 3 tier is OK to sun. If you don't want to handle
connection loose and don't want to send lock cookie to your client,
you can go with 3 tier, like what I did.


Steve Taiwan<br />SCJP 1.2, SCJD 1.4, SCWCD 1.3, SCBCD 1.3, OCP 8i DBA, SCEA
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
Regardless of your choice on where to divide the tiers, all solutions to this project are TWO TIER. This is because all you have is a Client and a Server. The choice of implementing only the business actions of Find and Book is still two tier and is still a rich client, maybe slightly poorer than the other choice, but not really thin.

To be a truly thin the client must know NOTHING about the business or data aspects of the system and be only concerned with "presentation", the View in MVC, a browser would be a good choice.

I started out with the "thinner" client, only exposing the Find and Book methods to the client. I switched sides, because I couldn't really justify that choice if required to. The instructions clearly direct you to use a "traditional client-server system" and the server is described as "a data management system". These two requirements are in the section entitled "Overall Architecture". I have never seen a data management system that knew anything about anyone's business logic.

If you wish to make things easier for yourself by ignoring the architectural requirements, you should plan to document your choice very convincingly. There have been a few people who have passed using the "thin" solution, I haven't seen thier choices document, but I suspect it was well written.

If I were marking this assignment, I'd fail any submission that did not provide a "data management system" and a "traditional client-server" since its explicitly required.
Matt Sheehan.
Ranch Hand

Joined: Oct 08, 2004
Posts: 63
Originally posted by peter wooster:
There have been a few people who have passed using the "thin" solution, I haven't seen thier choices document, but I suspect it was well written.


I really doubt this is part of the grading criteria. I used the "thin" solution and easily passed with this brief explanation in my choices doc:
The locking was hidden from the clients because it makes the application simpler and thus easier to understand for a junior programmer.


Matt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 2-tier, 3-tier?
 
Similar Threads
What is 3 tiers/2 tiers?
What do you want in a design patterns reference?
Study Notes on Common Architecture
Should lock methods be callable by the client
Regarding SCEA Part 1 Exam