Spring、Struts、Hibernate、JavaServer Faces、Tapestry的区别是什么?

时间:2021-03-30 20:08:32

May I know what is the difference between:-

我能知道两者的区别是什么吗

  1. Spring
  2. 春天
  3. Struts
  4. Struts
  5. Struts 2
  6. Struts 2
  7. Hibernate
  8. Hibernate
  9. JavaServer Faces
  10. JavaServer Faces
  11. JavaServer Pages
  12. JavaServer Pages
  13. Tapestry
  14. 挂毯

Are these technologies/framework complementary to each other? Or they are alternatives to each other (after I use one of them, then I don't need to use the other)?

这些技术/框架相互补充吗?或者它们是相互替代的(在我使用其中一个之后,我就不需要使用另一个)?

Thanks.

谢谢。

9 个解决方案

#1


246  

  1. Spring is an IoC container (at least the core of Spring) and is used to wire things using dependency injection. Spring provides additional services like transaction management and seamless integration of various other technologies.
  2. Spring是一个IoC容器(至少是Spring的核心),用于使用依赖注入连接事物。Spring提供了其他服务,如事务管理和各种其他技术的无缝集成。
  3. Struts is an action-based presentation framework (but don't use it for a new development).
  4. Struts是一个基于活动的表示框架(但是不要将它用于新的开发)。
  5. Struts 2 is an action-based presentation framework, the version 2 of the above (created from a merge of WebWork with Struts).
  6. Struts 2是一个基于活动的表示框架,即上面的版本2(由WebWork与Struts的合并创建)。
  7. Hibernate is an object-relational mapping tool, a persistence framework.
  8. Hibernate是一个对象关系映射工具,一个持久性框架。
  9. JavaServer Faces is component-based presentation framework.
  10. JavaServer Faces是基于组件的表示框架。
  11. JavaServer Pages is a view technology used by all mentioned presentation framework for the view.
  12. JavaServer Pages是一个视图技术,被所有提到的视图表示框架所使用。
  13. Tapestry is another component-based presentation framework.
  14. Tapestry是另一个基于组件的表示框架。

So, to summarize:

所以,总结一下:

  • Struts 2, JSF, Tapestry (and Wicket, Spring MVC, Stripes) are presentation frameworks. If you use one of them, you don't use another.
  • Struts 2、JSF、Tapestry(和Wicket、Spring MVC、Stripes)都是表示框架。如果你用其中一个,你就不用另一个。
  • Hibernate is a persistence framework and is used to persist Java objects in a relational database.
  • Hibernate是一个持久性框架,用于在关系数据库中持久化Java对象。
  • Spring can be used to wire all this together and to provide declarative transaction management.
  • Spring可用于将所有这些连接在一起并提供声明性事务管理。

I don't want to make things more confusing but note that Java EE 6 provides modern, standardized and very nice equivalent of the above frameworks: JSF 2.0 and Facelets for the presentation, JPA 2.0 for the persistence, Dependency Injection, etc. For a new development, this is IMO a serious option, Java EE 6 is a great stack.

我不想让事情更加混乱但注意Java EE 6提供了现代化、标准化和很好的相当于上述框架:JSF 2.0和Facelets的演讲中,JPA 2.0持久性,依赖注入,等新的发展,这是国际海事组织一个严肃的选择,Java EE 6是一个伟大的堆栈。

See also

#2


17  

Generally...

一般……

Hibernate is used for handling database operations. There is a rich set of database utility functionality, which reduces your number of lines of code. Especially you have to read @Annotation of hibernate. It is an ORM framework and persistence layer.

Hibernate用于处理数据库操作。有一组丰富的数据库实用功能,减少了代码行数。特别是必须读取hibernate的@Annotation。它是一个ORM框架和持久层。

Spring provides a rich set of the Injection based working mechanism. Currently, Spring is well-known. You have to also read about Spring AOP. There is a bridge between Struts and Hibernate. Mainly Spring provides this kind of utility.

Spring提供了一组丰富的基于注入的工作机制。目前,春天是众所周知的。您还必须阅读有关Spring AOP的文章。在Struts和Hibernate之间有一个桥梁。主要是弹簧提供了这种效用。

Struts2 provides action based programming. There are a rich set of Struts tags. Struts prove action based programming so you have to maintain all the relevant control of your view.

Struts2提供基于操作的编程。有一组丰富的Struts标记。Struts证明了基于操作的编程,因此您必须维护视图的所有相关控制。

In Addition, Tapestry is a different framework for Java. In which you have to handle only .tml (template file). You have to create two main files for any class. One is JAVA class and another one is its template. Both names are same. Tapestry automatically calls related classes.

另外,Tapestry是Java的一个不同的框架。其中,您必须只处理.tml(模板文件)。您必须为任何类创建两个主文件。一个是JAVA类,另一个是它的模板。名字都是一样的。Tapestry会自动调用相关的类。

#3


6  

You can see the overview and ranking for yourself here. Hibernate is an ORM, so you can use either struts+Hiberante or spring+hibernate to build a web app. Different web frameworks and many are alternatives to each other.

您可以在这里看到概述和排名。Hibernate是ORM,所以您可以使用struts+Hiberante或spring+ Hibernate来构建web应用程序。

#4


3  

Spring is an application framework which deals with IOC (Inversion of Control).

Spring是一个处理IOC(控制反转)的应用程序框架。

Struts 2 is a web application MVC framework which deals with actions.

Struts 2是一个处理动作的web应用程序MVC框架。

Hibernate is an ORM (Object-Relational Mapping) that deals with persistent data.

Hibernate是处理持久数据的ORM(对象-关系映射)。

#5


1  

In hibernate you need not bother about how to create table in SQL and you need not to remember connection ,prepared statement like that data is persisted in a database. So, basically it makes a developer's life easy.

在hibernate中,您不需要操心如何在SQL中创建表,也不需要记住连接,像这样的准备语句被持久化到数据库中。因此,它基本上使开发人员的生活变得轻松。

#6


0  

In short,

简而言之,

Struts is for Front-end development of website

Struts用于网站的前端开发。

Hibernate is for back-end development of website

Hibernate用于网站的后端开发。

Spring is for full stack development of website due to MVC(Model-View-Controller) architecture

由于MVC(模型-视图-控制器)体系结构,Spring用于网站的全栈开发

#7


0  

Spring is a light weight and open source framework created by Rod Johnson in 2003. Spring is a complete and a modular framework, Spring framework can be used for all layer implementations for a real time application or spring can be used for the development of particular layer of a real time application.

Spring是一个轻量级的开源框架,由Rod Johnson在2003年创建。Spring是一个完整的模块化框架,Spring框架可以用于实时应用程序的所有层实现,也可以用于实时应用程序的特定层的开发。

Struts is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model–view–controller (MVC) architecture. It was originally created by Craig McClanahan and donated to the Apache Foundation in May, 2000.

Struts是用于开发Java EE web应用程序的开源web应用程序框架。它使用并扩展了Java Servlet API,以鼓励开发人员采用模型-视图-控制器(MVC)体系结构。它最初是由Craig McClanahan创造的,并于2000年5月捐赠给阿帕奇基金会。

Listed below is the comparison chart of difference between Spring and Strut Framework

下面列出了Spring与Strut框架之间的差异对比图。

Spring、Struts、Hibernate、JavaServer Faces、Tapestry的区别是什么?

#8


-2  

Tapestry pages and components are simple POJO's(Plain Old Java Object) consisting of getters and setters for easy access to Java language features.

Tapestry页面和组件是简单的POJO(普通的旧Java对象),由getter和setter组成,便于访问Java语言特性。

#9


-2  

Difference between Spring, Struts and Hibernate are following:

Spring、Struts和Hibernate的区别如下:

  1. Spring is an Application Framework but Struts and hibernate is not.
  2. Spring是一个应用程序框架,但Struts和hibernate不是。
  3. Spring and Hibernate are Light weighted but Struts 2 is not.
  4. Spring和Hibernate是轻量级的,但Struts 2不是。
  5. Spring and Hibernate has layered architecture but Struts 2 doesn't.
  6. Spring和Hibernate有分层的体系结构,但Struts 2没有。
  7. Spring and Hibernate support loose coupling but Struts 2 doesn't.
  8. Spring和Hibernate支持松散耦合,但Struts 2不支持。
  9. Struts 2 and Hibernate have tag library but Spring doesn't.
  10. Struts 2和Hibernate有标记库,但是Spring没有。
  11. Spring and Hibernate have easy integration with ORM technologies but Struts doesn't.
  12. Spring和Hibernate很容易与ORM技术集成,但Struts没有。
  13. Struts 2 has easy integration with client-side technologies but Spring and Hibernate don't have.
  14. Struts 2很容易与客户端技术集成,但是Spring和Hibernate没有。

#1


246  

  1. Spring is an IoC container (at least the core of Spring) and is used to wire things using dependency injection. Spring provides additional services like transaction management and seamless integration of various other technologies.
  2. Spring是一个IoC容器(至少是Spring的核心),用于使用依赖注入连接事物。Spring提供了其他服务,如事务管理和各种其他技术的无缝集成。
  3. Struts is an action-based presentation framework (but don't use it for a new development).
  4. Struts是一个基于活动的表示框架(但是不要将它用于新的开发)。
  5. Struts 2 is an action-based presentation framework, the version 2 of the above (created from a merge of WebWork with Struts).
  6. Struts 2是一个基于活动的表示框架,即上面的版本2(由WebWork与Struts的合并创建)。
  7. Hibernate is an object-relational mapping tool, a persistence framework.
  8. Hibernate是一个对象关系映射工具,一个持久性框架。
  9. JavaServer Faces is component-based presentation framework.
  10. JavaServer Faces是基于组件的表示框架。
  11. JavaServer Pages is a view technology used by all mentioned presentation framework for the view.
  12. JavaServer Pages是一个视图技术,被所有提到的视图表示框架所使用。
  13. Tapestry is another component-based presentation framework.
  14. Tapestry是另一个基于组件的表示框架。

So, to summarize:

所以,总结一下:

  • Struts 2, JSF, Tapestry (and Wicket, Spring MVC, Stripes) are presentation frameworks. If you use one of them, you don't use another.
  • Struts 2、JSF、Tapestry(和Wicket、Spring MVC、Stripes)都是表示框架。如果你用其中一个,你就不用另一个。
  • Hibernate is a persistence framework and is used to persist Java objects in a relational database.
  • Hibernate是一个持久性框架,用于在关系数据库中持久化Java对象。
  • Spring can be used to wire all this together and to provide declarative transaction management.
  • Spring可用于将所有这些连接在一起并提供声明性事务管理。

I don't want to make things more confusing but note that Java EE 6 provides modern, standardized and very nice equivalent of the above frameworks: JSF 2.0 and Facelets for the presentation, JPA 2.0 for the persistence, Dependency Injection, etc. For a new development, this is IMO a serious option, Java EE 6 is a great stack.

我不想让事情更加混乱但注意Java EE 6提供了现代化、标准化和很好的相当于上述框架:JSF 2.0和Facelets的演讲中,JPA 2.0持久性,依赖注入,等新的发展,这是国际海事组织一个严肃的选择,Java EE 6是一个伟大的堆栈。

See also

#2


17  

Generally...

一般……

Hibernate is used for handling database operations. There is a rich set of database utility functionality, which reduces your number of lines of code. Especially you have to read @Annotation of hibernate. It is an ORM framework and persistence layer.

Hibernate用于处理数据库操作。有一组丰富的数据库实用功能,减少了代码行数。特别是必须读取hibernate的@Annotation。它是一个ORM框架和持久层。

Spring provides a rich set of the Injection based working mechanism. Currently, Spring is well-known. You have to also read about Spring AOP. There is a bridge between Struts and Hibernate. Mainly Spring provides this kind of utility.

Spring提供了一组丰富的基于注入的工作机制。目前,春天是众所周知的。您还必须阅读有关Spring AOP的文章。在Struts和Hibernate之间有一个桥梁。主要是弹簧提供了这种效用。

Struts2 provides action based programming. There are a rich set of Struts tags. Struts prove action based programming so you have to maintain all the relevant control of your view.

Struts2提供基于操作的编程。有一组丰富的Struts标记。Struts证明了基于操作的编程,因此您必须维护视图的所有相关控制。

In Addition, Tapestry is a different framework for Java. In which you have to handle only .tml (template file). You have to create two main files for any class. One is JAVA class and another one is its template. Both names are same. Tapestry automatically calls related classes.

另外,Tapestry是Java的一个不同的框架。其中,您必须只处理.tml(模板文件)。您必须为任何类创建两个主文件。一个是JAVA类,另一个是它的模板。名字都是一样的。Tapestry会自动调用相关的类。

#3


6  

You can see the overview and ranking for yourself here. Hibernate is an ORM, so you can use either struts+Hiberante or spring+hibernate to build a web app. Different web frameworks and many are alternatives to each other.

您可以在这里看到概述和排名。Hibernate是ORM,所以您可以使用struts+Hiberante或spring+ Hibernate来构建web应用程序。

#4


3  

Spring is an application framework which deals with IOC (Inversion of Control).

Spring是一个处理IOC(控制反转)的应用程序框架。

Struts 2 is a web application MVC framework which deals with actions.

Struts 2是一个处理动作的web应用程序MVC框架。

Hibernate is an ORM (Object-Relational Mapping) that deals with persistent data.

Hibernate是处理持久数据的ORM(对象-关系映射)。

#5


1  

In hibernate you need not bother about how to create table in SQL and you need not to remember connection ,prepared statement like that data is persisted in a database. So, basically it makes a developer's life easy.

在hibernate中,您不需要操心如何在SQL中创建表,也不需要记住连接,像这样的准备语句被持久化到数据库中。因此,它基本上使开发人员的生活变得轻松。

#6


0  

In short,

简而言之,

Struts is for Front-end development of website

Struts用于网站的前端开发。

Hibernate is for back-end development of website

Hibernate用于网站的后端开发。

Spring is for full stack development of website due to MVC(Model-View-Controller) architecture

由于MVC(模型-视图-控制器)体系结构,Spring用于网站的全栈开发

#7


0  

Spring is a light weight and open source framework created by Rod Johnson in 2003. Spring is a complete and a modular framework, Spring framework can be used for all layer implementations for a real time application or spring can be used for the development of particular layer of a real time application.

Spring是一个轻量级的开源框架,由Rod Johnson在2003年创建。Spring是一个完整的模块化框架,Spring框架可以用于实时应用程序的所有层实现,也可以用于实时应用程序的特定层的开发。

Struts is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model–view–controller (MVC) architecture. It was originally created by Craig McClanahan and donated to the Apache Foundation in May, 2000.

Struts是用于开发Java EE web应用程序的开源web应用程序框架。它使用并扩展了Java Servlet API,以鼓励开发人员采用模型-视图-控制器(MVC)体系结构。它最初是由Craig McClanahan创造的,并于2000年5月捐赠给阿帕奇基金会。

Listed below is the comparison chart of difference between Spring and Strut Framework

下面列出了Spring与Strut框架之间的差异对比图。

Spring、Struts、Hibernate、JavaServer Faces、Tapestry的区别是什么?

#8


-2  

Tapestry pages and components are simple POJO's(Plain Old Java Object) consisting of getters and setters for easy access to Java language features.

Tapestry页面和组件是简单的POJO(普通的旧Java对象),由getter和setter组成,便于访问Java语言特性。

#9


-2  

Difference between Spring, Struts and Hibernate are following:

Spring、Struts和Hibernate的区别如下:

  1. Spring is an Application Framework but Struts and hibernate is not.
  2. Spring是一个应用程序框架,但Struts和hibernate不是。
  3. Spring and Hibernate are Light weighted but Struts 2 is not.
  4. Spring和Hibernate是轻量级的,但Struts 2不是。
  5. Spring and Hibernate has layered architecture but Struts 2 doesn't.
  6. Spring和Hibernate有分层的体系结构,但Struts 2没有。
  7. Spring and Hibernate support loose coupling but Struts 2 doesn't.
  8. Spring和Hibernate支持松散耦合,但Struts 2不支持。
  9. Struts 2 and Hibernate have tag library but Spring doesn't.
  10. Struts 2和Hibernate有标记库,但是Spring没有。
  11. Spring and Hibernate have easy integration with ORM technologies but Struts doesn't.
  12. Spring和Hibernate很容易与ORM技术集成,但Struts没有。
  13. Struts 2 has easy integration with client-side technologies but Spring and Hibernate don't have.
  14. Struts 2很容易与客户端技术集成,但是Spring和Hibernate没有。