Java SE 与 Java EE,大学和职业

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/196265/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 11:22:29  来源:igfitidea点击:

Java SE vs Java EE, college and career

javajakarta-ee

提问by Jonik

I'm currently studying Computer Science at College where they mainly teach Java standard edition, I see that in the industry this isn't used much, instead Java EE is used. If my College is teaching me Java SE rather than Java EE does this make me less employable?

我目前在大学学习计算机科学,他们主要教授 Java 标准版,我看到在行业中这用得不多,而是使用 Java EE。如果我的学院教我的是 Java SE 而不是 Java EE,这是否会降低我的就业率?

And what exact are the differences? different syntax? different way of programming or what?

差异究竟是什么?不同的语法?不同的编程方式还是什么?

回答by Robin

For all intents and purposes, Java and Java SE are the same thing. When you say you are learning Java SE, it means you are learning Java, its syntax, features and standard libraries. You cannot learn Java EE before learning these skills.

出于所有意图和目的,Java 和 Java SE 是一回事。当您说您正在学习 Java SE 时,这意味着您正在学习 Java、其语法、特性和标准库。在学习这些技能之前,您无法学习 Java EE。

Java EE is a set of standards which define many different interfaces and features for building software to address enterprise level problems. These include things like transactions, distributed computing, messaging, web applications and resource management. All of which are provided in a managed environment. All of which is coded to the Java language, with particular rules and characteristics due to the environment in which the software will run.

Java EE 是一组标准,它定义了许多不同的接口和功能,用于构建软件以解决企业级问题。其中包括事务、分布式计算、消息传递、Web 应用程序和资源管理等。所有这些都在托管环境中提供。所有这些都被编码为 Java 语言,由于软件将运行的环境而具有特定的规则和特征。

Think of learning Java SE as learning to drive a car. Java EE is like learning to drive an 18 wheeler, you don't need to know how to do it to get from A to B, but it sure helps if you have to take 10 tons of cargo with you 8-)

将学习 Java SE 视为学习驾驶汽车。Java EE 就像学习驾驶 18 轮车,你不需要知道如何从 A 到 B,但如果你必须携带 10 吨货物,它肯定会有所帮助 8-)

回答by Javier

Java SE contains the standard Java libraries: all the basics, containers, network, GUI, and so on. It's meant mostly for desktop apps and browser applets.

Java SE 包含标准 Java 库:所有基础知识、容器、网络、GUI 等。它主要用于桌面应用程序和浏览器小程序。

Java EE adds a server framework. When you talk about Java in the server, this is what you're referring to. It's a hugelibrary, with lots and lots of pre-established 'best practices'. Back when JITs were still young, the heavily scalable design of Java EE made it very well-received in the server, besides the (then significant) overhead of JVM.

Java EE 添加了一个服务器框架。当您谈论服务器中的 Java 时,这就是您所指的内容。这是一个巨大的图书馆,有很多预先建立的“最佳实践”。在 JIT 还很年轻的时候,Java EE 的高度可扩展设计使它在服务器中非常受欢迎,除了 JVM 的(当时很重要的)开销。

I haven't really used Java EE in anything serious; but I think it's better to learn Java SE first, and then Java EE. It takes more time; but lets you better understand what is the language and what is the framework.

我还没有真正认真地使用过 Java EE。但我认为最好先学习Java SE,然后再学习Java EE。需要更多时间;但是让你更好地理解什么是语言,什么是框架。

回答by Jonik

If my College is teaching me Java SE rather than Java EE does this make me less employable?

如果我的学院教我的是 Java SE 而不是 Java EE,这是否会降低我的就业率?

No. That's what your university should do: focus on fundamentals. In the case of Java, that mostly means the standard edition.

不。这就是你的大学应该做的:专注于基础。对于 Java,这主要是指标准版。

Java EE (notJ2EE; see my comment in the question) adds some server-side Java APIs, specifications and libraries. The most important of these are the ServletAPI and JSPcontainer specification. But I think it's important to know that even on the server side, it's still mostly about standard Java! It's quite possible that you'll do server-side Java development without ever needing to learn most Java EE technologies, like Enterprise Java Beans (EJB) - especially with the rise of alternative, lightweight approaches such as favouring POJOs, with Hibernatefor persistence layer. Many parts of Java EE like EJB have definitely long passed the peak of their hype cycle. You may not even need to know all "lower-level" Servlet and JSP stuff thoroughly, as higher-level frameworks such as Struts, JSF, or Wickethave become popular.

