本文介绍了Java框架战争:Spring和Hibernate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的开发者正在发动内战。在一个阵营中,他们接受了Hibernate和Spring。在另一个阵营中,他们谴责了框架 - 他们正在考虑使用Hibernate。



问题是:是否有任何令人讨厌的惊喜,弱点或陷阱? Hibernate-Spring转换可能会绊倒?






PS:我们有一个不太复杂的DAO库。我怀疑它是否具有Hibernate的丰富性,但它已经达到某种成熟度(即它在包含的最后几个项目中没有改变)。 div>

过去我曾经多次使用过Hibernate。每次遇到边缘情况时,都需要通过文档,Google和旧版本确定语法转换为寻找清除程序。这是一个功能强大的工具,但没有很好的记录(最后我看了)。

至于Spring,几乎所有我在过去几年中采访或看过的工作涉及Spring,它真的成为了Java / Web的事实标准。使用它可以帮助您的开发人员在未来更具市场性,并且会为您提供帮助,因为您将拥有大量能够理解您的应用程序的人员。

编写自己的框架是诱人的,教育性的和有趣的。结果不太好。

My developers are waging a civil war. In one camp, they've embraced Hibernate and Spring. In the other camp, they've denounced frameworks - they're considering Hibernate though.

The question is: Are there any nasty surprises, weaknesses or pit-falls that newbie Hibernate-Spring converts are likely to stumble on?


PS: We've a DAO library that's not very sophisticated. I doubt that it has Hibernate's richness, but it's reaching some sort of maturity (i.e. it's not been changed in the last few projects it's included).

解决方案

I've used Hibernate a number of times in the past. Each time I've run into edge cases where determining the syntax devolved into a scavenger hunt through the documentation, Google, and old versions. It is a powerful tool but poorly documented (last I looked).

As for Spring, just about every job I've interviewed for or looked at in the past few years involved Spring, it's really become the de-facto standard for Java/web. Using it will help your developers be more marketable in the future, and it'll help you as you'll have a large pool of people who'll understand your application.

Writing your own framework is tempting, educational, and fun. Not so great on results.

这篇关于Java框架战争:Spring和Hibernate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 21:59