启动Java EE MVC [英] Starting Java EE MVC

查看:99
本文介绍了启动Java EE MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习Java EE,从MVC架构中的Servlet和JSP开始。我知道Servlet经常被用作控制器,而JSP经常被用作视图,并且这些都与模型交互,服务器上的后端java应用程序。我问的问题是后端应用程序将包含什么。它只不过是一个使用Servlet和JSP作为接口的简单JSE应用程序吗?

I'm trying to learn Java EE, starting with Servlets and JSPs in an MVC architecture. I know Servlets are often used as the controller and JSPs are often used as the view, and that these both interact with the model, the back end java application on the server. The question I'm asking is what the back end application would consist of. Is it nothing more than a simple JSE application that uses Servlets and JSPs as the interface?

另外,考虑到我在问什么可能是一个简单的问题,是否有一个好的我可以使用Java EE MVC教程吗?

Also, considering I'm asking what's probably a simple question, is there a good Java EE MVC tutorial I could use?

推荐答案

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/

这篇关于启动Java EE MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