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

Sunday Sep 22, 2013

At the JavaOne 2013 Strategy Keynote

by Janice J. Heiss and Timothy Beneke

JavaOne 2013 – the 18th JavaOne Conference -- kicked off at San Francisco’s Moscone Center with two very thoughtful and illuminating presentations by Peter Utzschneider, Vice President, Java Product Management, and Nandini Ramani, Vice President of Engineering, Java Client and Embedded Platforms, both of Oracle. Together, they presented a vision of Java adroitly adjusting to an industry, and even a world, that is undergoing rapid change as we enter the Internet of Things. 

Utzschneider began by celebrating the very fact of JavaOne 2013, which offers more than 400 sessions, with attendees from no fewer than 92 countries and a wealth of educational and other festivities, including a “Codegarten” where developers can improve their coding skills, plus a code challenge using the Raspberry Pi. He gave a brief update on the thriving state of Java, which is showing a 10% increase in Java User Groups, a major new release of Java EE 7, increasing readership of Java Magazine, along with a strong and growing Java community.

He suggested that it is important for developers to remember that Java remains the number one development platform in the world with most of the infrastructure that powers the web running on Java.

As he spoke, an accompanying slide displayed Java’s success:

*    9 Million Java Developers Worldwide
*    #1 Choice for Developers
*    #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 in Use
*    7 Billion Java Cards Sold
*    89% of desktops run java
*    125 million TV devices run java
*    5 of top 5 OEMs ship java

The theme of JavaOne 2013, “Make the Future Java” is unchanged from last year’s, for a very good reason, according to Utzschneider. “There is a lot going on in the industry,” he said, “with massive shifts and innovation happening which pose huge challenges and opportunities for Java.” The goal is to make Java better, stronger, more robust and relevant for decades to come.

He presented a slide that illustrated another key point. “The combination of mobility and social have created an incredible amount of new data, of people interacting, sharing and producing things with new services and new applications, all being driven by massive infrastructure, mostly running on Java,” he noted. Some 204 million messages are sent every minute, with 278,000 tweets, 20 million photos viewed and 11,000 professional searches via the Internet.

All of this activity is creating an enormous amount of data in many forms with growing volume and velocity. He noted: “Dealing with data – historical, real-time, future, large, small – is creating a whole new paradigm. We now have Big Data, fast data, all backed up through BI (Business Intelligence) and analytics. The data itself has become the life blood that allows developers to harness and innovate and build new applications.”

Utzschneider referred to the many non-human driven devices that will be coming on the Internet in the next two years – estimates vary between 10 and 50 billion. “When I looked at these numbers,” he observed, “I realized that once you get up into the billions, it doesn’t matter. It’s huge, real, and happening.”

He said that the devices are driven by Moore’s Law hitting the embedded space very hard, as devices become cheaper, more powerful and most important – connected. “This is the about the Internet of Things,” he said. “It will be a major game changer for Java developers and the larger community.”

He pointed out that the mobile devices we use today for applications and to connect with each other will become the ultimate remote controls of the future, which will help us interact with and control the physical world around us. Simultaneously, the shift to cloud-based development is now in full swing.

With this change, he noted, “We will have to rethink security and rethink how services can move from a container-based to a more service-based model. And we want to be able to move our applications from physical infrastructure to the cloud, but also be able to port it to a different cloud if we wish.”

He emphasized that in stewarding the Java platform, Oracle is committed to making the skills of Java developers applicable to the future.

JavaOne 2013’s First Demo
Utzschneider explained that, without knowing it, attendees had been participating in the first demo at this year’s JavaOne. “With partners, Hitachi Consulting and Eurotech, we have built an end-to-end demo with sensors above all the doorway portals which differentiate whether you are a dog or a human, whether you are coming or going, and feeding this data to a Java SE based application running on a gateway. After the computation is complete, it goes to the cloud, which has analytics and BI (Business Intelligence) applications, plus a Java-based application for visualization.”

The point of the demo is to demonstrate how, in a couple of weeks, using off-the-shelf Java componentry, a sophisticated demo could be built, and strung together, to prove the value of Java as an open standard applicable from the smallest devices all the way up to cloud-based development.

Nandini Ramani: Unifying the Java Platform
Nandini Ramani next shared the stage with Utzschneider, and began with an analysis of how Java has thrived on a diverse spectrum of devices and markets, resulting in implementations that have also become more siloed over the years. “Moving forward,” she remarked, “we believe it’s important to unify the platform, not just from an API perspective, but from a language perspective.”

She observed that Java SE 7, CDC, and CLDC, differ more than they share commonalities. From a language perspective, CLDC is still at the Java 1.3 phase, while Java SE is heading towards Java 8 early in 2014. The pace of Java ME has not kept up with Java SE.

“Java SE 8 is a huge step towards platform unification,” Ramani said. “With SE 8, we will release the Compact Profile and will replace CDC, so we will have one less implementation. We are also increasing commonality both from an API and a language perspective. This means that on the API front in ME 8 you will see familiar libraries like NIO, New Collections, and so on. With the language we will have annotations, generics, and even strings in switch.”

Developers will thus be able to use their skill sets across the entire Java spectrum instead of being restricted to being a Java ME or Java SE developer. With Java 8, developers will get code portability, commonality of APIs and common tooling from the smallest device all the way up to Java SE embedded to serverside Java SE.

She pointed to three things that are happening driving this unification. 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.

Java – The Logical Choice for the Internet of Things
Ramani remarked that Oracle is working with embedded partners to make Java a first-class citizen with their chip sets. Because there are so many vendors with different operating systems and device drivers, embedded development can be fragmented and challenging. “Everyone believes that there is a need for an open standard platform for the Internet of Things space that is coming – Java is the logical choice to address this market,” explained Ramani.

Utzschneider noted that some of JavaOne 2013’s partners like Freescale and Qualcomm come from the device side and are eager to make this happen. Freescale will be giving a talk prior to Thursday’s Community Keynote about why Java makes sense for the Internet of Things.

Ramani stated that in August of 2013, Oracle launched the Oracle Java Platform Integrative Program that first gives partners the ability to easily port Java Embedded to platforms that Oracle does not yet support; and second, it gives them the ability to extend the platform with their own libraries based on market verticals and segments, or health care, manufacturing, smart home, or industrial automation. This is part of a larger attempt to embrace and extend the Java ecosystem.

Qualcomm Conference Uplinq Hackathon Winner Andrew Sugaya
Next, a surprise. Someone was invited onstage who, a mere 12 days before, was unknown to Oracle. This was Andrew Sugaya, winner of the Grand Prize at the 2013 Qualcomm Conference Uplinq Hackathon. Sugaya works for APX Labs in the rapid development of augmented reality solutions for various applications. He explained how, at the Hackathon, he was given breakfast and a black box that he did not know how to use. Though he had coded in Java, he had never used Java ME before. He found it very easy to pick up and, using ME, he took the platform and took temperature and brightness data from it, pushed the data out to the network cloud, and into a server which processed the data and was able to change the color and brightness of different light bulbs.

“Now the craziest thing,” said Sugaya, “is that it’s not just the light bulbs – it could be anything. It could be a toaster, a beer mug, even the chairs you are sitting in now. Everything in the future is going to be connected. Some of the work I do at Apex labs is trying to interface with these devices that in the future will be everywhere. We do that through wearable devices.”

That he was able to accomplish this without ever having used Java ME before attests to its appropriateness for embedded devices. Utzschneider commented: “This is a good example of what should happen in the next couple of years. People should be able to deploy their Java skills, pick up a device and write code, and not have to worry about the things that have been problematic in the embedded space. You won’t have to write memory management from scratch before you can even get started. We are trying to put simplicity into the platform.”

Ramani pointed to features coming in Java SE 8 next year, including lambdas, Javascript engine Nashorn, and PermGen removal. Beyond Java 8, the modular Java is coming by way of Project Jigsaw. Oracle is considering a wish list of ideas from the Java community, some of which are in progress, such as Project Sumatra.

Developers were encouraged to check out early access of Java SE 8 and provide feedback. “Tell us what doesn’t work,” said Ramani. Oracle is also seeking feedback on Java ME 8 and the Raspberry Pi.

Java EE 7: Making it Easy to Develop Leading-Edge Enterprise and Web Applications
Sunday’s strategy keynote continued as Cameron Purdy, Vice President, Cloud Application Foundation, at Oracle, joined Peter Utzschneider onstage and talked about the release of Java EE 7 in the summer of 2013. Purdy explained that Java EE 7 had three primary areas of focus. First, it offered HTML5 support with such things as WebsSockets, Server-Sent events, JSON and RESTful support, all of which help developers build modern web-based application. Second, the enterprise aspect of Java EE always gets strong attention, so the adding of batch capabilities was important. Third, developer productivity was a key so Java EE 7 requires less boilerplate code through features like CDI (Context and Dependency Injection) and more annotated POJOs. 

Purdy pointed out that when Java EE 7 was announced in 2011, the major theme was cloud development. When it was released, the greatest focus was on support for HTML5. “There is a ton of work related to the cloud in Java EE 7,” he explained. “There is support for things like new security roles in the cloud and being able to automatically wire up a database and default resources, kind of like CDI at the application level, being able to pump a schema into that database or being able to easily consume RESTful services from one application to another. And lastly, with JavaServer Faces we can actually skin applications. If we have a multi-tenanted application we can skin it for each tenant.”

Looking ahead, Purdy said that the continual focus is on making it easy for developers to develop leading-edge enterprise and web applications. “We want to support the latest standards and keep these technologies relevant. We are working on JCache, an application that is coming to fruition. We are improving JSON binding and other technologies. The major focus is making it a vibrant technology that is relevant to what the industry is doing.”

Purdy remarked that EE 7 has gotten major support from the community and partners. “When EE 7 was launched the number of downloads and dial-ins and people watching web casts exceeded all of our expectations,” said Purdy. “It’s had a great reception.”

Open Sourcing Project Avatar
Peter Utzschneider reminded Purdy of Project Avatar, which Purdy announced in 2011. Purdy described its focus: “You take a simple Java EE application and then you start to build on the HTML5 capabilities that we introduced in EE 7. So, for example, we’re using WebSocket and Server-Sent events to provide programming models in addition to the typical request response. And adding support for NoSQL databases. And we’re leveraging Project Nashorn in Java SE to make the Java EE container polyglot. We’re extending EE to support Javascript and have node services running in a Java application server. We are also announcing today that we are open sourcing Project Avatar at avatar.java.net. It’s a brand new open source project with some pretty exciting stuff in there.”

Project Avatar

Watch Keynote and Session Highlights on Demand

Stay tuned for more on this 3-hour Sunday keynote, an information-packed combined strategy and technical keynote.



Tuesday Sep 17, 2013

A Conversation with Java Champion Johan Vos

A new interview is now up on otn/java. In it, Johan Vos, a highly regarded Java Champion whose focus is on combining the strengths of back-end systems and embedded devices, provides his insightful take on what’s happening in the world of Java technology. His favorite technologies are currently Java EE/Glassfish at the backend and JavaFX at the front-end. He is a co-author of Pro JavaFX 2, and will be offering two sessions at JavaOne 2013.  

In the interview, Vos summarizes his sessions:

“In ‘Building Social Software on Top of Java EE 7 with DaliCore,’ I’ll show how you can integrate social software functionality into Java EE 7 applications. Many enterprise applications can benefit from some kinds of integration with e.g., Facebook, LinkedIn, Twitter, etc., without jeopardizing the user’s privacy and without giving up ownership of the data. The DaliCore framework adds the concept of User and OnlineAccount to the Java EE world, and provides the coupling with existing social networks. This saves lots of project-specific boilerplate code. This approach works both in web-applications as well as in desktop applications.

In ‘DataFX: The Best Way to Get Real-World Data into Your JavaFX Application,’ Hendrik Ebbers and I will present DataFX 2, a framework that helps JavaFX developers to populate JavaFX controls with real-world data. Now that JavaFX is beyond the stage of demos and POCs, it becomes important that the fake data used in demos be replaced with real data, often coming from back-end servers and databases. Apart from the regular cases where a JDBC source or a RESTful web service is queried, we will also show how changes in the local data can be propagated to the backend again...”

In discussing his efforts to combine Java EE and JavaFX, Vos remarks: “I am convinced that these two technologies are complementary, and while they are completely decoupled, the combination of them can lead to great end-to-end projects. As a POC, and in order to get more realistic use cases that could benefit both DaliCore and DataFX, I started to write a JavaFX application that offers community functionality. The front-end of that application is written in JavaFX, and the back-end is using DaliCore on top of Java EE 7. In this application, lots of data is sent from and to the back-end.”

In addition, Vos discusses his experiences with Java EE 7 and Java SE 8, the revolution that lambda expressions bring to Java, the client aspect of Java, how JavaFX fits into Java SE 8, and much more.

Check out the interview here.

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]

Josh Juneau – Learning More at JavaOne

Jython expert Josh Juneau on Java development today.[Read More]

Simon Ritter Prepares to Show off Java SE 8 at JavaOne

Oracle’s Simon Ritter has more tricks up his sleeve with cars and hand-tracking devices.[Read More]

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

JavaOne 2013 with Markus Eisele: Sins and Security in Java EE

Markus Eisele shares his expertise on Java EE.[Read More]

Thursday Aug 15, 2013

Trying Out Lambda Expressions in the Eclipse IDE

A new article, now up on otn/java, by Deepak Vohra, titled “Trying Out Lambda Expressions in the Eclipse IDE,” demonstrates how to take advantage of lambda expressions in Java SE 8 using the Eclipse IDE and virtual extension methods.

Vohra begins with the basics:
“Lambda expressions, also called closures, are a short-form replacement for anonymous classes. Lambda expressions simplify the use of interfaces that declare a single abstract method, which are also called functional interfaces. In Java SE 7, a single method interface can be implemented with one of the following options.
* Create a class that implements the interface.
* Create an anonymous class.”

Vohra explains that while lambda expressions can be used to implement a functional interface without creating a class or an anonymous class, they can be used only with interfaces that declare a single method.

Benefits of lambda expressions include:
* Concise syntax
* Method references and constructor references
* Reduced runtime overhead compared to anonymous classes

Vohra gets under the hood to explain the basics of lambda syntax, along with the nature of functional interfaces and target types, offering copious examples. All in all, the article offers a first-rate primer on how to make use of lambda expressions and virtual extension methods using the Eclipse IDE.

Check out the story here.

Wednesday Jul 03, 2013

Devoxx Belgium - CFP Closes On July 5th

The biggest Java conference in Europe is taking place in Antwerp, Belgium from November 11 to 15, 2013. The conference is designed by developers for developers and attracts renowned international speakers.

The review committee looks for passionate speakers who are technically knowledgeable and not afraid to speak in front of a full room of Devoxxians.

The speakers can increase CFP acceptance rate by submitting one or more talks for Tools in Action, Quickie, BOF, University session, Conference and Hands On Labs sessions.

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