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 27, 2012

Talking JavaOne with Rock Star Raghavan Srinivas

Raghavan Srinivas, affectionately known as “Rags,” is a two-time JavaOne Rock Star (from 2005 and 2011) who, as a Developer Advocate at Couchbase, gets his hands dirty with emerging technology directions and trends. His general focus is on distributed systems, with a specialization in cloud computing. He worked on Hadoop and HBase during its early stages, has spoken at conferences world-wide on a variety of technical topics, conducted and organized Hands-on Labs and taught graduate classes.

He has 20 years of hands-on software development and over 10 years of architecture and technology evangelism experience and has worked for Digital Equipment Corporation, Sun Microsystems, Intuit and Accenture. He has evangelized and influenced the architecture of numerous technologies including the early releases of JavaFX, Java, Java EE, Java and XML, Java ME, AJAX and Web 2.0, and Java Security.

Rags will be giving these sessions at JavaOne 2012:
  • CON3570 -- Autosharding Enterprise to Social Gaming Applications with NoSQL and Couchbase
  • CON3257 -- Script Bowl 2012: The Battle of the JVM-Based Languages (with Guillaume Laforge, Aaron Bedra, Dick Wall, and Dr Nic Williams)


Rags emphasized the importance of the Cloud: “The Cloud and the Big Data are popular technologies not merely because they are trendy, but, largely due to the fact that it's possible to do massive data mining and use that information for business advantage,” he explained.

I asked him what we should know about Hadoop. “Hadoop,” he remarked, “is mainly about using commodity hardware and achieving unprecedented scalability. At the heart of all this is the Java Virtual Machine which is running on each of these nodes. The vision of taking the processing to where the data resides is made possible by Java and Hadoop.”

And the most exciting thing happening in the world of Java today? “I read recently that Java projects on github.com are just off the charts when compared to other projects. It's exciting to realize the robust growth of Java and the degree of collaboration amongst Java programmers.”

He encourages Java developers to take advantage of Java 7 for Mac OS X which is now available for download. At the same time, he also encourages us to read the caveats.

Originally published on blogs.oracle.com/javaone.

Monday Jul 16, 2012

Introducing Groovy

Oracle developer Jim Driscoll has a new article up on otn/java, titled “Introducing Groovy,” that shows readers how to master the basics of Groovy, a general-purpose scripting language that runs on the Java Virtual Machine (JVM) – and, as Driscoll emphasizes -- one that can largely be viewed as a superset of Java.

He presents a “Hello World” program that can be understood as either a Java or Groovy program and will compile and run in either environment. Driscoll takes readers through the intricate connections and disconnects between Java and Groovy. For example, Groovy is public by default and “Groovy deals with String objects using double quotation marks with strings” which “allows for variable substitution”. And, “there are also strings with single quotation marks.”

Driscoll illustrates his points with copious code that illustrates how Java developers can tweak their own knowledge of Java to take advantage of Groovy’s strengths, so that, by the end of the article, the (Java-informed) reader more or less understands Groovy.

Check out the article here.

Wednesday Jun 20, 2012

Expressing the UI for Enterprise Applications with JavaFX 2.0 FXML - Part One

A new article, the first of two parts, now up on otn/java by Oracle Evangelist and JavaFX expert, James L. Weaver, titled “Expressing the UI for Enterprise Applications with JavaFX 2.0 FXML, Part One,” shows developers how to leverage the power of the FX Markup Language (FXML) to define the UI in enterprise applications.

As Weaver explains, “JavaFX 2.0 is an API and runtime for creating Rich Internet Applications (RIAs). JavaFX was introduced in 2007, and version 2.0 was released in October 2011. One of the advantages of JavaFX 2.0 is that the code can be written in the Java language using mature and familiar tools.”

He goes on to show how to use the potential of FX Markup Language, which comes with JavaFX 2.0, to efficiently define the user interface for enterprise applications. FXML functions to enable the expression of the UI using XML. “Classes that contain FXML functionality are located in the javafx.fxml package,” says Weaver, “and they include FXMLLoader, JavaFXBuilderFactory, and an interface named Initializable.”

