且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

启动Java EE MVC

更新时间:2023-12-03 22:53:10

Java EE组件都在服务器端运行,或者在完整的Java EE服务器上运行像GlassFish,JBoss,WebLogic或WebSphere,或者像Tomcat这样只支持servlet和JSP的服务器。

The Java EE components all run on the server side, either on full Java EE servers like GlassFish, JBoss, WebLogic, or WebSphere, or on servers like Tomcat that just support servlets and JSPs.

在Java EE中,MVC 模型可以被认为是域模型,即表示对您的应用程序很重要的实体的Java对象。例如,购物应用程序将具有表示购买物品,购物车,信用卡,邮寄地址,帐户,评论等的域对象。这些域对象通常来自持久存储,例如关系数据库。

In Java EE the MVC model can be thought of as a "domain model", ie the Java objects representing the entities that are important to your application. For instance a shopping application would have domain objects representing items for purchase, shopping carts, credit cards, mailing addresses, accounts, reviews, and so forth. Often these domain objects come from persistent storage such as a relational database.

Java EE的Java Persistence API旨在处理Java域模型对象与用于使对象持久化的关系数据库表之间的映射。 Hibernate 是JPA对象 - 关系映射器(ORM)的一种实现。

Java EE's Java Persistence API is designed to handle the mapping between the Java domain model objects and the relational database tables used to make the objects persistence. Hibernate is one implementation of a JPA "object-relational mapper" (ORM).

Java EE远不止于此。举一个例子,它定义了一个超可靠的消息传递服务(Java消息服务),后端应用程序组件可以使用它来相互通信。

Java EE is much more than that. To take just one example, it defines an ultra-reliable messaging service (Java Message Service) that back end application components use to communicate with each other.

当你探索Java时EE,确实考虑了更简单,更高效的替代方案,如Ruby-on-Rails,LAMP堆栈,Microsoft的.NET平台,以及像Spring / Hibernate这样的轻量级Java方法。撰写O'Reilly非常成功的Enterprise JavaBeans 3.0(第五版)和Java消息服务的Richard Monson-Haefel,甚至还远远超过声称 Java EE对开发人员恐吓,并且将被这些其他方法黯然失色。

As you explore Java EE, do give some thought to simpler and more productive alternatives like Ruby-on-Rails, LAMP stacks, Microsoft's .NET platform, and "light-weight" Java approaches like Spring/Hibernate. Richard Monson-Haefel, who wrote O'Reilly's very successful "Enterprise JavaBeans 3.0" (the fifth edition) and "Java Message Service", even goes so far as to claim that Java EE is "intimidating" to developers and will be eclipsed by these other approaches.

获得更广泛视角的好地方是Todd Hoff在 http的精彩博客://highscalability.com/

A good place to get a wider perspective is Todd Hoff's wonderful blog at http://highscalability.com/