13

I have been doing some research about the difference between Java web application and enterprise application and what I have found is that they have little bit similar architecture.

For example Enterprise Application have Client -, Presentation -, Business Logic - and Data tier.

Client Tier can be Java clients, browser-based clients and mobile clients.
Presentation Tier can be JavaBeans components, servlets, portals and JSP components.
In Business Logic Tier you can have servers, web services (SOAP, Restful and others) and MDB components.
In Data Tier you can have DBMS, LDAP and Data Feed.

Now if we compare those components to web application you can use them without creating Java Enterprise application. For example I can use many different technologies to implement my web application such as Hibernate, Maven, JSP or JSF, Databases, Servlets, JavaBeans and etc.

My biggest question is what is the major difference between Java Enterprise application and Web application? Why I would use Java Enterprise application?

4

2 回答 2

6

oracle 网站可以看到,Java Enterprise Edition 是一个规范。有很多来自不同供应商的实现。与标准版和企业版的主要区别在于,对于后者,您需要一个应用服务器,而不是像 tomcat 这样的 Web 服务器。这是因为放置业务逻辑的EJB(仅存在于 Java EE 规范中)需要一个容器来处理它们。

JBoss、Geronimo、Resin、WebSphere 等都是管理 EJB 的应用服务器。

于 2013-07-06T20:54:02.700 回答
6

为什么要使用 Java Enterprise 应用程序?

这个问题几乎在规范本身出现的同时出现。

关于这个主题已经写了几本书。

没有 EJB 的专家一对一 J2EE 开发

POJO 在行动:使用轻量级框架开发企业应用程序

而且像Spring这样的技术也提供了替代方案。

因此,在大多数情况下,您可以构建满足客户要求的 Web 应用程序,而无需构建企业应用程序。

但是,有些应用程序具有特殊的功能和/或非功能要求,它们需要在提供某些服务的基础设施上运行业务层,例如:分布式事务、消息处理、计时器服务和远程方法调用。

这种基础设施服务在 Web 服务器中不可用,因此您需要开发一个运行在重量级应用程序服务器上的应用程序(或至少一些组件)。

于 2013-07-07T00:21:05.033 回答