Monday Oct 14, 2013

JavaOne 2013 Review: Java Takes on the Internet of Things

A new article, now up on otn/java titled “JavaOne 2013 Review: Java Takes on the Internet of Things,” takes a look back at the lively happenings at JavaOne 2013, which reprised the 2012 JavaOne "Make the Future Java" theme. The articles quotes JavaOne keynoter Peter Utzschneider, Vice President, Java Product Management at Oracle, who said, "There is a lot going on in the industry, with massive shifts and innovation happening which pose huge challenges and opportunities for Java."

He observed that Oracle shares a common goal with the Java community—to make Java better, stronger, more robust, and relevant for decades to come.

The article reviews the extraordinary success of the Java platform:
* There are 9 million Java developers worldwide.
* It's the #1 choice for developers.
* It's the #1 development platform.
* 3 billion mobile phones run Java.
* 100 percent of Blu-ray disc players ship with Java.
* 97 percent of enterprise desktops run Java.
* 5 billion Java Cards are in use.
* 7 billion Java Cards have been sold.
* 89 percent of desktops run Java.
* 125 million TV devices run Java.
* Five of the top-five OEMs ship Java.

A central theme of JavaOne 2013 was how Java makes a perfect fit for the coming Internet of Things (IoT):

“First,” the article points out, “the Internet of Things (IoT) is here to stay and is likely to alter our daily lives in coming years. As embedded devices get cheaper, more powerful, and more connected, and as the IoT grows, Java developers will face radical new challenges—not the least of which is security. Along with this, cloud computing has taken hold, complementing the IoT and making big and fast data available and ready to be analyzed.”

Nandini Ramani, VP of Engineering, Java Client and Embedded Platforms, Oracle, pointed out that the Java platform is in the process of being unified: "First, Moore's Law is making devices more capable. Second, Java SE is being shrunk to fit into the embedded space and smaller devices. And third, Java ME is being brought up to be in parity with Java SE."

Find out about the Duke’s Choice and Java Community Process Awards, the JavaOne DEMOgrounds, the JavaOne Codegarten and much more.
Link to it here.

Monday Sep 23, 2013

The JavaOne 2013 Technical Keynote

by Timothy Beneke

Mark Reinhold, Oracle’s Chief Architect, the Java Platform Group, took the stage to kick off Sunday’s technical keynote at the Moscone Center. He began by quoting “father of Java” James Gosling. For Java to thrive, it must maintain what Gosling called the “feel of Java”. In other words, it must retain the key values of readability, simplicity, and universality.

“If we keep those,” said Reinhold, “then Java will remain not just productive but fun. It is not enough to simply add popular features each year.”

Lambda Expressions – The Single Largest Upgrade Ever
He turned to lambda expressions, which he described as the single largest upgrade to the programming model ever -- larger even than generics. “This is the first time we have done a carefully coordinated co-evolution of the JVM, the language, and the libraries all together – and the results still feel like Java,” said Reinhold.

He then welcomed Oracle Java Language Architect, Brian Goetz, to share the stage and began by remarking that while most developers understand that lambda offers a simple way to express code as data, some are not sure how it helps Java. Goetz responded that lambda expressions would more than help Java. “It’s going to change the way we all program in Java every day,” he explained. “Programming well is about finding the right abstractions. We want the code we write to look like the problem statements it’s trying to solve, so we can look at it and immediately know it’s correct. Java has always given us good tools for abstracting over data types. I wanted to do better in abstracting over patterns of behavior – that’s where lambda comes in.”

He illustrated this with some simple code that was, strictly speaking, “good” code, but weighed down with boilerplate and did not read like the problem statement it was trying to solve. It could be improved by using an inner class tool, but that too generated a lot of boilerplate. Reinhardt pointed out that improving the code made it less pleasant to work with, as if the developer was being punished for doing the right thing. This often causes developers to give up and do it the “dumb and ugly way”.

Lambdas can replace inner classes with a lambda expression which is simply an anonymous method that captures a behavior without a lot of syntactic boilerplate. “Lambdas are a nicer syntax,” said Goetz. “But they are also something deeper. It’s not just a compiler generating inner classes for you – it uses the invokedynamic feature to get more compact and higher performance code. It will make a qualitative difference in the way we program.”

