Thursday Jan 30, 2014

Internet of Things (IoT) Hackathon in Brazil

SouJava is running a Raspberry Pi and Java hackathon at Campus Party, the week-long technology gathering of geeks, developers, gamers, scientists, and students in Brazil. Sponsored by Oracle Technology Network, the hackathon is designed for enthusiasts who want to create IoT projects with Raspberry Pi and Java. The objectives are for attendees to learn, practice, and innovative while creating an IoT project

Java evangelist Angela Caicedo opened the hackathon with an overview of IoT and Java development. Over two days, participants will build teams, brainstorm, attend training, get a kit from the organizers and hack on their own project. Onsite experts will be available to help participants. They are veteran Java developers of web, enterprise and embedded development. Among them are GlobalCode founder Vinicius Senger, senior developer Rubens Saraiva, SouJava leader Bruno Souza, Java Champion Yara Senger, product manager Bruno Borges and senior mobile developer Ricardo Ogliari 

Learn more about IoT:  
- IoT community page highlighting projects, discussions, hobbyists, and experts

Monday Apr 29, 2013

JSR 356, Java API for WebSocket

A new article, now up on otn/java, by Java Champion Johan Vos, titled “JSR 356, Java API for WebSocket,” shows developers how to integrate WebSockets into their applications. JSR 356, part of the Java EE 7 platform, specifies the API that Java developers can use when they want to integrate WebSockets into their applications on both on the Java server and client side. The API is highly flexible, and frees developers to write WebSocket-based applications independent of the underlying WebSocket implementation, thus preventing vendor lock in. It also allows for more choice in libraries and application servers. Web clients or native clients leveraging any WebSocket implementation can more easily communicate with a Java back end.

As part of the Java EE 7 standard, all Java EE 7-compliant application servers will have an implementation of the WebSocket protocol that adheres to JSR 356. Vos explains:

“Once they are established, WebSocket client and server peers are symmetrical. The difference between a client API and a server API is, therefore, minimal. JSR 356 defines a Java client API as well, which is a subset of the full API required in Java EE 7….

The Java API for WebSocket is very powerful, because it allows any Java object to be sent or received as a WebSocket message.

Basically, there are three different types of messages:

* Text-based messages
* Binary messages
* Pong messages, which are about the WebSocket connection itself

When using the interface-driven model, each session can register at most one MessageHandler for each of these three different types of messages.

When using the annotation-driven model, for each different type of message, one @onMessage annotated method is allowed. The allowed parameters for specifying the message content in the annotated methods are dependent on the type of the message.”

Check out the article here and learn how to integrate WebSockets into your applications.

Tuesday Jan 08, 2013

Java Experts on the State of Java

In a new article by yours truly, now up on otn/java, titled “Java Experts on the State of Java,” four Java experts, Adam Bien, Charles Nutter, Kirk Pepperdine and Simon Ritter, share their unique perspectives on what’s happening in the world of Java.

Consultant Adam Bien, winner of many awards and an expert in Java EE, remarks that, “Only a few years ago, Java EE was used mostly by larger companies—now it becomes interesting even for one-person shows.” He is also excited about Project Nashorn, which is coming in Java SE 8.

Charles Nutter, co-creator of JRuby and a Java Champion, observes that “JRuby seems to have hit a tipping point this past year, moving from ‘just another Ruby implementation’ to ‘the best Ruby implementation for X,’ where X may be performance, scaling, big data, stability, reliability, security, or one of several other features important for today’s applications.”

Java Champion Kirk Pepperdine, an expert in Java performance tuning, comments that, “The volume of data we’re dealing with just seems to be getting bigger and bigger all the time. A couple of years ago, you’d never think of needing a heap that was 64 GB, but today there are deployments in which the heap has grown to 256 GB, and there are plans for heaps that are even larger. Dealing with all that data simply requires more horsepower and some very specialized techniques. In some cases, teams are simply trying to push hardware to the breaking point. Under those conditions, you need to be very clever just to get things to work—let alone to get them to be fast. We are very quickly moving from a world where everything happens in a transaction to one in which you’ve lost if you even consider using a transaction.”

