views:

141

answers:

2

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

+2  A: 

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 JEE.

oxbow_lakes
can you comment on the "Spring and OSGi are complementary" part?
sean
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.
Pascal Thivent
@sean - 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 myself
oxbow_lakes
+1  A: 

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.

Bozho
+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).
Pascal Thivent
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.
duffymo