Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

use JB3 or Spring for a 3 tier application ?

Posted on 2007-04-05
5
Medium Priority
?
672 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:Mayank S
Mayank S earned 300 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 600 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:Mayank S
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 600 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
A solution for Fortify Path Manipulation.
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.
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

564 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