Finally, Oracle’s Java Rock Star Simon Ritter celebrates the Raspberry Pi: “I don’t think there is one definitive thing that makes the Raspberry Pi significant, but a combination of things really makes it stand out. First, it’s the cost: $35 for what is effectively a completely usable computer. OK, so you have to add a power supply; an SD card for storage; and maybe a screen, keyboard, and mouse, but this is still way cheaper than a typical PC. The choice of an ARM processor is also significant, because it avoids problems such as cooling (no heat sink or fan) and can use a USB power brick.”

Check out the article here.

Sunday Sep 30, 2012

Talking JavaOne with Rock Star Kirk Pepperdine

Kirk Pepperdine is not only a JavaOne Rock Star but a Java Champion and a highly regarded expert in Java performance tuning who works as a consultant, educator, and author. He is the principal consultant at Kodewerk Ltd. He speaks frequently at conferences and co-authored the Ant Developer's Handbook. In the rapidly shifting world of information technology, Pepperdine, as much as anyone, keeps up with what's happening with Java performance tuning.

Pepperdine will participate in the following sessions:

  • CON5405 - Are Your Garbage Collection Logs Speaking to You?
  • BOF6540 - Java Champions and JUG Leaders Meet Oracle Executives (with Jeff Genender, Mattias Karlsson, Henrik Stahl, Georges Saab)
  • HOL6500 - Finding and Solving Java Deadlocks (with Heinz Kabutz, Ellen Kraffmiller Martijn Verburg, Jeff Genender, and Henri Tremblay)


I asked him what technological changes need to be taken into account in performance tuning. “The volume of data we're dealing with just seems to be getting bigger and bigger all the time,” observed Pepperdine. “A couple of years ago you'd never think of needing a heap that was 64g, but today there are deployments where the heap has grown to 256g and tomorrow there are plans for heaps that are even larger. Dealing with all that data simply requires more horse power and some very specialized techniques. In some cases, teams are trying to push hardware to the breaking point. Under those conditions, you need to be very clever just to get things to work -- let alone to get them to be fast. We are very quickly moving from a world where everything happens in a transaction to one where if you were to even consider using a transaction, you've lost."

When asked about the greatest misconceptions about performance tuning that he currently encounters, he said, “If you have a performance problem, you should start looking at code at the very least and for that extra step, whip out an execution profiler. I'm not going to say that I never use execution profilers or look at code. What I will say is that execution profilers are effective for a small subset of performance problems and code is literally the last thing you should look at.

And what is the most exciting thing happening in the world of Java today? “Interesting question because so many people would say that nothing exciting is happening in Java. Some might be disappointed that a few features have slipped in terms of scheduling. But I'd disagree with the first group and I'm not so concerned about the slippage because I still see a lot of exciting things happening. First, lambda will finally be with us and with lambda will come better ways.”

For JavaOne, he is proctoring for Heinz Kabutz's lab. “I'm actually looking forward to that more than I am to my own talk,” he remarked. “Heinz will be the third non-Sun/Oracle employee to present a lab and the first since Oracle began hosting JavaOne. He's got a great message. He's spent a ton of time making sure things are going to work, and we've got a great team of proctors to help out. After that, getting my talk done, the Java Champion's panel session and then kicking back and just meeting up and talking to some Java heads."

Finally, what should Java developers know that they currently do not know? “’Write Once, Run Everywhere’ is a great slogan and Java has come closer to that dream than any other technology stack that I've used. That said, different hardware bits work differently and as hard as we try, the JVM can't hide all the differences. Plus, if we are to get good performance we need to work with our hardware and not against it. All this implies that Java developers need to know more about the hardware they are deploying to.”

Originally published on blogs.oracle.com/javaone.

Wednesday Sep 26, 2012

Talking JavaOne with Rock Star Adam Bien

Among the most celebrated developers in recent years, especially in the domain of Java EE and JavaFX, is consultant Adam Bien, who, in addition to being a JavaOne Rock Star for Java EE sessions given in 2009 and 2011, is a Java Champion, the winner of Oracle Magazine’s 2011 Top Java Developer of the Year Award, and recently won a 2012 JAX Innovation Award as a top Java Ambassador.