Java EE(不是J2EE;请参阅我在问题中的评论)添加了一些服务器端 Java API、规范和库。其中最重要的是ServletAPI 和JSP容器规范。但我认为重要的是要知道即使在服务器端,它仍然主要是关于标准 Java!您很有可能在不需要学习大多数 Java EE 技术(例如 Enterprise Java Beans (EJB))的情况下进行服务器端 Java 开发,尤其是随着替代轻量级方法的兴起,例如偏爱POJOHibernate对于持久层。Java EE 的许多部分(如 EJB)肯定早已过了炒作周期的高峰期。您甚至可能不需要彻底了解所有“低级别”的 Servlet 和 JSP 内容,因为StrutsJSFWicket等高级框架已经变得流行。

One case study: I learned fundamentals of Java (and OO programming) at the university - and only verylittle (and nothing practical) about the Enterprise Edition. Now I've worked some 4-5 as "Java EE developer", that is, doing server side Java. I've never really used EJB, or most other Java EE technologies. I've mostly done just pure Java (i.e. standard edition), with some JSP, Servlets, Filters, etc related stuff thrown in (plus of course web techniques like HTML, JS, CSS); making use of lotsof (mostly open-source) 3rd party libraries, and picking up everything as needed. (However, I am planning to brush up my knowledge of Java EE, and take the SCWCDat some point - I think that would do me good even if Java SE goes a long way :)

一个案例:我在大学里学到的Java(和面向对象编程)的基础-只有非常少(并没有什么实际的)对企业版。现在我以“Java EE 开发人员”的身份工作了 4-5 次,即从事服务器端 Java。我从未真正使用过 EJB 或大多数其他 Java EE 技术。我主要完成了纯 Java(即标准版),并加入了一些 JSP、Servlet、过滤器等相关内容(当然还有 Web 技术,如 HTML、JS、CSS);利用大量(主要是开源的)第 3 方库,并根据需要选择所有内容。(不过,我打算重温我的 Java EE 知识,并在某个时候参加 SCWCD- 我认为即使 Java SE 走很长的路,这对我也有好处:)

回答by hydeph

In my opinion, university is really meant to teach you to be strong on the fundamentals and concepts not necessarily to teach you the exact skills you will need in a job. So most of all I would recommend that you make sure you're learning the concepts found in enterprise application requirements (e.g. transactions, messaging queues/topics, etc...) However, if this is really a concern for you I would suggest doing a self-study (possibly for course credit). Also, try to find an internship that will let you play in some Java EE code.

在我看来,大学的真正目的是教你在基础知识和概念上变得强大,而不一定是教你在工作中需要的确切技能。所以最重要的是,我建议您确保您正在学习企业应用程序需求中的概念(例如事务、消息队列/主题等...)但是,如果这真的是您的问题,我建议您这样做自学(可能用于课程学分)。另外,试着找一份实习,让你玩一些 Java EE 代码。

I was asking myself the same question when I was nearing the end of university. I'm now working in a Java EE environment and there was some learning curve to use the Java EE libraries. I have to agree with many others and say that doing enterprise java development is not very much fun compared to other projects I've worked on so you might want to keep having fun in university and put off the boring stuff for when you're part of the workforce.

当我快要大学毕业的时候,我也在问自己同样的问题。我现在在 Java EE 环境中工作,使用 Java EE 库有一些学习曲线。我不得不同意许多其他人的看法,并说与我参与过的其他项目相比,从事企业 Java 开发并不是很有趣,所以你可能希望在大学里继续玩得开心,并在你加入时推迟无聊的事情的劳动力。

回答by Jin Kim

This is how I view it.

这就是我的看法。

The programming language as you know it is called Java.

您所知道的编程语言称为 Java。

Like most other programming languages, it also comes bundled with many standard libraries.

与大多数其他编程语言一样,它还捆绑了许多标准库。

Java SE is the combination of both the language and certain libraries that makes general application development possible.

Java SE 是语言和某些库的组合,使通用应用程序开发成为可能。

