Friday Sep 06, 2013

Java Champion/Rock Star Adam Bien at JavaOne 2013

Java Champions are developers who have made important contributions to the Java community; JavaOne Rock Stars are developers who have given highly rated sessions at JavaOne. Adam Bien is both – and one of the most distinguished Java developers in the community. He is an Expert Group member for the Java EE 6/7, EJB 3.X, JAX-RS and JPA 2.X JSRs and is an architect and developer for Java SE and Java EE projects. He has edited several books about JavaFX, J2EE, and Java EE, and is the author of Real World Java EE Patterns—Rethinking Best Practices, and Real World Java EE Night Hacks.

Bien is a Top Java Ambassador 2012, and JavaOne 2009, 2011, 2012 Rock Star. If all this were not enough, he was, in 2010, named Oracle Magazine’s Java Developer of the Year.

His 2013 sessions include:

CON2196: “Lean and Opinionated Java EE 7 Applications”
CON2229: “Architecting Enterprise JavaFX 8 Applications”
CON2230:  “Unit Tests Don’t Break: Stress-Testing Java EE Applications”
CON2231: “Demystifying Java EE”
UGF10369: “Cool NetBeans Tips and Tricks for Java EE 7 Development”

Q: Tell us about your JavaOne sessions.

Bien: In “Cool NetBeans Tips and Tricks for Java EE 7 Development,” I will introduce my favorite NetBeans features. I think I may surprise some attendees with NetBean's productivity and effectiveness.

In “Architecting Enterprise JavaFX 8 Applications,” I would like to introduce a Model View Presenter Architecture with Dependency Injection based on a "framework," only containing two classes. I would also like to highlight the interaction with SceneBuilder, the JavaFX WYSIWYG editor, without being too heavily dependent on it.

In the session "Demystifying Java EE," I will discuss some recurring misconceptions about the concepts and inner workings of Java EE. There is no magic in Java EE – Java EE 7 is very effective, if you follow some rules.

In “Lean and Opinionated Java EE 7 Applications,” I will introduce opinionated approaches and best practices for the design and implementation of Java EE 7 applications. I'm probably going to shock some architects, but the developers should like this session.

In “Unit Tests Don’t Break: Stress-Testing Java EE Applications,” I plan to stress test a Java EE 7 application and monitor the results in real time. Stress testing is incredibly important and sometimes not even a part of the development cycle.

Q: In addition to your sessions, what do you have planned for JavaOne?

Bien: JavaOne is one of the few conferences where I attend other sessions -- from dawn to dusk. In recent years there was not always time to pick lunch. At NetBeans/GlassFish days before JavaOne I will probably meet some Java friends, while at the actual JavaOne I’ve never managed to do that. The technical content is too good and there is not enough time between the sessions.

Q: Tell us about what’s happening with Enterprise JavaFX 8 apps.

Bien: In the recent edition of airhacks.com I started with HTML 5, but most of the attendees waited for Java FX 8 news. There are a lot of Swing applications out there. Migration from Swing to JavaFX is one of the FAQs. Also JavaFX is "just" Java. You can develop now from the User Interface to the back end using the same language, tools, and environments. You can use the same debugger, profiler or memory analyzer for all of your application tiers and layers. JavaFX suits perfectly enterprise application needs.

Q: What have you been working on lately?

Bien: I’ve helped my customers implement Java EE 7 and JavaFX applications. Also, I ported lightfish.adam-bien.com to Java EE 7 and GlassFish v4 and was even able to simplify the code. I also ported Apache FTP Mina to JavaEE7: http://e2ftp.adam-bien.com

Q: What are your expectations for Java EE 7? For Java SE 8?

Bien: I was already very happy with Java EE 6, so Java EE 7 can only exceed my expectations. I'm using daily builds of JavaFX coming with JDK 1.8 for my "leisure" activities. Here I would expect more stability and even better performance. 

