• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1390
  • Last Modified:

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

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
speedygonzalez
Asked:
speedygonzalez
1 Solution
 
Dejan PažinCommented:
>> 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now