Java EE is another set of libraries that you can use in combination with Java SE to also develop enterprise/web applications.

Java EE 是另一组库,您可以将它们与 Java SE 结合使用来开发企业/Web 应用程序。

回答by Adam Jaskiewicz

From Wikipedia:

来自维基百科

The Java platform (Enterprise Edition) differs from the Java Standard Edition Platform (Java SE) in that it adds libraries which provide functionality to deploy fault-tolerant, distributed, multi-tier Java software, based largely on modular components running on an application server.
Java 平台(企业版)与 Java 标准版平台 (Java SE) 的不同之处在于它添加了一些库,这些库提供了部署容错、分布式、多层 Java 软件的功能,主要基于在应用程序服务器上运行的模块化组件.

The syntax is the same. Everything you learn pertaining to Java SE will apply to Java EE. It simply adds a pile of new APIs, and calls for a certain style of application design that is well-suited to specific types of problems. Those kinds of problems (large, fault-tolerant, distributed, scalable, multi-tier...) and how to solve them are really what Java EE is about, not the actual APIs that happen to be part of the specification.

语法是一样的。您学到的与 Java SE 相关的一切都将适用于 Java EE。它只是添加了一堆新的 API,并要求采用某种非常适合特定类型问题的应用程序设计风格。这类问题(大型、容错、分布式、可扩展、多层……)以及如何解决这些问题才是 Java EE 真正要解决的问题,而不是碰巧成为规范一部分的实际 API。

Remember that a CS degree isn't a vocational degree. It is meant to teach you how to learn and think, not train you in a specific skill-set tailored for a certain industry niche.

请记住,CS 学位不是职业学位。它旨在教您如何学习和思考,而不是培训您针对某个行业利基量身定制的特定技能。

回答by David M. Karr

The Java language by itself is one aspect of Java development. Applications built with the standard edition fulfill certain needs. Thinking that you can just "wing it" with the enterprise edition if all you know is the standard edition, is a misconception. The libraries make the language. Although certain aspects of Java EE have their (deserved) critics, there is still a great deal of functionality there. Even the questionable parts are still used heavily in the industry.

Java 语言本身就是 Java 开发的一个方面。使用标准版构建的应用程序可满足某些需求。如果您只知道标准版,则认为您可以使用企业版“随心所欲”,这是一种误解。图书馆创造了语言。尽管 Java EE 的某些方面受到了(应得的)批评,但仍然有很多功能。即使是有问题的零件,在该行业中仍然大量使用。

回答by Uri

I think you are misunderstanding the relation of Java SE (or "Core Java) and Java EE.

我认为您误解了 Java SE(或“Core Java)和 Java EE 的关系。

Core Java is important to learn and is what most schools will teach you.

Core Java 很重要,大多数学校都会教你。

Since programming revolves around using wheels rather than reinventing them, there are usually libraries with code for accomplishing complex tasks.

由于编程围绕使用轮子而不是重新发明轮子,因此通常有带有代码的库来完成复杂的任务。

For examples, some schools teach people to build GUIs using the AWT or Swing class library that are supplied with Java, although there are other options.

例如,一些学校教人们使用 Java 提供的 AWT 或 Swing 类库构建 GUI,尽管还有其他选择。

Java EE, while supported by extra software to run the program on servers, can be thought of more as a library of classes and related services. You still do Java constantly, you just use a popular and Sun supported library. You will also see Hibernate and Spring that are not part of Java EE.

Java EE 虽然由额外的软件支持以在服务器上运行程序,但可以更多地将其视为类和相关服务的库。你仍然不断地使用 Java,你只是使用一个流行的和 Sun 支持的库。您还将看到不属于 Java EE 的 Hibernate 和 Spring。

Most places will first of all want to make sure that your Java is solid. As you start working, you will gain experience at using specific parts of Java EE.

大多数地方首先要确保您的 Java 是可靠的。当您开始工作时,您将获得使用 Java EE 特定部分的经验。

回答by Joshua

Java EE is just a superset of Java SE (enterprise libraries such as servlets). Learn Java SE and you mostly know Java EE.

Java EE 只是 Java SE(企业库,如 servlet)的超集。学习 Java SE,您就基本了解 Java EE。