Q: How do you assess the state of Java today?

Bien: Java is more interesting for building apps, than ever. And the interest is huge. This year there is an increased tendency to sell out workshops, sessions and conferences. Java 8 together with Java EE 7 and JavaFX 8 will make it even more interesting.

Java has only one problem: its age. We tend to forget how performant, scalable, ubiquitous, and "cutting edge" the Java ecosystem actually is.

Q: What should Java developers understand about unit testing?

Bien: Don't overdo it. Statistics do not matter. Test complex stuff first -- and there is no difference between writing tests for Java SE and Java EE applications

Q: Tell us about ways NetBeans can be used for Java EE 7 development?

A: With NetBeans I'm still able to surprise seasoned developers with productivity without any magic. As a contractor/freelancer I really don't like to spend any time with IDE maintenance and setup. With NetBeans I'm able to set up my full Java EE environment in about a minute on Linux, Windows or Mac. Without any plugins, configurations or restarts. For that reason, I'm using NetBeans daily builds without any friction. What I like the most: NetBeans supports me with integrated code completion, JavaDoc, hints and occasional helpers on demand (like, e.g., creation of beans.xml or persistence.xml) without excessive code generation or opaque wizards. You can achieve 80% with two shortcuts: ctrl + space and alt + enter.

Adam Bien’s Blog

Thursday Sep 22, 2011

Integration Testing for Java EE

A new article by Java Champion Adam Bien, now up on otn/java, titled “Integration Testing for Java EE,” explores the intricacies of integration testing, which is done after a successful execution of unit tests, which however, will often fail. According to Bien, unit tests are fast and fine-grained while integration tests are slow and coarse-grained.

From the article:

“Testing everything inside an embedded container is convenient but unproductive. Java EE 6 components are annotated Plain Old Java Objects (POJOs) and can be easily unit tested and mocked out (see my previous article, “Unit Testing for Java EE.") with Java SE tools such as JUnit, TestNG, or Mockito. Using an embedded container to test your business logic is not only unproductive, but it is also conceptually wrong. Unit tests should validate your business logic, not the container behavior. Also, the majority of integration tests could be easily performed with a local EntityManager (see Listing 1) or a mocked-out container infrastructure. Only a fraction of all integration tests can be beneficially implemented with embeddable containers or test frameworks such as Arquillian.”

Read the complete article here.

Wednesday Sep 07, 2011

Unit Testing for Java EE tech article on OTN

A new article, titled “Unit Testing for Java EE,” by Java Champion Adam Bien, is up on otn/java’s front page. Bien points out that too many developers believe that testing Java EE applications is too hard, inconvenient, or complex, something that has not been true since the advent of Java EE 5 more than five years ago.

Bien explains: “There is nothing special about unit testing Java EE 6 applications. You only have to add the JUnit library into your pom.xml file (see Listing 5) and put your classes into the src/test/java directory. All JUnit tests will be executed automatically during the standard Maven lifecycle: mvn clean install.”

He goes on to make use of “Mockito” an easy-to-use, open source mocking library. Bien writes:

“Mockito is able to create ‘smart proxies’ (a.k.a. mocks) from classes or interfaces. These proxies do not come with any behavior, but they are still perfectly usable. You can invoke methods, but will get the default values, or null, back. The behavior of the mocks can be recorded after their creation with when(mock.getAnswer()).then(42) syntax.

Mockito is perfectly suitable for ‘simulating’ any inconvenient classes, resources, or services. You can start with Mockito just by knowing a single class org.mockito.Mockito. The when-then ‘domain specific language’ is composed of static methods from the Mockito class. The org.mockito.Mockito class is well documented. In fact, the whole documentation set was generated from the JavaDoc markup in the org.mockito.Mockito class.”

Read the complete article here.

About

Insider News from the Java Team at Oracle!

duke
javeone logo
Links


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
2
5
6
7
12
13
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today