JavaEE 和 Spring 的区别

原文:https://www . geeksforgeeks . org/javaee 和-spring 的区别/

JavaEE 或 J2EE 又称 Java 企业版。1.2 版本是在 1999 年 12 月作为第一个企业规范开发的。2005 年,孙改名为 Java 平台,去掉了这个名字。它的核心组件是 EJB(企业 Java bean),后面是 JSP (Java Server Pages) 。该平台包括数据库的 JDBC (Java 数据库连接)。最初由孙开发,2010 年被甲骨文收购。这些服务在用户机器和中间层的企业数据库之间执行。

J2EE

  • The advantage of J2EE application lies in its reliability, security and scalability.
  • If you know J2SE is so easy to learn.
  • Run on multiple platforms.
  • Cross-platform portability.
  • It handles complex and highly transactional applications.
  • It has a time-tested historical record.

J2EE 的劣势

  • Complex application development environment based on.
  • The cost of developing, deploying and managing applications may be higher.
  • It lacks built-in support for Web service standards.
  • Many specifications require J2EE deep learning.
  • But complex and flexible.

Spring 另一方面是面向 JavaEE 的应用开发框架。这是一个开源的 Java 平台,为 Java 提供支持,非常流畅和容易地开发健壮的 Java 应用程序。它是罗德·约翰逊在 2003 年 6 月写的。弹簧的尺寸很轻,spring 框架的基本版本约为 2MB。Spring 框架的核心特性是开发任何 Java 应用程序,这旨在使 J2EE 开发更易于使用。它使开发人员能够使用 POJO(普通旧 Java 对象)开发企业级应用程序。

Spring 的优势

  • With POJO, you don't need an enterprise container like an application server.
  • Provide modularity for developers.
  • Consistency of management.
  • Well-designed Web framework.
  • It can effectively organize middle-tier objects.
  • Spring application code is easier to unit test.

春天的缺点

  • Complex, lack of clear focus.
  • It is quite difficult for a new developer to learn the Spring Framework.
  • Lots of XML in spring.
  • There are no clear guidelines on several topics of the spring document.
  • Longer configuration

JavaEE 和 Spring 之间的主要区别如下:

| **s . no .** | **JAVA EE** | **SPRING** | | --- | --- | --- | | 01。 | JavaEE is a standard/specification of Sun/Oracle. | Spring is not a standard, strictly speaking, it is a framework. | | 02。 | JavaEE is used for web development. | Spring is used for template design of application. | | 04。 | JavaEE has an oracle-based license. | Spring has an open source license. | | 05。 | It is based on three-dimensional building frame. | It is based on a layered architecture with many modules. | | 06。 | It has an object-oriented language, which contains a certain style and grammar. | It has no programming language. | | 07。 | JavaEE got a good speed. | Spring is slower than JavaEE. | | 08。 | JavaEE can be web-based or non-web-based. | Spring is based on almost 20 modules. | | 09。 | It usually gets a graphical user interface created from the abstract window toolkit. | This makes the same syntax independent of the IDE. | | 10。 | 爪哇人雀鹰阿皮亚人。 | Spring has given a certain number of layers to help different JTA implementation merchants. |