Weaver’s article offers a sample application that shows how to use the capabilities of FXML and JavaFX 2.0 to create an enterprise app.

Have a look at the article here.

Thursday Mar 01, 2012

Laying Out a User Interface with JavaFX 2.0

Java Champion and JavaFX expert Jim Weaver has a new article up on otn/java, titled “Laying Out a User Interface with JavaFX 2.0,” in which he shows developers how to use the layout capabilities of JavaFX 2.0 to make nodes in a scene graph appear where they belong and with the appropriate size.

He provides an overview of the LayoutSansTearsSolution application, shows how to make use of the SceneBuilder and BorderPaneBuilder classes, and helps readers understand the behavior of resizable nodes. Weaver explains the distinction between clamped and unbounded nodes and, finally, shows how to use CSS style sheet properties to modify the layout.

From the article:

“JavaFX has very powerful features for laying out a user interface... These features enable your applications to appear the way you want them to appear, regardless of the size of the scene or the type of platform. Understanding the behavior of each type of layout class, as well as concepts such as clamped versus unbounded nodes, will go a long way toward helping you make the UI appear exactly the way you want it.”

Read the complete article here.

Monday Jan 09, 2012

Interfaces on Demand with CDI and EJB 3.1

A new article by Java Champion Adam Bien, up on otn/java, “Interfaces on Demand with CDI and EJB 3.1” explains that since Java EE 6, interfaces are no longer required by the container in order to realize common use cases, thus enabling developers to use them more consciously and strategically for the realization of business logic. Bien shows how interfaces can now be used as vehicles for encapsulation or abstraction, as they were originally intended.

From the article:

“There is nothing wrong with the abstraction of every implementation with an interface if such an approach can be clearly justified, but interfaces become dubious when you have to introduce artificial naming conventions to avoid name clashes…
Interfaces should be introduced only as a contract for already existing classes, for the realization of Strategy or Bridge patterns, or when you need to design an API, such as Java Database Connectivity (JDBC), Java Message Service (JMS), and so on. In typical business applications, this occurs in only a fraction of all cases.”
Read the complete article here.


Monday Oct 17, 2011

Greg Bollella and Eric Jensen on the Future of Cyber-Physical Systems with Embedded Java and Berkeley DB

At JavaOne 2011, Greg Bollella, Chief Architect for Embedded Java and Eric Jensen, Oracle Principal Product Manager and a former embedded developer, gave a session (25143) titled “Telemetry and Synchronization with Embedded Java and Berkeley DB”. Bollella has been a leader in the Embedded Java and real-time Java space since Java was first applied there.

The presentation offered a vision of the potential future of Cyber-Physical Systems (CPS), defined as, “a system featuring a tight combination and coordination between the systems computational and physical elements,” that was so powerful that even if the expectations turn out to be exaggerated, CPS technological change will, in a decade or so, significantly alter our lives in pervasive and unforeseeable ways. Bollella went so far as to say that CPS applications have the potential to dwarf the 20th Century IT Revolution.

He drew a contrast between where CPS applications are in use today and where they will be in use tomorrow.

Today: High confidence medical devices and systems; assisted living; process control (metal smelting, chemical plants, refineries); traffic control and safety; advanced automotive systems; energy conservation; environmental control (electric power, water resources, and communications systems); distributed robotics (telepresence, telemedicine); defense systems; manufacturing; smart structures; home automation; building automation; transportation (rail, air, water, road); retail systems (point of sale and monitoring); entertainment industry; mining; industrial control (power generation).

Tomorrow:  Distributed micro-power generation; highly advanced autonomous driver assistance features; networked autonomous automobiles; networked building automation systems; cognitive radio (distributed consensus about bandwidth availability); large-scale RFID-based servicing systems which could acquire the nature of distributed real-time control systems; autonomous air traffic control; advanced industrial and home networked robotics; intelligent traffic control systems; intelligent autonomous power (gas/electricity); distribution systems; networked personal medical monitoring devices.

A lot to take in – the technology all around us growing in intelligence! In 2009, 3.9 billion embedded processors were shipped – the number is expected to double to roughly 8 billion by 2015. Some predict that by 2025 the number will be well into the trillions. And currently, an estimated five times more embedded software is written than all other software today. If the reality is anywhere close to the projections and estimates, we are in for an interesting ride on some intelligent transport.