Bien will be presenting the following sessions:

  • TUT3907 - Java EE 6/7: The Lean Parts
  • CON3906 - Stress-Testing Java EE 6 Applications Without Stress
  • CON3908 - Building Serious JavaFX 2 Applications
  • CON3896 - Interactive Onstage Java EE Overengineering

I spoke with Bien to get his take on Java today. He expressed excitement that the smallest companies and startups are showing increasing interest in Java EE. “This is a very good sign,” said Bien. “Only a few years ago J2EE was mostly used by larger companies -- now it becomes interesting even for one-person shows. Enterprise Java events are also extremely popular. On the Java SE side, I'm really excited about Project Nashorn.”

Nashorn is an upcoming JavaScript engine, developed fully in Java by Oracle, and based on the Da Vinci Machine (JSR 292) which is expected to be available for Java 8.  

Bien expressed concern about a common misconception regarding Java's mediocre productivity. “The problem is not Java,” explained Bien, “but rather systems built with ancient patterns and approaches. Sometimes it really is ‘Cargo Cult Programming.’ Java SE/EE can be incredibly productive and lean without the unnecessary and hard-to-maintain bloat. The real problems are ‘Ivory Towers’ and not Java’s lack of productivity.”

Bien remarked that if there is one thing he wanted Java developers to understand it is that, "Premature optimization is the root of all evil. Or at least of some evil. Modern JVMs and application servers are hard to optimize upfront. It is far easier to write simple code and measure the results continuously. Identify the hotspots first, then optimize.”

He advised Java EE developers to, “Rethink everything you know about Enterprise Java. Before you implement anything, ask the question: ‘Why?’ If there is no clear answer -- just don't do it. Most well known best practices are outdated. Focus your efforts on the domain problem and not the technology.”

Looking ahead, Bien said, “I would like to see open source application servers running directly on a hypervisor. Packaging the whole runtime in a single file would significantly simplify the deployment and operations.”

Check out a recent Java Magazine interview with Bien about his Java EE 6 stress monitoring tool here.

Originally published on blogs.oracle.com/javaone.



Tuesday Aug 14, 2012

Enterprise JavaFX Deployment with LightView: Part 3 now on otn/java

A new article by Java Champion Adam Bien, now up on otn/java, titled “Enterprise JavaFX Deployment with LightView: Part 3,” explores ways to use Maven 3 to build and deploy the LightView application in all available deployment modes. In addition, Bien shows how to sign and deploy LightView with a Java EE 6 application.

Bien explains the basics:

“LightView uses the HTTP (REST) protocol to communicate with the back-end server. For the realization of back-end communication, an external library—the Jersey client—is used. LightView connects with the back end (LightFish) at startup time, so it is not suitable to lazy-load the Jersey dependencies for optimization purposes. Furthermore, multiple JAR files are hard to handle for standalone applications; you have to set up the class path correctly and keep all the moving parts consistent. The most convenient way to deploy Java (and JavaFX) applications is simply by starting them with java -jar my-killer-app.jar and deploying a single file that contains all the dependencies.”

He shows how the class files are packaged with the javafxpackager, which is shipped with the JavaFX 2 SDK, using the exec-maven-plugin and explains the core tasks achieved by Maven and describes the what javafxpackager does behind the scenes. He then shows how the LightView application operates and interacts with LightFish.

Bien concludes by emphasizing that the richness of JavaFX lies in the fact that it is another Java library. “Because JavaFX is ‘just’ an additional Java library, all of the established build, test, and deployment infrastructure can be reused. You can develop JavaFX applications using any integrated development environment (IDE) you like. And best of all, you can use a single language in a project, from the Java EE back end to the JavaFX front end.”

Check out the article here.

Wednesday Jun 13, 2012

The Enterprise Side of JavaFX - Part One

A new article, now up on otn/java, by Java Champion Adam Bien, titled “The Enterprise Side of JavaFX,” shows developers how to use LightView to convert REST services into a bindable set of properties. The article, Part One of a three-part series, presents the enterprise and business side of JavaFX with minimal animations, effects, and transitions, and a focus on structuring the presentation logic and integration with back-end services.

Bien makes use of LightFish, LightView and much more:

“LightFish is an open source monitoring application that periodically fetches and persists snapshots from a “GlassFish Under Test” machine and makes them available in real time via a simplified REST API.

LightFish comes with a basic Web interface to manage the data-capturing interval that is implemented with JavaServer Faces 2. LightView is a JavaFX 2 real-time visualizer that integrates the Web UI directly and accesses the monitoring data via REST and long polling. It could be considered to be a ‘stress test dashboard.’”

Look for Part Two of the series, which will directly integrate the JavaServer Faces 2 UI with WebView.

Check out the article here.

Thursday May 31, 2012

Java Champion Dick Wall Explores the Virtues of Scala (otn interview)

In a new interview up on otn/java, titled “Java Champion Dick Wall on the Virtues of Scala (Part 2),” Dick Wall explains why, after a long career in programming exploring Lisp, C, C++, Python, and Java, he has finally settled on Scala as his language of choice.

From the interview:

“I was always on the lookout for a language that would give me both Python-like productivity and simplicity for just writing something and quickly having it work and that also offers strong performance, toolability, and type safety (all of which I like in Java). Scala is simply the first language that offers all those features in a package that suits me. Programming in Scala feels like programming in Python (if you can think it, you can do it), but with the benefit of having a compiler looking over your shoulder and telling you that you have the wrong type here or the wrong method name there.

The final ‘aha!’ moment came about a year and a half ago. I had a quick task to complete, and I started writing it in Python (as I have for many years) but then realized that I could probably write it just as fast in Scala. I tried, and indeed I managed to write it just about as fast.”

Wall makes the remarkable claim that once Java developers have learned to work in Scala, when they work on large projects, they typically find themselves more productive than they are in Java. “Of course,” he points out, “people are always going to argue about these claims, but I can put my hand over my heart and say that I am much more productive in Scala than I was in Java, and I see no reason why the many people I know using Scala wouldn’t say the same without some reason.”

Read the interview here.

Wednesday May 23, 2012

Best Practices for JavaFX 2.0 Enterprise Applications, Part Two

Java Champion, Oracle Java Evangelist, and JavaFX expert Jim Weaver, has published Part Two of his article, "Best Practices for JavaFX 2.0 Enterprise Applications" on otn/java. Weaver continues to explore the possibilities of the TweetBrowser application, focusing now on new techniques and best practices that include:

* Leveraging a JavaFX cascading style sheet
* Implementing springs and struts in the UI
* Using a ternary operation in binding expressions
* Defining JavaFX properties
* Leveraging a Popup to implement a dialog box
* Using WebView to display a Web page

As Weaver emphasizes, there is a vast array of techniques and best practices that can be used in JavaFX applications. For example:

The JavaFX cascading style sheet (CSS) enables users to modify the appearance of an application.

The springs and struts concept enables a fixed horizontal strut and a variable horizontal spring so that an application can appear the way developers want it to appear, regardless of the size of the scene or the type of platform.

Go here to learn more about the rich possibilities of JavaFX 2.0 and enterprise applications.

Wednesday Mar 28, 2012

Java Champion Jorge Vargas on Extreme Programming, Geolocalization, and Latin American Programmers

In a new interview, up on otn/java, titled “An Interview with Java Champion Jorge Vargas,” Jorge Vargas, a leading Mexican developer, discusses the process of introducing companies to Enterprise JavaBeans through the application of Extreme Programming. Among other things, he gives workshops about building code with agile techniques and creates a master project to build all apps based on Scrum, XP methods and Kanban. He focuses on building core components such as security, login, and menus. Vargas remarks, “This may sound easy, but it’s not—the process takes months and hundreds of hours, but it can be controlled, and with small iterations, we can translate customer requirements and problems of legacy systems to the new system.”

In regard to his work with geolocalization, he says: “We have launched a beta program of Yumbling, a geolocalization-based app, with mobile clients for BlackBerry, iPhone, Android, and Nokia, with a Web interface. The first challenge was to design a simple universal mechanism providing information to all clients and to minimize maintenance provision to them. I try not to generalize a lot—to avoid low performance or misunderstanding in processing data. We use the latest Java EE technology—during the last five years, I’ve taught people how to use Java EE efficiently.”

Check out the interview 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
22
25
26
27
28
29
30
   
       
Today