Solved

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

Posted on 2011-03-08
1
1,240 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Six Sigma Control Plans

724 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