Telemetry

Bollella went on to discuss telemetry, a term frequently used by NASA and defined as a technology that “allows remote measurement and reporting of information”. Central to telemetry is the idea that the information does not persist on the device after measurement. Uses of telemetry in the automotive realm include streaming operational data from the vehicle to the manufacturer’s IT system for analysis, services for vehicle operator, failure prediction, and feedback to design teams on wear and failure rates. For industrial automation, telemetry is used for failure prediction and to process monitoring and reporting

Synchronization

Bollella explained that his use of synchronization is idiosyncratic to database technology and involves two synchronized databases containing the same set of data and relationships. Any change in one database appears (after some indeterminate delay) in the other. The information on the device persists on the device as long as it does on the backend

The use cases for synchronization are widespread and include:

•    Healthcare: Telemedicine, Home health systems, Mobile health practitioners
•    Industrial: Manufacturing, Mining
•    Energy: Smart Grid, Energy Management
•    Entertainment: TVs, set top boxes, automotive rear-seat entertainment
•    Distribution/Shipping: Everything from local deliveries to transoceanic cargo shipments
•    Government: Border Control, Resource Management, Customs, Immigration, Land Management, Forest Service, etc
•    Law Enforcement/Military: Police officers and soldiers in the field, also aboard Naval vessels
•    Retail: Real time inventory linked to point-of-sale transactions
•    Distribution/Shipping: Everything from local deliveries to transoceanic cargo shipments

Bollella acknowledged that serious development challenges remain. The current state of CPS connectivity is poor, with the vast majority being standalone. Given the highly connected world of social networking, mobile devices, and the web, this might be surprising. But it is important to consider that these are two technological areas have evolved in environments with different demands. CPS is focused on real-time, predictability, safety, security, and fault tolerance; the Web is a different matter.

CPS requires real-time with predictable control loops -- there are no standard communication protocols or Ethernet or “IP-over” functionality on devices. There are harsh environments, especially in spacecrafts, that can affect wired Ethernet, and there exists incompatibility of data formats and communication protocols with IT standards.

Perhaps of greatest importance, there has been little perceived need for CPS connectivity with devices. But this is changing rapidly, and with it, obstacles are being overcome as one of the major trends in embedded is connectivity development. Bollella admitted that there were a lot of unknowns going into the future, but the challenges are not insurmountable.

Oracle’s Eric Jensen took over and gave some details about the Oracle Berkeley DB and the Oracle Database Mobile Server, which he characterized as the best way to synchronize mobile or embedded applications that utilize SQLite or Berkeley DB with an Oracle backend. The embedded Java platform, when coupled with Berkeley DB and Database Mobile Server, has the ability to manage networks of embedded devices using existing enterprise frameworks in a way that could prove to be quite revolutionary

It will be interesting to look back in 10 years and see how much Cyber-Physical Systems have, or have not, changed the world.

Interfacing with the Interface: JavaFX 2.0, Wiimote, Kinect, and More

Oracle’s Java Technology Evangelist Simon Ritter, one of the most fun-loving Java developers I know, with a long history of JavaOne gadgetry, gave a session (25011) at JavaOne 2011 on Wednesday afternoon showing how “open source APIs for the Kinect, the Wiimote combined with a tilt-compensated compass, a head-mounted stereoscopic display, and some old Sun SPOTs can build a truly immersive application.” The large audience appeared immersed throughout the session in Ritter's colorful and clearly delineated demos.

