Wednesday Jun 26, 2013

Diving into Scala with Cay Horstmann

A new interview with Java Champion Cay Horstmann, now up on otn/java, titled  "Diving into Scala: A Conversation with Java Champion Cay Horstmann," explores Horstmann's ideas about Scala as reflected in his much lauded new book,  Scala for the Impatient.  None other than Martin Odersky, the inventor of Scala, called it "a joy to read" and the "best introduction to Scala". Odersky was so enthused by the book that he asked Horstmann if the first section could be made available as a free download on the Typesafe Website, something Horstmann graciously assented to.

Horstmann acknowledges that some aspects of Scala are very complex, but he encourages developers to simply stay away from those parts of the language. He points to several ways Java developers can benefit from Scala:

"For example," he says, " you can write classes with less boilerplate, file and XML handling is more concise, and you can replace tedious loops over collections with more elegant constructs. Typically, programmers at this level report that they write about half the number of lines of code in Scala that they would in Java, and that's nothing to sneeze at. Another entry point can be if you want to use a Scala-based framework such as Akka or Play; you can use these with Java, but the Scala API is more enjoyable. "

Horstmann observes that developers can do fine with Scala without grasping the theory behind it. He argues that most of us learn best through examples and not through trying to comprehend abstract theories. He also believes that Scala is the most attractive choice for developers who want to move beyond Java and C++.  When asked about other choices, he comments:

"Clojure is pretty nice, but I found its Lisp syntax a bit off-putting, and it seems very focused on software transactional memory, which isn't all that useful to me. And it's not statically typed. I wanted to like Groovy, but it really bothers me that the semantics seems under-defined and in flux. And it's not statically typed. Yes, there is Groovy++, but that's in even sketchier shape.

There are a couple of contenders such as Kotlin and Ceylon, but so far they aren't real.

So, if you want to do work with a statically typed language on the JVM that exists today, Scala is simply the pragmatic choice. It's a good thing that it's such a nice choice."

Learn more about Scala by going to the interview here.

Wednesday Mar 06, 2013

Get started with Java!

Every year, the Java platform is growing with new features for enterprise, web, embedded and mobile application and developers. To help beginners navigate the platform and get started with Java technologies, new learning resources are available on the New to Java website. Developers will write a "Hello World" application, test their Java knowledge,  create user interfaces with JavaFX, and build enterprise applications with Java EE, desktop applications with Java SE or applications for mobile and embedded devices.  

Being up to date about current trends and networking with other developers are also critical for a career in programming. Developers can connect with top leaders in the community at conferences and community networks such as local user groups. They have the chance to contribute to open-source projects such as OpenJDK and Adopt-a-JSR to name just two.

Finally, parents and educators teaching programming to children will find software tools for young developers. They are free downloadable development tools with easy to use interfaces for young students. And Minecraft is so popular! Java technologist Daniel Green walks us through Minecraft mods with Java.

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.

Tuesday Apr 24, 2012

Spring to Java EE Migration – Part 4, the Finale

In a new article, now up on otn/java, titled “Spring to Java EE Migration, Part 4,” David Heffelfinger presents the final part of his series in which he demonstrates the ease of migration from the Spring Framework to Java EE. Here he compares equivalent functionality in Java EE and Spring in areas such as MVC design pattern implementation, data access, transaction management, and dependency injection.

He concludes the series with these remarks:

“In this series of articles, we developed a Java EE version of Spring’s Pet Clinic application. We saw how the advanced tooling provided by NetBeans enables us to quickly develop a Java EE application…. Once we were done building the Java EE version of the application, we compared it with the Spring version, noting that the original version has several dependencies whereas the Java EE version has none, because it takes advantage of all the services provided by the Java EE application server.

Finally, we compared how to implement similar functionality such as MVC and DAO implementation, transaction management, and dependency injection with Spring and Java EE. In every case with Spring, some XML configuration needs to be done besides adding annotations to the code. Java EE relies on convention, and in most cases, no XML configuration is needed in order to implement these services.

Although newer versions of Spring rely a lot less on explicit XML configuration than earlier versions, there are always a few little lines here and there that we need to add to an XML configuration file in order to get most of the Spring annotations to work, violating the DRY (don’t repeat yourself) principle...

Additionally, Spring applications tend to have several dependencies, because they are meant to run in a “lightweight” Servlet container such as Tomcat or Jetty and these containers don’t provide all the required functionality. In contrast, Java EE applications are meant to be deployed in a full-blown Java EE 6 application server such as Oracle GlassFish Server...

For these reasons, I always recommend Java EE over Spring for enterprise application development.”

Have a look at the article here.

Friday Dec 16, 2011

Spring to Java EE Migration, Part 2 (technical article)

In part two of a four-part article series on otn/java, “Spring to Java EE Migration, Part 2,” CTO and Java EE expert David Heffelfinger elaborates further on how easy it is to develop the data layer of an application using Java EE, JPA, and the NetBeans IDE instead of the Spring Framework.

Part 1 began with a Java EE rewrite of Spring's Pet Clinic sample application and developed the persistence layer of the application using Java Persistence API (JPA) 2.0, using NetBeans to generate most of the persistence layer from an existing database schema. Heffelfinger analyzed the generated code, which employed advanced JPA features.

In part 2, he continues this process by developing Enterprise JavaBeans (EJB) 3.1 session beans that act as Data Access Objects (DAOs), as well as JavaServer Faces (JSF) 2.0 managed beans and pages. Readers get to see the generated code in action and are given a look under the hood to see what’s going on.

Heffelfinger concludes Part 2 with a look ahead to Part 3:

“In the next installment of this series, we will modify the generated code to make it a bit more user friendly and we will compare the Java EE and Spring versions of the Pet Clinic application.”

Read the complete article here.

Wednesday Aug 31, 2011

Moving Java Forward: Java Summer Workshop 2011

When students tell you, “I could hardly believe I was programming my own game, animations and videos using Java,” or “It is a great opportunity to find out the fun of programming and creating your own animation or whatever you want to create,” and one parent adds “after the workshop, my son is so familiar with Oracle and Java,” I just can tell you it was a great event!

Over 300 Oracle employee sons and daughters, Oracle employees, parents and local high school students and teachers attended the three-day Java Summer Workshop and volunteer training on Greenfoot and Alice (Aug. 8-12 at Oracle HQ). (Alice and Greenfoot are two award winning visual educational software tools to teach Java programming.) The workshop was an introduction to programming only using drag and drop functions for 11 to 18 year old students.

Now available online are the training for Alice and Greenfoot, video student interviews, presentations, additional resources to learn Java, quotes, projects and pictures. Check it out!

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