我如何最好地赶上Java的最新发展? [英] How do I best catch up with the latest developments in java?

查看:47
本文介绍了我如何最好地赶上Java的最新发展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在申请Java开发人员的工作.我用Java编写了一些业余应用程序,直到2001年,之后我主要使用c ++和其他语言工作.同时,感觉Java增长了很多,我不知道有各种各样的缩写(EJB,spring等).

I am applying for a job as java developer. I programmed some hobby apps in java until 2001, after that I have mostly worked in c++ and other languages. Meanwhile, it feels like java has grown a lot, and there are all kinds of acronyms (EJB, spring, etc) unknown to me.

在哪里可以找到Java最近(五年)开发的简洁明了的解释?有哪些关键要素要理解?

Where can I find a concise, clear explanation of the recent (5 years) development of java? What are key elements to understand?

推荐答案

2001?哇,时代变了.那是什么?Java 1.3?

2001? Wow, times have changed. That was what? Java 1.3?

首先,语言特点:

  • 泛型:Java在2004年的5.0版本中添加了泛型,基本上是作为语法糖来阻止您从集合中进行所有Objects的强制类型转换;
  • 注释:也在Java 5中使用.广泛用于Spring和其他地方的持久性框架中;
  • Typesafe枚举:Java 5添加了一个枚举类型,它基本上是一个类(某种);
  • 并发性:Java 5添加了广泛的并发utils,因此多线程已经发生了很大的变化.和
  • Asserts:Java 1.4中添加的一种未被充分利用的语言功能.如果在运行程序时启用了该功能,则资产可以检查各种条件,如果条件不正确,则可以对其进行轰炸.您可以在运行程序时将其打开或关闭的事实非常有助于诊断.

尽管如此,以上内容甚至都不是什么大变化.在这十年的早期,Java经历了根本的架构和哲学变革.

Thing is though, the above aren't even the big changes. In the early part of this decade, Java underwent radical architectural and philosophical changes.

在2001年,大的事情是EJB,Swing和servlets/JSP.他们都不是真的了(至少不是直接的).

Back in 2001 the big things were EJB, Swing and servlets/JSP. None of them really are anymore (at least not directly).

在Java中可能发生的最大事情(因为它成立之初就是恕我直言)是Spring,而Spring确实在大约5年前变得非常强大.Spring是一个轻量级的容器,它还试图隐藏不同提供程序和API之间的实现差异.但是,关于Spring的最大问题是控制反转"或依赖注入"的原理.这个想法是,类("beans")是从外部配置(应用程序上下文")组装而成的.

Proably the biggest thing to happen in Java (since its inception imho) is Spring and Spring really became big about 5 years ago. Spring is a lightweight container that also seeks to hide implementation differences between different providers and APIs. The biggest thing about Spring however is the principle of "inversion of control" or "dependency injection". The idea is that classes ("beans") are assembled from an external config ("application context").

早期的J2EE模式中的典型模式是服务定位器.现在,它在很大程度上被视为一种反模式.基本上,您会看到如下代码:

A typical pattern in the earlier J2EE days was the Service Locator. It's now viewed largely as an anti-pattern. Basically you'd see code like this:

public MyClass() {
  this.dataMember = ServiceLocator.locate("some service");
}

这些天,如果您四处倡导这种方法,那么您将被视为过时,业余爱好者,骗子或这三者的某种组合.

If you go around advocating this sort of approach these days you will be viewed as an anachronism, a rank amateur, a crackpot or some combination of the three.

以最简单的形式进行的依赖注入将改为将必要的行为注入类中,而不考虑实际的实现.这种分离具有看似强大的功能,并且是Sun仍未真正解决的深刻转变.它还大大增强了单元测试.

Dependency injection, in its simplest form, will instead inject the necessary behaviour into classes without regard for the actual implementation. This kind of separation is deceptively powerful and a profound shift that Sun (still) hasn't really caugh tup with. It also greatly enhances unit testing.

摇摆仍然存在,但不再那么大了.Sun在最近几个月中将JavaFX作为Flash竞争对手和applet替代产品发布.我个人认为这没有太大的未来(正如Joel在他最近的播客中所说的那样,台式机上的Java基本上已经死了),但是其他人会不同意.

Swing is still around but not so big anymore. Sun released JavaFX as a Flash competitor and applet replacement in recent months. I personally don't think it has much of a future (as Joel put it in his recent podcast, Java on the desktop is basically dead) but others will disagree.

EJB在2001年很大.现在已经不多了.(正确地)将其视为XML配置的噩梦,应用服务器的差异使它们在很大程度上无法移植(如果您愿意,也很难移植),并且它们是如此笨重的解决方案(3.0之前的版本)真的没有那么多应用程序.

EJB was big in 2001. Not so much anymore. It was (correctly) viewed as a nightmare of XML configuration, differences in application servers that made them largely non-portable (or non-trivially portable if you prefer) and they're such a heavyweight solution (pre-3.0) that they don't really have that many applications.

EJB 3.0采用了一种更像Spring的方法,即依赖注入(某种)和POJO注释(普通的旧Java对象).

EJB 3.0 has taken a much more Spring-like approach of dependency injection (sort of) and annotations of POJOs (plain old Java objects).

Servlet和JSP在2001年开始流行.Struts在那时或之后不久就开始流行,直到几年前才开始流行.现在,它已经被其他更现代的Web框架所超越(例如Struts 2-尽管名称为Spring MVC,Seam等,但与Struts 1并没有真正的联系.)

Servlets and JSP were big in 2001. Struts began then or soon thereafter and was big until a few years ago. It's now been surpassed by other more modern Web frameworks (like Struts 2--no real relation to STruts 1 despite the name--Spring MVC, Seam and so on).

这些天来最大的事情-不仅在Java中-融合了Web和RIA.如今,Flash/Flex和Javascript/HTML/CSS(以及其他框架)在这里占据了主导地位(是的,虽然有GWT,但它的支持者很少).

The big thing these days--not just in Java--is of coruse the Web and RIAs. Flash/Flex and Javascript/HTML/CSS (plus frameworks) rule the roost here these days (and yes theres GWT but it has a small following).

Weblogic和Websphere的规模不及2001年的规模.JBoss仍然有很大的发展动力,但如今,我选择的应用服务器是Sun的Glassfish v2或v3 Prelude.

Weblogic and Websphere aren't as big as they were in 2001. JBoss still has a lot of momentum but my appserver of choice these days is Sun's Glassfish v2 or v3 Prelude.

IDE也已更改.JBuilder在2001年发展壮大.现在实际上只有三个:Eclipse,Netbeans和IntelliJ(按流行程度排序可能是probalby,但我更喜欢IntelliJ,它也是其中的唯一商业版).

IDEs have also changed. JBuilder was big in 2001. Now there are only really three: Eclipse, Netbeans and IntelliJ (probalby in that order of popularity but my preference is IntelliJ, which is also the only commercial one of the bunch).

这篇关于我如何最好地赶上Java的最新发展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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