开发者

DAO, Spring, Hibernate, Jboss

How exactly are these 4 components related, any good explanations someone can offer or li开发者_运维知识库nks or whatever useful.


JBoss is an application server that can run applications built with

Spring which is a framework that provides many niceties for Java EE, including integration with ORM layers such as

Hibernate which lets you map your objects into a RDBMS and store / retrieve those objects using

DAO pattern

... in the house that Jack built.


Briefly, they are different animals :

  • JBoss is an application server
  • Spring is a J2EE framework that can do lots and lots of things for you
  • DAO is mainly a design pattern. But it can be viewed as the data access layer or implementation of that, it depends a bit of the context where you're using the term
  • Hibernate is a persistence framework ( so is iBatis for instance )

Maybe you could refine a bit your question, as it is it's a bit vague and it involves some guesswork in regard to what you're exactly interested in finding out.


JBoss is a server that runs it all. Spring is a set of Java and XML technologies that tie together web applications. Hibernate is a object relational mapping tool; it lets you talk to your database in a consistent way. DAO is a data access object, which would be how Spring talks to Hibernate. (Spring can also talk to iBATIS, or several other technologies to accomplish this.)


JBoss is a server. You can use this to run, for example, a web application that uses Spring as its framework.

If you have a database in your application you have to access it. Hibernate is a framework that helps you with that.

The DAO is a pattern to access the database and you can use here tools that Hibernate provides.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