OSGi vs Spring vs Struts vs EJB vs. Hibernate -- a totally newbie's question
Asked Answered
A

3

15

I am not familiar with these "framework" "components" at all, but can someone give me a 101 introduction about what the relationship they are to each other? Basically, I want to know roughly about:

  1. what and what are counterparts to each other

  2. what and what are complementary technology (e.g., A as a framework can be used with B as a component)

  3. what big names have I missed above list which I should not have?

Can anyone give me a high level intro? After reading the first two answers, can someone give more explanation about Spring vs. OSGi -- are they in separate market (Enterprise vs. Mobile)?

Many thanks

Attain answered 26/8, 2010 at 20:54 Comment(0)
S
16

The "vs" is incorrect, because many of these can be used together.

  • OSGi is a modularization technique (rather than a framework). It gives you the ability to separate your software in independent modules that can co-exist in different versions, with and without other modules

  • Spring - lightweight dependency injection container. It allows you to wire your components by defining their dependencies and letting the framework instantiate and configure them, thus allowing for greater flexibility (couldn't say more buzzwords here).

  • Struts - an MVC, action-based framework - used in the web tier

  • EJB - The business componnets of JavaEE - you place your business logic in Enterprise JavaBeans, and you have transaction handling, state handling, (JMS) message consumption, timers, etc out of the box

  • Hibernate - an ORM (object-relational mapping) solution - basically it allows you to work with objects (oop) when you have a relational database as a data storage.

Sire answered 26/8, 2010 at 21:28 Comment(3)
+1 but I consider the part of Spring you're referring to more as a container than a framework (selling it as framework was part of the marketing, but it's really a container).Amorphous
Spring is more than DI. Nobody thinks of the AOP as much as they should. There are three legs to the Spring stool: DI, AOP, and modules.Damaraland
but then OSGi is also a container. vs looks correct for OSGi and Spring pair, where spring looks like a clear winner.Unfounded
K
12

Well, you could probably try and read something about them?

  • Struts - is a framework for creating websites on top of the Java servlet "technology"
  • Spring - is a dependency-injection "container" for managing the configuration of Java programs (i.e. wiring your components together)
  • Hibernate - is an object-relational mapping framework for bridging relational databases (RDMS) and object-oriented programs.
  • EJB - is part of the Java Enterprise Edition specification. The point of these were to sell lots of expensive application servers from Oracle, BEA and IBM. They failed(well, a bit); hence Spring
  • OSGi - is a "container" for managing an application made of multiple components, where you wish to swap out implementations of modules (or upgrade them) without restarting the system. It started out oriented towards the mobile phone market and I've never really encountered it "in the enterprise"

These are to some extent orthogonal technologies, i.e. they are not mutually exclusive. Spring is now complementary with OSGi, for example, and servlet technology is a subset of Java EE.

Kamacite answered 26/8, 2010 at 21:25 Comment(4)
can you comment on the "Spring and OSGi are complementary" part?Attain
The point of EJB was to provide a distributed component model with (global) transactions handling, security, etc (everything else is non technical marketing and commercial related stuff). And it would also make sense to distinguish EJB 2.x from EJB 3.x as they have little in common (Spring was a reaction to EJB 2.x, EJB 3.x are POJOs that can run in Spring-like embedded containers). Actually, I personally don't have much negative things to say about EJB 3.x.Amorphous
@Attain - yes, I wasn't sure what word to use. Spring has OSGi-d itself of recent years, though I have not used that side of it myselfKamacite
Any updates on EJB3.0 in regards to "They failed(well, a bit); hence Spring"Heisser
D
0

I also suggest you to read something about GWT. The Google guys make a good effort explaining all the web related architecture.

Divorce answered 28/2, 2011 at 20:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.