Solved

Differences & advantages of Spring/Struts/EJB/Hibernate?

Posted on 2011-03-08
1
1,128 Views
Last Modified: 2012-05-11
Hi, I used to program EJB's about 8 years ago but have not done so since.  I've been refamiliarizing myself with Java & it's technologies lately and have come across Struts, Spring, & hibernate as alternatives to/and even additions to EJB in some cases.

What I'd like to know (Each website I look at on each technology just states why it is better than the other etc...)

- What are the differences (in plain english) between EJB's,  Struts, Spring, and Hibernate.
- When would one use one of the technologies instead of the others.
- When is it likely that they would be used together?
- What are the advantages of each of them over each other?
- In deciding on which of them to use is it often based on current/previous technologies a company may use or is there another factor that helps to decide this?

Any (non marketing) info on the above would be very welcomed.

Thanking you in advance!
0
Comment
Question by:speedygonzalez
1 Comment
 
LVL 17

Accepted Solution

by:
Dejan Pažin earned 250 total points
ID: 35080378
>> What are the differences (in plain english) between EJB's,  Struts, Spring, and Hibernate.

1. EJBs are part of the JEE specifications, they are server side components where you keep your business logic. The implementation takes car of transactions, security, concurrency, remote procedure calls (RMI), web services, etc. Read more here: http://en.wikipedia.org/wiki/Ejb

From my experience they are very usefull and I never had any bigger problems using them for their intented use. We use them havily in our projects.

The basic difference between the EJBs from 8 years ago is that they are much easier to handle now and there are no Entity Beans left (replaced by JPA).

For more read here: http://en.wikipedia.org/wiki/Ejb

2. Struts is a web MVC  framework. It builds on top of Java Servlet API. I never used it, we replaced what we had in company with Spring and later with Seam.

3. Spring is also a web MVC framework, but with many additional modules. Spring is very wide spread and is evolving a lot.  All the modules are listed here: http://en.wikipedia.org/wiki/Spring_Framework

4. Hibernate is object relational mapping tool. You can use that in combination with any of the above technologies.

>> When would one use one of the technologies instead of the others.

You should only decide which MVC to use, but here not only Spring and Struts are available, there are many more. We use Seam.

If you plan to use a OR mapping tool, then Hibernate is by far the most popular and very evolved.

>> When is it likely that they would be used together?

It is very likely that EJBs, Hibernate and one of the frameworks are used in combination in a serious web application. If the client side is desktop, then you might not need Spring or any other web framework.

We use the combintaion: EJBs, Hibernate, JSF, Seam.

>> What are the advantages of each of them over each other?

You can only really compare Spring and Struts, where Spring has many modules that Struts dont.

>> In deciding on which of them to use is it often based on current/previous technologies a company may use or is there another factor that helps to decide this?

Yes. Good knowledge of all the involved technologies is crucial, especially when forming a new large project. In my opinion the most important factor is your crew and the experience and knowledge they have. I would never start an important project  without having a smaller project demonstrating all the involved technologies.




0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
The viewer will learn how to count occurrences of each item in an array.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

746 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

12 Experts available now in Live!

Get 1:1 Help Now