Solved

use JB3 or Spring for a 3 tier application ?

Posted on 2007-04-05
5
658 Views
Last Modified: 2013-11-24
I’m new to EJB3 and Spring technologies.  I have been reading about their difference and it seems that EJB3 solve the problems from its predecessors.  Spring solve many of problems from EJB1 and EJB2 as well.  

I’m going to develop a 3-tier application, I will have server and different clients (phones, pda, standalones, browsers, etc) are going to connect to it to retrieve data and process business logic.  Which technology should I use and what are the pros and cons of using one over the other?
0
Comment
Question by:kevorkgt
5 Comments
 
LVL 30

Assisted Solution

by:mayankeagle
mayankeagle earned 100 total points
ID: 18861248
I would vote for EJB 3 because it is a Java EE standard with a specification. Spring is not yet a standard - it is just a framework available for use. EJBs are heavier but you can do a lot more with them (e.g., MDBs)
0
 
LVL 8

Accepted Solution

by:
mhunts earned 200 total points
ID: 18868623
If it's a choice of EJB OR Spring, I'd say EJB3. However, a hybrid approach is better. Use EJB3 stateless session beans for middle tier. Use MDB if you need messaging. Entity beans with hibernate persistence are a good choice available with EJB3. For the presentation tier, a framework like JavaServer Faces is a good choice. It's based on JSPs, but it offers the model-view-controller framework which helps a lot with the plumbing.
0
 
LVL 30

Expert Comment

by:mayankeagle
ID: 18874444
>> for the presentation tier, a framework like JavaServer Faces is a good choice.

Agree.
0
 
LVL 10

Assisted Solution

by:mbvvsatish
mbvvsatish earned 200 total points
ID: 18881232
It is dependent on the kind of environment that the application is going to run and its future plans like distributed deployment, clustering envronment, number of concurrent users, performance level so on and so forth...

I recomend you to go through the books "Expert one on one - J2ee development - by Rod Jhonson" and "Expert one-on-one j2ee development without EJB - by Rod Johnson".
Very nice explanation has been given by the author on where to use EJB, where you should not use EJB, When do you go for spring and so on.

The books will really be very useful when you design the architectures for the projects and give you very good idea on the 2 technologies
0
 

Author Comment

by:kevorkgt
ID: 18883964
Thank you all for your replies.

mbvvsatish, the two books you recommended were published before EJB3 specifications were released. In addition, a lot of disadvantages of using EJB that the "Expert one-on-one j2ee development without EJB" mentions are addressed, according to what I've read so far, by the new EJB specifications.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem to setup 18 79
countPairs challenge 7 58
HashMap Vs TreeMap 12 49
ArrayIndexOutOfBoundException 9 33
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now