If the right way to write a program is unpleasant, then people are less likely to do it according to Goetz. They are more tolerant of doing it the wrong way. He gave an example of how lambda expressions address this with the collections API involving a new abstraction to the JDK called stream and showed how to represent a simple query through applying a filter and mapping transformation, followed by an aggregation, in a way that is fused into one path without creating any intermediate weapons.

Reinhold summarized the key points: “So lambda brings 3 weapons to Java – syntax, performance and abstraction.”

“Plus parallelism,” Goetz added. He explained that Java 7 has the fork/join framework for parallel decomposition that is powerful, flexible, and highly efficient – but not the easiest thing to use. Goetz showed how lambdas enable better parallelism without needing to write fork join code: by asking the collection for a parallel stream it uses fork/join under the hood.

Lambda also helps with normal sequential code by making code clearer, less noisy, and easier to read. “When you have code that is hard to read, that’s where bugs come from. You are trying to maintain some code, you look at the code and think you know what it does, but don’t actually know what it does, and boom! – you’ve introduced a bug.”

All in all, the message was clear: Lambda expressions make Java code easier to read and easier to write.

Working with Lambda and the Collections Framework
For lambdas to be successful, they must work with the Java Collections Framework, which is now 15 years old. So an evolution of the interface was in order. Goetz’s team had to grow an interface over time without breaking implementations of the interface. They added a concept that allows developers to compatibly add a method to an interface, as long as a default implementation is provided.

Reinhold remarked that he has now written a couple of thousand lines of code with lambda features and really enjoyed it. “I can be more productive, and the end result still feels like Java,” he said.

To get started learning lambda expressions, Java developers can go to the OpenJDK Project Lambda page and download the developer preview builds there.

Reinhold reminded attendees that there is a great deal more in Java SE 8 besides lambda expressions. Developer preview builds can be downloaded at JDK8.java.net. “Now is a great time to download JDK 8 and take it for a spin. Every planned feature is in there. It’s reasonably stable and it passes almost all of the tests. If you have any feedback, please send it in!” said Reinhold. 

Playing Chess
In the rest of the technical keynote, Oracle’s John Ceccarelli, head of engineering for Oracle’s NetBeans team and Oracle’s JavaFX architect Jasper Potts, arrived on stage to demonstrate a Duke pad running real Java via a chess program that was connected to a server. The iPad operated through an HTML5 client talking to a Java EE 7 back end with an EE server in charge of  messaging, communication, game state, and so on, with clients hook into it – all built with NetBeans. Jasper Potts further showed off the chess demo with an HTML5 client using a front end to a chess server that was managing the chess games. Then a robot, powered by Java ME 8, took over the game.

Oracle Software Engineer, Santiago Pericas Geertsen, who built the chess server, also described how it was built with 5 distinct functional modules.

In sum, attendees witnessed a server running Java EE 7 hooked up with a variety of clients, some written in HTML5, one written in JavaFX on a Duke pad, one using JavaFX 3D on a powerful laptop, plus a Java ME 8-powered robot contributing to the ongoing chess game. In the process, the powers of the Raspberry Pi were demonstrated.

Developers were encouraged to jump in the water, go for a swim, and have fun with NetBeans and Java embedded.

Java SE 9 and Beyond
Wrapping it up, Reinhold peered a bit into the future and suggested some possible directions for Java, some of which are already in development:

One is Java on GPUs, graphic processing units. As GPUs are being used more and more widely to process big data he suggested that it would be good to make Java work directly with the GPU rather than having to call out to some primitive interface. An OpenJDK called Sumatra has people working on this.

Reinhold spoke of the need for reification. Java’s generics, added in 2004, are based on the notion of erasure for good technical reasons as a sound way to create a type system that supports migration compatibility. But this creates programming problems in which the erasure approach severely limits what can be expressed. Reinhold suggested that introducing some reification and eliminating the “annoying dichotomy between primitive and reference types” would be of value.

He mentioned JNI 2.0 and said, “It just shouldn’t be so hard to integrate Java with native code after all these years.”

He called for memory efficient data structures: “As we get into big data – all this boxing and pointer chasing makes it hard to do big data well. We could have less boxing and pointer chasing and load a lot more data into memory.”

Finally, he talked about the notion of a truly modular platform. “The compact profile in Java 8 is a start but it is not flexible enough. We need to continue to unify the Java SE and Java ME platforms.”

JDK 8

OpenJDK Project Lambda

Watch Keynote and Session Highlights on Demand

Friday Sep 13, 2013

An Interview with Venkat Subramaniam before JavaOne

JavaOne Rock Star and Java Champion, Venkat Subramaniam, sees a lot to be excited about with regard to Java.[Read More]

Tuesday May 07, 2013

Live OPN PartnerCast: Java Update

Tune in on May 8th at 10:00am Pacific for a LIVE PartnerCast focused on Java updates, hosted by Geoff Morton, Group Vice President of Worldwide Java Sales.


The agenda is:

- Oracle Java Embedded Technologies with Edward Zou, Vice President, Product Management, Oracle
- Oracle's Device to Data Center Platform with Henrik Stahl, Senior Director, Product Management, Oracle
- Eurotech M2M Technical Building Blocks Based on Oracle Java Embedded technologies and Hitachi SuperJ OSGi platform with Hilary Tomasson, VP Marketing, Eurotech North America

Viewers will be able to participate in the live Q&A during the show by asking questions through twitter @oraclepartners and using #OPN.

To watch this event, please visit Oracle PartnerNetwork homepage on May 8th, 2013 at 10:00 AM PST.

Friday Oct 12, 2012

JavaOne 2012 in Review

Noted freelance writer Steve Meloan has a new article up on otn/java, titled, “JavaOne 2012 Review: Make the Future Java” in which he summarizes the happenings at JavaOne 2012.

Along the way, he reminds us that if the future turns out to be anything like the past, Java will do fine:

The repeated theme for this year's conference was ‘Make the Future Java,’ and according to recent stats, the groundwork is already firmly in place:

    There are 9 million Java developers worldwide.
    Three billion devices run Java.
    Five billion Java Cards are in use.
    One hundred percent of Blu-ray Disc players ship with Java.
    Ninety-seven percent of enterprise desktops run Java.
    Eighty-nine percent of PC desktops run Java.

This year's content curriculum program was organized under seven technical tracks:

    Core Java Platform
    Development Tools and Techniques
    Emerging Languages on the JVM
    Enterprise Service Architectures and the Cloud
    Java EE Web Profile and Platform Technologies
    Java ME, Java Card, Embedded, and Devices
    JavaFX and Rich User Experiences”

Meloan artfully reminds us of how JavaOne makes learning fun.

Have a look at the article here.

Monday Sep 10, 2012

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

A new article by Oracle’s Java Champion Jim Weaver, titled “Expressing the UI for Enterprise Applications with JavaFX 2.0 FXML -- Part Two,” now up on otn/java, shows developers how to leverage the power of the FX Markup Language to define the UI for enterprise applications. Weaver, the author of Pro JavaFX Platform, extends the SearchDemoFXML example used in Part One to include more concepts and techniques for creating an enterprise application using FXML.

Weaver concludes the article by summarizing its content, “FXML provides the ability to radically change the UI without modifying the controller. This task can be accomplished by loading different FXML documents, leveraging JavaFX cascading style sheets, and creating localized resource bundles. Named parameters can be used with these features to provide relevant information to an application at startup.”


Check out the article here.





Tuesday Mar 13, 2012

Key to the Java EE 6 Platform: NetBeans IDE 7.1

Oracle’s Geertjan Wielenga has a new article up on otn/java, titled “Key to the Java EE 6 Platform: NetBeans IDE 7.1,” in which he shows how the NetBeans IDE provides the tools, templates, and code generators to support Java EE 6 and its main specifications.

He initially observes that, “When you begin to grasp the breadth and ambition of the Java EE 6 Platform, which covers everything from the model (JPA and Bean Validation), to the controller (EJB and Servlets), to the view (JavaServer Faces), a simple entry point is difficult to find. Enter NetBeans IDE 7.1, which is Oracle’s IDE for the Java Platform, created by the same group of developers who created the Java EE 6 Platform. Here you find tools, templates, and code generators intended to be used in combination with the set of specifications that the Java EE 6 Platform encompasses.”

