简体   繁体   English

在标准Java之后启动Java EE项目

[英]Start Java EE project after standard java

My task is to make a small a project for start my ee studies. 我的任务是为启动ee学习做一个小项目。 Till now, I learned standard java, but i don't get what ee means exactly, how my project would be an enterprise stuff. 到现在为止,我学习了标准的Java,但是我没有得到ee的确切含义,我的项目将如何成为企业级产品。 Has it a different syntax or different setup in IDE? IDE中的语法或设置是否不同? I know it's not a clever question, but I really don't know where to start. 我知道这不是一个聪明的问题,但我真的不知道从哪里开始。 Do you have any idea for start a project? 您有启动项目的想法吗?

Java EE is no different language or has no different syntax than Java SE. Java EE与Java SE没有不同的语言或语法。 It's built on top of Java SE and comprises a set of standardized APIs and libraries that are helpful for solving problems in an enterprise context. 它建立在Java SE之上,并包含一组标准化的API和库,可帮助解决企业环境中的问题。

To name a few: 仅举几例:

  • Web Applications (Servlets, JSPs, JSF, WAR-packaging) Web应用程序(Servlet,JSP,JSF,WAR打包)
  • RESTful- and WebServices (Jax-RS, Jax-WS) RESTful和Web服务(Jax-RS,Jax-WS)
  • Persistence (EJB, JPA) 持久性(EJB,JPA)
  • Context Dependency Injection (CDI) 上下文依赖注入(CDI)
  • Security 安全
  • Batch 批量
  • Messaging 讯息传递
  • ... ...

Further it defines a runtime environment - an Application Server - to run enterprise applications. 此外,它定义了一个运行时环境-一个应用服务器-用于运行企业应用程序。 Nevertheless, the classic application server model has become somewhat obsolet, nowadays you either run a single application in an application server or use only parts of the libraries and APIs and embedd those in your applications. 但是,经典的应用程序服务器模型已经过时了,如今,您要么在应用程序服务器中运行单个应用程序,要么仅使用库和API的一部分,然后将它们嵌入到您的应用程序中。

So basically, all you need is an IDE and the libraries. 因此,基本上,您只需要一个IDE和库即可。 When you're using maven as build environment, all you need is the java-ee maven dependency, see Maven Central 在将maven用作构建环境时,您需要的只是java-ee maven依赖项,请参见Maven Central。

Usually you don't need to know all the libraries and APIs of Java EE in detail, it's good to know what is available out-of-the-box (so you don't reinvent the wheel), but you hardly will need all of them in all of your projects. 通常,您不需要详细了解Java EE的所有库和API,最好是开箱即用即可找到可用的东西(这样就不必重新发明轮子了),但是几乎不需要所有东西。他们在您所有项目中。 I personally avoid JSF, hardly have to deal with JPA, only occasionally do something with Batch or EJBs. 我个人避免使用JSF,几乎不必处理JPA,仅偶尔使用Batch或EJB做一些事情。 More common are CDI, Restful or WebServices and WebApps, and usually a bit of Security. CDI,Restful或WebServices和WebApps更为常见,并且通常具有一些安全性。

And a good example for a Java EE Projects, a simple one with some typical use cases and very little code is Adam Bien's Guestbook2.0 , which only requires Docker to run. 一个Java EE项目的好例子, Adam Bien的Guestbook2.0是一个简单的例子,有一些典型的用例,很少的代码,只需要运行Docker。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM