EE.2.3 Application Components
第 EE.2.3 章 应用程序组件
The Java EE runtime environment defines four application component types that a Java EE product must support:
Java EE 运行时环境定义了四类Java EE产品必须支持的应用程序组件
? Application clients are Java programming language programs that are typically GUI programs that execute on a desktop computer. Application clients offer a user experience similar to that of native applications, and have access to all of the facilities of the Java EE middle tier.
应用程序客户端是指用Java语言开发的程序,通常是一个运行在桌面计算机的图形化的程序。应用程序客户端提供了类似原生程序的用户体验,并且可以访问所有的Java EE中间件。
? Applets are GUI components that typically execute in a web browser, but can execute in a variety of other applications or devices that support the applet programming model. Applets can be used to provide a powerful user interface for Java EE applications. (Simple HTML pages can also be used to provide a more limited user interface for Java EE applications.)
应用小程序是一个典型的运行在Web浏览器中的图形化组件,但是也可以运行在多种其他的支持应用小程序编程模型的应用程序或者设备上。应用小程序可以被用来为Java EE应用程序提供一个强大的用户交互界面。(简单的HTML页面也可以被用来为Java EE 应用程序提供一个受限制的用户界面)。
? Servlets, JSP pages, JSF applications, filters, and web event listeners typically execute in a web container and may respond to HTTP requests from web clients. Servlets, JSP pages, JSF applications, and filters may be used to generate HTML pages that are an application’s user interface. They may also be used to generate XML or other format data that is consumed by other application components. A special kind of servlet provides support for web services using the SOAP/HTTP protocol. Servlets, pages created with the JavaServer Pages? technology or JavaServer? Faces technology, web filters, and web event listeners are referred to collectively in this specification as “web components.” Web applications are composed of web components and other data such as HTML pages. Web components execute in a web container. A web server includes a web container and other protocol support, security support, and so on, as required by Java EE specifications.
Servlets、JSP页面、JSP应用程序、过滤器和Web事件侦听器通常运行于Web容器中,并且会响应从Web客户端发来的请求。Servlets、JSP页面、JSP应用程序、过滤器可以通过生成HTML页面来实现应用程序的用户界面。它们也可以生成XML或者其他格式的数据供其它应用组件使用。一个特殊类型的Servlet提供了对使用SOAP/HTTP协议的Web服务的支持。Servlets、通过JSP或JSF技术生成的页面、Web过滤器和Web事件侦听器在本规范中统统作为“Web组件”。Web应用程序由Web组件和其他数据(如HTML页面)组成。Web组件运行于Web容器中。一个Web服务器包含了一个Web容器和对其他协议、安全等Java EE规范所要求的内容的支持。
? Enterprise JavaBeans? (EJB) components execute in a managed environment that supports transactions. Enterprise beans typically contain the business logic for a Java EE application. Enterprise beans may directly provide web services using the SOAP/HTTP protocol.
企业级JavaBean组件(EJB)运行于一个支持事物的收管的环境中。企业级Bean通常包含Java EE应用程序的业务逻辑。企业级Bean可以直接提供基于SOAP/HTTP协议的Web服务。
EE.2.3.1 Java EE Server Support for Application Components
第 EE.2.3.1 章 Java EE服务器对应用程序组件的支持
The Java EE servers provide deployment, management, and execution support for conforming application components. Application components can be divided into three categories according to their dependence on a Java EE server:
Java EE服务器提供对应用程序组件的部署、管理和运行的支持。应用程序组件可以依照其以来的Java EE服务器分为三种类别:
? Components that are deployed, managed, and executed on a Java EE server. These components include web components and Enterprise JavaBeans components. See the separate specifications for these components.
部署、管理、运行在Java EE服务器上的组件。这些组件包括Web组件和EJB组件。请参考这些组件的单独的规范。
? Components that are deployed and managed on a Java EE server, but are loaded to and executed on a client machine. These components include web resources such as HTML pages and applets embedded in HTML pages.
部署、收管与Java EE服务器但被客户端加载和执行的组件。这些组件包括Web资源(如HTML页面和嵌入HTML页面中的应用小程序)。
? Components whose deployment and management is not completely defined by this specification. Application Clients fall into this category. Future versions of this specification may more fully define deployment and management of Application Clients. See Chapter EE.10, “Application Clients” for a description of Application Clients.
部署和管理不完全在本规范中定义的组件。应用程序客户端属于这一类别。将来版本的规范可能会更完整的定义应用程序客户端的部署和管理。请参考第 EE.10 章“应用程序客户端”中关于应用程序客户端的描述。