After offering a tour of the NetBeans IDE 7.1 tools that support Java EE 6, Wielenga ends on a cautionary note:

“While code generators and tools such as those described here are great to help you get your feet wet, a danger is that a lot of code is generated that you don't understand and that you therefore do not know how to debug and maintain. The good news is that far less code needs to be generated in Java EE 6 than before, making it far easier to understand and maintain.

Nevertheless, it is advisable to use tools of this kind intelligently. Start small, focusing on specific APIs. Get to know them via the generated code and then slowly extend the application as you become more familiar with the Java EE 6 Platform. Once you are comfortable with the spec, the tools aim to help you become more productive: combining the leanness of the Java EE 6 Platform with the tools in the IDE, you'll be rapidly creating the core of your application.”

Check out the article.


Wednesday Feb 15, 2012

GlassFish Adds Agility to Java EE Deployment

A new article by Julien Ponge on the front page of otn/java, titled “Adding Some Agility to Java EE Application Deployment with GlassFish,” reports on four noteworthy features in GlassFish that increase agility to Java EE application deployment.

* Session data preservation across redeployments

* Servlet fragments

* Application-scoped resources

* Application versioning

The article relies on a running example called TaskEE, a simple task list application that functions as a deployable application in which tasks are stored in a volatile Web session. Ponge shows how to morph TaskEE into TaskEEPA in order to store tasks in a relational database rather than a Web session.

Directly from the article:
“Deploying and managing Java Platform, Enterprise Edition (Java EE) applications seems like a fairly established activity. Applications can be deployed, undeployed, and upgraded through a combination of deployment and undeployment. Applications use various types of resources, such as JDBC connection pools or Java Message Service (JMS) destinations. Such resources need to be created, configured, and administered using an application server means, such as configuration files, command-line tools, and graphical interfaces. While the tasks do not vary much from one Java EE application server to another, each one is free to provide a broader set of features that make the developer’s and the infrastructure team’s jobs more enjoyable.”

Read the complete article here.

Monday Oct 17, 2011

Getting Started with Embedded Java -- Sense, Control, Connect, Store, Sync

At JavaOne 2011, Terrence Barr, Senior Technologist, Mobile & Embedded, Oracle Germany, presided over a two-hour HOL (Hands-On-Lab) on Monday in which he taught developers how to build an embedded Java solution that senses and controls the environment, stores data, and connects to back-end databases for synchronization and further processing. The session offered considerable detail along with step-by-step exercises as participants learned how to create the embedded EnviroTracker system and application which tracks and processes environmental data. The application interfaces with a microcontroller to read sensor input (ambient light brightness), to control output (and LED), and then further processes the sensor data.

The lab focused on:
• The benefits of Java technology in the embedded space
• The components of embedded Java platforms
• Setting up an embedded Java platform
• Interfacing between the embedded Java platform, the microcontroller, and I/O
• Accessing and controlling I/O from Java
• Processing sensor data

Barr took developers through seven basic tasks or exercises:

1. Create the EnviroTracker
2. Install the OJEC (Oracle Java ME Embedded Client) on the Development Host
The Oracle Java Micro Edition Embedded Client (OJEC) implements the CDC Platform configuration.
3. Develop and Test Your First Embedded Java Application..
4. Install OJEC on the Target Platform and Run Your Java Application
5: Understand I/O and the Arduino Microcontroller
6: EnviroTracker V1: First Contact
7: EnviroTracker V2: Continuous Monitoring and Processing

By the end of a rigorous and demanding, but satisfying two hours, attendees had built a real-world embedded system and created the EnviroTracker Application to track environmental sensor data. They learned how to install and use embedded Java runtimes and tools, and how to interface with I/O devices and microcontrollers from Java applications.

The take home message: Creating sophisticated embedded Java systems and applications is easy due to the platform independence of the Java language and runtime, the scalability of pre-existing Java skills to embedded development, and the comprehensive support provided by mature and feature-rich developer tools.

For more info, go to Terrence Barr's blog.

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