Friday Jul 19, 2013

Java API for JSON Processing: An Introduction to JSON

A new article, now up on otn/java, by Oracle’s Jitandra Kotamraju, titled “Java API for JSON Processing: An Introduction to JSON,” takes a look at how Java API for JSON Processing provides portable APIs to parse, generate, transform and query JSON, also known as JavaScript Object Notation. Kotamraju, a principal member of the technical staff at Oracle, is the JSON Processing specification lead.

JSO, a lightweight, text-based, language-independent data exchange format that is easy to read and write by both humans and machines, can represent two structured types: objects and arrays. Kotamraju, the JSON Processing specification lead, explains that “an object is an unordered collection of zero or more name/value pairs. An array is an ordered sequence of zero or more values. The values can be strings, numbers, booleans, null and these two structured types.”

JSON is frequently used in Ajax applications, configurations, databases, and RESTful web services. JSON is offered as the data exchange format with their RESTful web services by all popular websites.

Kotamraju gets under the hood with both the object model and streaming APIs. He concludes that the API for JSON Processing offers the following capabilities:
* “Parsing input streams into immutable objects or event streams
* Writing event streams or immutable objects to output streams
* Programmatically navigating immutable objects
* Programmatically building immutable objects with builders”

The API forms a base for building data binding, transformation, querying, or other manipulation APIs. JAX-RS 2.0 provides native integration for the Java API for JSON Processing.

Check out the article here.

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 May 15, 2012

JSF 2.0 for the Cloud, Part Two

Part Two of Deepak Vohra’s “JSF 2.0 for the Cloud” is now up on otn/java. In Part One, Vohra demonstrated how to take advantage of resource handling, @ManagedBean annotation, and implicit navigation. In Part Two, he explores new features in JSF 2.0 that make it ready for the cloud, including Ajax support, view parameters, preemptive navigation, event handling, and bookmarkable URLs.

Ajax support for JSF 2.0 components includes asynchronous transfer of data between a client and a server, along with partial page rendering, partial page processing, and grouping of components, and can be added using either f:ajax tag or the JSF Ajax library (jsf.js).

Regarding view parameters, Vohra explains, “JSF 2.0 added support for view parameters, which add the provision to send request parameters in a GET request. A view parameter is a UI component represented with the UIViewParameter class. Just like other UI components, it is saved in the UI component tree for a Facelets page and can be associated with validators and converters. A view parameter is an EditableValueHolder because it implements the interface.”

Preemptive navigation allows developers to determine the resource file that they  navigate to and request parameters, if needed, based on the navigation case and view parameters, thus allowing them to create a URL for JSF resources that they access from a GET request. As a result, the URL displayed shows the resource and all request parameters.

Developers should take note that plans are in the works to update Java EE 7 for “cloud-related practical considerations, such as multitenancy and elasticity, also known as horizontal scaling.” This will be available through JSR 342, which is scheduled to complete an early draft review on May 23, 2012. Specification leads are Oracle’s Bill Shannon and Linda DeMichiel.
Access the article here.

Thursday Apr 12, 2012

JavaServer Faces 2.0 for the Cloud

A new article now up on otn/java by Deepak Vohra titled “JSF 2.0 for the Cloud, Part One,” shows how JavaServer Faces 2.0 provides features ideally suited for the virtualized computing resources of the cloud. The article focuses on @ManagedBean annotation, implicit navigation, and resource handling. Vohra illustrates how the container-based model found in Java EE 7, which allows portable applications to target single machines as well as large clusters, is well suited to the cloud architecture.

From the article--

“Cloud services might not have been a factor when JavaServer Faces 2.0 (JSF 2.0) was developed, but JSF 2.0 provides features ideally suited for the cloud, for example:
•    The path-based resource handling in JSF 2.0 makes handling virtualized resources much easier and provides scalability with composite components.
•    REST-style GET requests and bookmarkable URLs in JSF 2.0 support the cloud architecture. Representational State Transfer (REST) software architecture is based on transferring the representation of resources identified by URIs. A RESTful resource or service is made available as a URI path. Resources can be accessed in various formats, such as XML, HTML, plain text, PDF, JPEG, and JSON, among others. REST offers the advantages of being simple, lightweight, and fast.
•    Ajax support in JSF 2.0 is integrable with Software as a Service (SaaS) by providing interactive browser-based Web applications.”
In Part Two of the series, Vohra will examine features such as Ajax support, view parameters, preemptive navigation, event handling, and bookmarkable URLs.

Have a look at 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
22
25
26
27
28
29
30
   
       
Today