What is the difference between J2EE and Spring

来自于:https://www.quora.com/What-is-the-difference-between-J2EE-and-Spring

Lot of people specially those who are new in Java world are confused with these terms J2EE, JavaEE, J2SE, JDK, Spring, EJB‘s etc.

Lets Keep it Simple Stupid.

  • What is Java Standard Edition.

(This will clear the confusion related to JDK, J2SE, JavaSE)

    1. In general, you can say this is the core of Java.(The prime part)
    2. You need it, for developing desktop applications as well as web based applications.
    3. It provides everything from basic objects to high level classes which are used for networking, database access, security, XML parsing, GUI development.
    4. Along with this core APIs, it also provides virtual machine (JVM), development tools, deployment technologies etc. (Check here for more details - JDK Development Tools)
    5. Below diagram will show you the version history of Java Standard Edition. - image taken from http://codingfox.com

    1. You can see that Java Standard Edition was called by different names in different years. Hence these different names came into existent, which is now creating the confusion to beginners ;)
    2. But JDK, J2SE, JavaSE are same core part of Java, with more enhanced features and more classes and functionalities.
  • What is Java Enterprise Edition.

(This will clear confusion about J2EE, JavaEE)

    1. Java Enterprise Edition is an abstract specification.
    2. The concrete implementation are so called as the application servers like - GlassFish, WildFly, WebLogic.
    3. When you download JavaEE from Oracle‘s site, it will give you GlassFish server with bunch of documentations and examples. So they are just providing the implementation of Java Enterprise Edition specification.
    4. You can also prefer to use the other implementations like RedHat WildFly which also follows these specifications.
    5. Below is the version history- taken from Imgur

    1. So, J2EE, JavaEE are just the different versions.
  • Does EJB follows JavaEE specifications?
    1. Yes, EJB is a part of JavaEE specifications. Full fledge JavaEE application server support EJB‘s out of the box.
    2. This means you can NOT run EJB applications on simple servlet container like Tomcat.
  • Does Spring follows "ALL" JavaEE specifications?
    1. Strictly speaking NO
    2. Spring is a standalone framework, which has substituted and improves many parts of JavaEE.
    3. You can consider the Spring as an integration platform that lets you use all JavaEE technologies.
    4. That means you don‘t necessarily need the full fledge JavaEE application server to support.
    5. You can run it over simple servlet container like Tomcat.

Summary

So J2EE is a version name of the abstract specification for Java Enterprise Edition from 1999 to 2003.

And Spring is a a standalone integration platform (framework) with improvements and substitutions in JavaEE which also allows you to use JavaEE technologies along with it.

时间: 2024-10-13 11:34:37

What is the difference between J2EE and Spring的相关文章

J2EE框架 Spring

Spring Framework 是一个开源的Java/Java EE全功能栈(full-stack)的应用程序框架,以Apache许可证形式发布,也有QKXue.NET平台上的移植版本.该框架基于 Expert One-on-One Java EE Design and Development(ISBN 0-7645-4385-7)一书中的代码,最初由 Rod Johnson 和 Juergen Hoeller等开发.Spring Framework 提供了一个简易的开发方式,这种开发方式,将

spring mvc 配置(xml配置详解)

如果您曾经使用Spring MVC框架开发过Web应用程序,本文提供关于Spring MVC框架的配置技巧,以帮助管理基于Spring的web应用程序的多个实例. Spring Framework(J2EE框架),Spring(Spring框架)下载 2013-08-26Spring Framework(J2EE框架) 3.2.4 2013-08-26Spring(Spring框架) 4.0.0.M2 web.xml 配置: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 <s

Spring安全框架 Spring Security

Spring Security 的前身是 Acegi Security ,是 Spring 项目组中用来提供安全认证服务的框架. Spring Security  为基于J2EE企业应用软件提供了全面安全服务.特别是使用领先的J2EE解决方案-Spring框架开发的企业软件项目.人们使用Spring Security有很多种原因,不过通常吸引他们的是在J2EE  Servlet规范或EJB规范中找不到典型企业应用场景的解决方案. 特别要指出的是他们不能再WAR 或 EAR 级别进行移植.这样,如

Spring框架简单介绍

原文地址:  http://my.oschina.net/myriads/blog/37922 1.使用框架的意义与Spring的主要内容 随着软件结构的日益庞大,软件模块化趋势出现,软件开发也须要多人合作,随即分工出现.怎样划分模块,怎样定义接口方便分工成为软件project设计中越来越关注的问题.良好的模块化具有下面优势:可扩展.易验证.易维护.易分工.易理解.代码复用. 优良的模块设计往往遵守"低耦合高内聚"的原则.而"框架"是对开发中良好设计的总结,把设计中

超轻量级spring模板方案

最近从事的工作是web方面的,主要j2ee,spring jsp这些内容,由于刚入门,很多的技术都不了解.所谓初生牛犊不怕虎,刚入门,各种不顺手,比如写jsp,总是重复很多的代码,各种不爽,然后就去看jsp的模板技术, 看来看去也是各种不爽,于是就有了自己写一个工具的想法. ok,废话一堆.先说说jsp模板,最简单的include,成熟的解决有tiles,还有什么setmesh,当日还有更强大的什么fremaker,volocity(是这样写的吗,记不清楚)等等. include不说,实在太简陋

Design patterns in Spring Framework

This article is the 4th about design patterns used in Spring framework. It'll present new 3 patterns implemented in this framework. At the begin, we'll discover 2 patterns belonging to the family of structural patterns: adapter and decorator. At the

spring security 一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安全框架

Spring Security是一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安全框架.它提供了一组可以在Spring应用上下文中 配置的Bean,充分利用了Spring IoC,DI(控制反转Inversion of Control ,DI:Dependency Injection 依赖注入)和AOP(面向切面编程)功能,为应用系统提供声明式的安全访问控制功能,减少了为企业系统安全控制编写大量重复代码的工作. Spring Security 的前身是 Acegi S

Spring Data JPA Vs Hibernate JPA Vs JPA

前言 从文章的标题,就可以清晰地了解到,本文是来辨析三个容易将新手弄糊涂的技术名词.如果,你一眼看过去就知道这三个名词的区别及关系,那么,这篇文章你可以不用继续读下去了:除非,你是想要看看我有什么解释的不对,来纠错的(来找茬,哈哈),也欢迎留言. 名词解释 JPA(Java Persistence API,Java持久化API),它是一个关于如何处理对象关系映射(object-relational mappings)的规范:即,定义了映射Java中的Object到关系数据库Table的标准流程.

Spring(一)开篇

目录 1.Spring 介绍 2.Spring 框架的演变 3.Spring 整体架构 Core Container Data Access/Integration Web AOP Test 最后 1.Spring 介绍 在早期 J2EE 时代,开发一个应用程序非常繁琐,先不说对象的创建及管理,如其它数据库访问.提供 Web 服务等都需耗费我们大量时间.当时一位名为 Rod Johnson 的澳大利亚人率先对这种 J2EE 系统框架臃肿.低效的种种现状提出了质疑,之后 Rod Johnson 编