Simon RitterHe explained that the way we interact with computers is rapidly changing and that the days of the keyboard and mouse are gone. (Maybe so, but I'm sitting here using a keyboard and mouse.) And with his usual dramatic flair, Ritter invited attendees to behold the rise of something he calls the “gestural interface”.

The presentation used the latest JavaFX 2.0 "pure Java" implementation and began with an overview of the different components being used and explained how they are all brought together to enable the user to interact with interfaces in ways never before possible. Building an interface with the new JavaFX 2.0, Simon pointed out, is a continuation of the JavaFX product line, which is now a Java API with no scripting language and most APIs ported across while features such as binding and animation have required more thought. JavaFX now embraces more web technologies and enables the use of CSS for all JavaFX controls and a web specification for Drag-and-Drop. Also, developers use Scenegraph instead of DOM. He pointed to both pro’s and con’s of using JavaFX with gestural interfaces. On the plus side, it has built-in features such as data binding and animations, is a relatively simple API, and is able to build rich, visually appealing interfaces. On the negative side, JavaFX is currently limited to a 2D environment. The engineering team is currently working on 3D support.

He contrasted this with jMonkey Engine (jME), a game engine made especially for modern 3D development, written purely in Java and consisting of a collection of libraries that has game engine facilities and a full physics engine, but is hard to program and focuses on games and not generic interfaces. Ritter proceeded to demonstrate how to use the Nintendo Wiimote with a Java interface. The Wiimote communicates using a Bluetooth stack that needs to support L2CAP, has JSR-82 Java Bluetooth API implementation plus Wiimote-specific Java APIs (IR sensors, accelerometer, etc), most of which is free and open source.

He then presented a demo making use of the Sun Spot controller, a gyro sensor for precise rotation data, three bend sensors for finger movement for head tracking and data gloves, hand and head tracking sensors and hardware and more.

This followed with a demo using the Kinect Sensor with Java for 3D sensing. Not to be lost are his larger points: Java is still a really cool and powerful language. It is easy to interface with exotic hardware using free and open source libraries to build interesting applications using modern hardware.

After a brief Q&A, Simon -- as he always does -- implored attendees to be inspired and go build their own FUN stuff.

Thursday Aug 18, 2011

Templating with JSF 2.0 Facelets

A new article on otn/java, “Templating with JSF 2.0 Facelets,” by Deepak Vohra, offers a concise explanation of how to use Facelets, which in JavaServer Faces (JSF) 2.0, has replaced JavaServer Pages (JSP) as the default view declaration language (VDL). With Facelets, developers no longer need to configure a view handler as they once did in JSF 1.2.

From the article itself:

“Facelets is a templating framework similar to Tiles. The advantage of Facelets over Tiles is that JSF UIComponents are pre-integrated with Facelets, and Facelets does not require a Facelets configuration file, unlike Tiles, which requires a Tiles configuration file.

JSF Validators and Converters may be added to Facelets. Facelets provides a complete expression language (EL) and JavaServer Pages Standard Tag Library (JSTL) support. Templating, re-use, and ease of development are some of the advantages of using Facelets in a Web application.

In this article, we develop a Facelets Web application in Oracle Enterprise Pack for Eclipse 11g and deploy the application to Oracle WebLogic Server 11g. In the Facelets application, an input text UIComponent will be added to an input Facelets page. With JSF navigation, the input Facelets page is navigated to another Facelets page, which displays the JSF data table generated from the SQL query specified in the input Facelets page. We will use Oracle Database 11g Express Edition for the data source. Templating is demonstrated by including graphics for the header and the footer in the input and the output; the graphics have to be specified only once in the template.”

Read the complete article here.

Thursday Jun 02, 2011

Managing Resources with Java 7

A very clear and detailed article by Julien Ponge, titled “Better Resource Management with Java SE 7: Beyond Syntactic Sugar,” presents the Java 7 answer to the automatic resource management problem in the form of a new language construct, proposed as part of Project Coin, called the try-with-resources statement.

Java applications frequently manipulate different types of resources such as files, streams, sockets, and database connections that require system resources for their operations. They must be managed with great care or risk having database connections and file descriptors remain open after an exception occurs elsewhere in the code. As a result, application servers may need frequent restarts due to resource exhaustion.

The article provides an overview of resource and exception management before explaining the essentials of try-with-resources statements. It then shows how a class can be made ready to support such statements, and concludes with a demystification of the syntactic sugar behind the language extension.

Ponge concludes that the try-with-resources construct “generates correct code on behalf of the developer, eliminating the need to write boilerplate code that is easy to get wrong. More importantly, this change has been accompanied with evolutions to attach one exception to another, thus providing an elegant solution to the well-known problem of exceptions masking each other.”

Read the rest of the 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