开发者

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

开发者 https://www.devze.com 2023-01-13 01:41 出处:网络
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

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. wha开发者_开发问答t 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


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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消