Sunday, 29 September 2013

Enhancements in JDK 7 in handling exceptions

Catching multiple exceptions is present since jdk earlier versions but catching multiple exceptions is being introduced in jdk 1.7. Historically, catching multiple exceptions results in a catch block for each exception, with each block containing a variable with the type of that particular exception. In many cases, these catch blocks contained identical code that referenced the specified exception variable. It was difficult to write a common method to handle this duplicated code because the exception variables had different types.

try {
    Path fp = path.toRealPath(true);
} catch (NoSuchFileException x) {
    System.err.format("%s: no such file or directory%n", path);
    ...
} catch (IOException x) {
    System.err.format("%s%n", x);
    ...
}

As of JDK 7, you can catch multiple exceptions in the same catch block using the | symbol.

try {
    Path fp = path.toRealPath(true);
} catch (NoSuchFileException | IOException x) {
    System.err.format("%s: no such file or directory%n", path);
    ...
}

More precise re-throw of an exception:

Before JDK 7, re-throwing an exception in a catch block did not indicate the actual exceptions possible from the try block. Also, you could not change the type of exception thrown in the catch block without changing the method signature. As of JDK 7, the semantics for catching and throwing exceptions has been refined. If you catch an exception of some type, and do not assign to the exception variable, the compiler will copy over the checked exception type that can be thrown from the try block. It is as if you are re-throwing all the exceptions possible from the try block (provided that you don't re-assign the exception variable). For example, the following code is legal in JDK 7:

JarFile retrieve(URL url) throws IOException {
    Path temp = Files.createTempFile("jar_cache", null);
    try (InputStream in = url.openStream()) {
        Files.copy(in, temp, REPLACE_EXISTING);
        return new JarFile(temp.toFile());
    } catch (Throwable t) {
        Files.delete(temp);
        throw t;
    }

}

Friday, 27 September 2013

Java ME and the IMS

Java is present on a plethora of devices (not just mobile phones, but set-top boxes as well), so it is ideally suited to use the IMS. JSR 281, a step in this direction, defines an API that can be used to create an IMS-ready application that can sit on any Java-enabled device that implements this API. A device that implements JSR 281 provides the IMS engine—an execution environment that an IMS-ready application can interface with. The application itself is defined with the following parameters:
■ IMS application identifier (AppId), which is a string that identifies your application (potentially from among other IMS applications on the same
device)
■ The MIDlet, which handles the application logic and—in JSR 281 lingo—is said to be the “owning Java application” .The IMS engine stores these
properties in the registry within the IMS device. This registry is used to identify the properties that define the capabilities of the IMS application.
Application developers need to define this registry by writing the capabilities within the Java Application Descriptor (JAD) or Java archive (JAR) manifest file.
This is the static method of installing an IMS application on an IMScapable
device. JSR 281 also allows developers to dynamically register their application from within the MIDlet by using the classes in the javax.microedition.ims package. As mentioned previously, the main javax.microedition.ims package is used to define, configure, and install an IMS application. The Configuration class provides methods such as setRegistry() and removeRegistry to dynamically install applications (as opposed to the static method just discussed). The ConnectionState class
is used to monitor whether the application is connected to the
IMS network and, if the network is connected, this class allows developers
to find any identities on the network. Related to this class is the ConnectionStateListener interface, implementations of which can be used to retrieve notifications about changes in the state of the connection. Finally, this package also defines the Service interface, which is the base interface for all types of IMS services, including CoreService, which is an interface
defined in the javax.microedition.ims.core package.
The second package, javax.microedition.ims.core, contains the interfaces and a single class that enable the application to create and provide the IMS services (in other words, the capabilities). At the heart of this is the
CoreService interface, which provides methods for calling remote peers over the IMS network. The CoreServiceListener implementation
of this interface is also used to listen for incoming connections.
The CoreService is what enables connections and sessions within an IMS network, but it is the ServiceMethod interface and its implemented interface
Capabilities, PageMessage, Publication, Reference, Session, and Subscription that are used to inspect and manipulate the messages that are transmitted
within each session. The messages themselves are represented using
the Message interface, but any manipulation of messages should be left for advanced IMS applications only. The MessageBodyPart interface allows an IMS application to create ad hoc body parts to attach to each message that is transmitted. Each implemented interface of the ServiceMethod interface
has a related listener interface attached. Thus, for the Capabilities interface, you can use the CapabilitiesListener; for PageMessage, you can use the
PageMessageListener; and so on. The final package, javax.micro edition.ims.core.media, is used to help with the transmission of media (BasicMedia, FramedMedia, and so on). Consequently, it provides the BasicReliableMedia,BasicUnreliableMedia, FramedMedia, and StreamMedia
interfaces. As the names suggest, BasicReliableMedia is used to transmit media over TCP, BasicUnreliableMedia is used to transmit media over UDP,

FramedMedia is used to transmit data that is delivered in packets, and StreamMedia is used for media that can be streamed in real time.

Thursday, 26 September 2013

Moving into JavaME

The IP Multimedia Subsystem (IMS) involves the evolution of very basic telephone and data exchanges into a modern exchange system, powered by a plethora of high-capacity devices and networking lines. Driven by the recent explosion in internet and highend devices, Java ME, which is installed on billions of devices worldwide, is strategically placed to take advantage of this.

What Is the IMS?
The IMS is an architectural framework that helps with delivering multimedia services that use the Internet Protocol (IP). It was originally defined by the 3GPP (3rd Generation Partnership Project) as a standardized way for wireless mobile devices to distribute internet-based services. However, it is broader now and covers multiple network and media types. The architecture defines a centralized exchange-type of system that advertises its services. End users can connect their devices to this centralized service and gain individual identities. Multi media based messages and data are sent to these identities via pipes that provide for simultaneous transfer of the data. Therefore, instead of an old-style telephone exchange system, which provides for only one kind of media transfer (voice), the IMS can easily handle multiple media transfers simultaneously. This exchange of data can take place between services without a human element present, as in video or audio streaming where an end user consumes the data without needing to have a physical entity present at the other end. The end user is dialing into a service that would have advertised itself previously with its own unique identity. Businessto- business transactions are also possible, as long as individual identities have been established and a connection is possible based on pre-existing criteria and contracts.Identity on an IMS network is established using SIP (RFC 3261—essentially, your
e-mail address) or a “tel” URI (RFC 3966—essentially, your phone number). An end user or service may have multiple such identities, and the user can be reached on one, some, or all of these identities, at the

same time. This is the beauty of an IMS-based system.

Wednesday, 25 September 2013

Build your own compiler


Let’s Build a Compiler Plug-In
The first step is to download and build the current release of the Java 8 compiler, which supports compiler plug-ins.Toward this end, download
the latest version and follow the build instructions in theREADME file.
Once the compiler is built, include the generated dist/lib/ classes.jar file in your project. Alternatively, you can download a ready-made binary from
jdk8.java.net. Next, there are several steps we need to follow to build our plug-in.
Here is a summary of the steps:
1. Implement the com.sun.source.util.Plugin interface .
2. Add a TaskListener to perform additional behavior after the type-checking phase.
3. Create an abstract syntax tree (AST) visitor to locate binary expressions:
a. Evaluate whether the left side is a method call expression with a receiver’s type that is a subtype of java.util.Map.
b. Evaluate whether the right side is a null expression.

Step 1: Implement the com.sun.source.util .Plugin interface.
The first step is to create the main class, which implements com.sun.source
.util.Plugin. We return the name of our plug-in via the getName() method,

Step 2: Add a TaskListener.
We are looking for a code pattern that checks whether the receiver of
the method call get() is a subtype of java.util.Map. To get the type of the receiver, we need information about the types of expressions that are resolved during the type-checking phase. We therefore need to insert a new phase after type checking. Toward this end, we first create a TaskListener and add it to the current JavacTask. We now need to create the class  CodePatternTaskListener, which implements a TaskListener. A
TaskListener has two methods, started() and finished(), which are called, respectively, before and after certain events. These events are  encapsulated in a TaskEvent object. In our case, all we need to do is implement the finished() method and check for an event mentioning the Analyze phase (type checking.

Step 3: Create the AST visitor.
Next, we need to write the logic to locate the code pattern and report it. How do we do that? Thankfully, a task event provides us with a CompilationUnitTree,which represents the current source file analyzed in a tree structure. It can be accessed with the getCompilationUnit() method.
Our code will need to traverse this tree, locate a binary node, and evaluate the node’s left and right children. This sounds like a visitor pattern job. The Compiler Tree API provides us with a readymade visitor class designed for
such tasks: com.sun.source.util.TreeScanner<R, P>. It visits all the nodes in the AST.First, we initialize our visitor object and then visit the CompilationUnitTree. All we have left to do is to override visitBinary(BinaryTree node,P p) and write the logic to verify the code pattern.

Let’s Run Our Compiler Plug-In
We are almost finished. The final step is to set up a file called com.sun.source.util.Plugin located in META-INF/services/. This file must contain the name of our plug-in, CodePatternPlugin, which allows javac to load the appropriate plug-in.
Next, using your favorite IDE or the command line, create a Java archive (JAR) file from your project containing the META-INF directory and compiled class files:
Finally, you can run the plug-in
-processorpath indicates the path where the plug-in JAR file is located
-Xplugin indicates the name of the plug-in to run, which is CodePatternPlugin, in this case

The new plug-in mechanism provides a simple hook to javac. You can use it to extend javac with new behavior. In addition, you can distribute a plug-in without making modifications to the javac code base. In this article,
we showed how you can use this mechanism to easily write a customized

source code analysis tool for your applications

Tuesday, 24 September 2013

More Tips on plugins


How Do Plug-ins Differ from Annotation Processors?
Here are some ways that plug-ins differ from annotation processors:
■ Plug-ins are more flexible.They can run at various points in the compilation pipeline through a TaskListener.
■ Plug-ins do not use the model of processing rounds, which incurs additional overhead.
■ Plug-ins have a simpler interface.
■Annotation processors are defined by a standard (JSR 269). Plug-ins are
javac-specific.
■Plug-ins require the use of a ServiceLoader.

Java Compiler Plug-in Architecture
A javac plug-in supports two methods:
■First, a getName() method that returns the name of the plug-in for identification purposes.
■Second, a call() method that is invoked by the javac with the current environment it is processing.The call() method gives access to the compiler functionalities through a JavacTask object, which allows you to perform parsing, type checking, and compilation. In addition, the JavacTask object
lets you add observers (which are instances of TaskListener) to various events generated during compilation.
This is done through the method addTaskListener(), which accepts an object
TaskListener.


Sunday, 22 September 2013

Java Compiler plug - ins in Java 8

Java 8 will bring a new mechanism that allows you to write plug-ins for the Java compiler (javac). A compiler plug-in lets you add new phases to javac without making changes to its code base. New behavior can be encapsulated in a plug-in and distributed for other people to use. For example, javac plug-ins could be used to do the following:
Add extra compile-time checks.
Add code transformations.
Perform customized analysis of source code.

Note: The API for creating javac plug-ins is still experimental for JDK 8; it is scheduled to ship in 2013.

In this Blog , we show how you can write a simple, customized source code analysis tool so you can learn how to leverage the plug-in mechanisms for your own applications.
We find code patterns that check whether the result of calling get() on an object that is a subtype of Map is null. In other words we are looking for patterns such as the following, where expr is a subtype of java.util.Map.

This pattern could be contained within a conditional expression, a return statement, and so on. It should be reported in all cases.

Keep reading this blog continuously for further updates....

Java card technology

A NATURAL PLATFORM:

Java Card technology is a natural platform for the RCM’s digital currency venture. There are other platforms, but the Java Card platform is ubiquitous, particularly in the mobile market. We’ve  assumed that in general people will be using Java applications on Android and BlackBerry phones, iOS devices, PCs, and other similar mobile devices. we have also provided APIs to the MintChip that allow developers to use their existing platform, such as Java on a mobile phone, which is very popular. By necessity, MintChip devices will be highly secure. In addition to anticipated certification under the Common Criteria and FIPS 140-2, the MintChip assures users an extra layer of security not available in other electronic and digital currencies: because there’s no network or approvals involved, no personal information is released between the devices and no personal information travels over a network. MintChip transactions can be completely anonymous. A challenge for all smartcard platforms is performance. In mass transit, you need to have a very fast performance time. This has always been a challenge with a virtual machine like Java Card to achieve that sort of 300-millisecond-type transaction, but we believe it will stand up. Given these criteria, Java Card came out to be an outstanding winner. To validate the MintChip technology and business propositions, the RCM announced the “MintChip Challenge,” a competition for software developers to build digital currency applications using the MintChip. In the end, 57 qualifying applications were submitted. The grand prize winner, announced in September 2012, was MintWallet, a cloud-hosted peer-to-peer network for sending and receiving virtual cash. Surprisingly, MintWallet is a Windows-based Java  Card application, proving that the MintChip’s digital currency is as portable as the real-world pocket change it could replace. 

Tuesday, 17 September 2013

Security related teminologies in webservices

What Is the Mutual Certificates Security Mechanism?

Mutual certification, also called shared certification, is a process or technology where two communicating entities authenticate mutually. The Mutual Certificates Security (MCS) mechanism provides security through authentication and message protection to ensure integrity and confidentiality. This mechanism requires a keystore file and a truststore file for both the client and the server sides of an application.The server certificate is provided to the client in advance of any communication, so both the client and the server can be sure they are dealing with legitimate entities

Embedded sytems everywhere

What is the advantage of using Java in the embedded space?

The embedded space today is very fragmented. You have to piece together the entire stack—the runtime, the OS , the tools, the languages, the protocols, and the connectivity. We strongly believe that until we have a standards-based horizontal platform, the M2M [machine-to-machine] market won’t take off, because too much time is spent reinventing the wheel and struggling with fragmentation rather than building solutions.
Java is a platform and a technology that, by design, abstracts from the underlying hardware and OS, and provides a rich application environment, from very small devices to enterpriseclass servers. Java is uniquely positioned to address many of these challenges because, essentially, we solved these problems 10 or 15 years ago. We solved transitions from 8- to 16- to 32-bit that the embedded space is facing today. We have a proven and secure runtime environment. We have infield updatability of application components. And Java already has a technology ecosystem with 9 million developers. They might not currently be embedded developers, but they’re very familiar with the programming language and the toolset. So Java not only facilitates development in the embedded space but also acts as a catalyst toward embedded industry growth. An Oracle technology partner recently drew a parallel between the current embedded space and the early cell phone space. The whole ecosystem was held back by the fact that there was no standard platform that people could build upon. But as soon as fairly predictable phone platforms became accessible, you had this explosion of applications, accessories, hardware, and services that built upon the platforms. We see Java in the embedded space playing a very similar role, but with even more focus on creating an open, standardized technology infrastructure.

available.”

Monday, 16 September 2013

Handling Primitives in JAVA 8

One important aspect of the Stream API that we have glossed over until now is how to handle primitive types. Java generics do not allow a primitive type to be used as a type parameter, so we cannot write Stream<int>.
 However, the eagle-eyed reader might have noticed that in the last article, we had a bit of code for finding the average age of some otters. This code actually uses primitive types over most of the pipeline, so let’s unpack this a bit and see how the primitive types are used in code like this.

First off, don’t be confused by the cast to double, which is just to ensure that Java does a proper average instead of performing integer division. The argument to map() is a lambda expression that takes in an Otter and returns an int. If we could write the code using Java generics, the lambda expression would be converted to an object that implements Function<Otter, int>. However, because Java generics do not allow this, we need to encode the fact that the return type is int in a different way—by putting it in the name of the type. So the type that is actually inferred is ToIntFunction<Otter>. This type is known as a primitive specialization of the function type, and it is used to avoid boxing and unboxing between int and Integer. This saves unnecessary generation of objects and allows us to use function types that are specific to the primitive type that’s being used. 
Let’s break down the average calculation a little more. To get the age of each otter, we use this expression:
Let’s look at the definition of the map() method that is being called: 
From this we can see that we are using the special function type ToIntFunction, and we’re also using a specialized form of Stream to represent the stream of
                         ints. ots.stream().map(o -> o.getAge())

                         IntStream map(ToIntFunction<? super T> f);

Sunday, 15 September 2013

---contd

This article is a continuation of the previous article in developing a application.

First we will download the application and then walkthrough the application  so we get an understanding of the application architecture.
1. Download the initial NetBeans project:
a. Download the sample application here
b. Unzip the compressed file in the location where you want the movieplex7 folder to be placed.
c. Open NetBeans IDE and from the File menu, choose Open Project.
d. Select the unzipped directory, and click Open Project.
e. Opening the project will prompt you to create a configuration file to configure the base URI of the REST resources bundled in the application,
The application already contains a source file that provides the needed
configuration, so click Cancel to dismiss this dialog box.
2. Take a look at the Maven configuration:
a. Open the Project Files node of the movieplex7 project and double-click the pom.xml file.
b. In the pom.xml file, you can see that the javaee-api is specified as a project dependency,This will ensure that Java EE 7 APIs are retrieved from
Maven. Notice that a particular version number is specified and this must be used with the downloaded GlassFish 4.0 build.

Review the Datasource andGenerate the Database Schema
In this section, we will see in detail how the components of the application
are using JPA to communicate with the database.
1. Configure the datasource:
a. Open the Other Sources node of the movieplex7 project and then expand the src/main/ resources node.
b. Open the META-INF node, and double-click persistence .xml. By default, NetBeans opens the file in Design View.
c. Click the Source tab to view the XML source file
Notice that <jta-datasource> is commented out; that is, no datasource element is specified. This element identifies the JDBC resource to connect to in the runtime environment of the underlying application server.
The Java EE 7 platform defines a new default  datasourcethat must be provided by the runtime. This preconfigured datasource is accessible
under the JNDI name java:comp/DefaultDataSource.

The JPA 2.1 specification says that if neither the jta-data-source element
nor the non-jta-data-source element is specified, the deployer must specify a Java Transaction API (JTA) datasource or the default JTA datasource must be provided  by the container.
d. For GlassFish 4, the default datasource is bound to the JDBC resource jdbc/___default. Clicking back and forth between the Design view and the Source view might prompt the warning. This will get resolved when we run the application. Click OK to dismiss the dialog box.
2. Generate the database schema. The scripts to generate the schema are located in the META-INF directory. Because the location of these scripts is specified as a URL, the scripts can be loaded from outside the WAR file as well.
a. Open the Other Sources node of the movieplex7 project and then expand the src/main/ resources node.
b. Open the META-INF node and execute the create .sql script to generate thedatabase schema
JPA 2.1 introduces a new range of javax.persistence.schemageneration.* properties that can be used to generate database artifacts such as tables, indexes, and constraints in a database schema. This feature allows your
JPA domain object model to be directly generated in a database.

The generated schema might  need to be tuned for the production environment. 

Saturday, 14 September 2013

Develop your own web application

This article is the first part of a three-part series, and it will demonstrate how to use Java EE 7 improvements and newer Web standards such as HTML5, WebSocket, and JSON processing to build modern enterprise
applications.

In this part, we will see in detail how to use NetBeans IDE 7.3 and  GlassFish 4 to build a complete three-tier end-to-end application using
the following technologies, which are built into Java EE 7:
■ Java Persistence API (JPA)2.1 (JSR 338)
■JavaServer Faces (JSF) 2.2(JSR 344)
■Contexts and DependencyInjection (CDI) 1.1 (JSR 346)

Note: The complete source code for the application designed in this article can be downloaded here.
What Is Java EE?
Java Platform, Enterprise Edition (Java EE) is a dedicated Java platform for developing and running enterprise applications. Java EE provides all you need to create large-scale, multitiered, scalable, reliable, and secure network applications  for business.
Prerequisites
Enough explanation is provided here to get you started with the sample application; however, this article is not a comprehensive Java EE tutorial. Readers are expected to know about basic Java EE concepts, such
as Enterprise JavaBeans (EJB), JPA, and CDI.

Download and install the following software, which is used to develop the application :
■ JDK 7
■ NetBeans IDE 7.3 or higher “All” or “Java EE” version
■GlassFish 4.0 b80

Create a Real-Life Enterprise Application with NetBeans IDE 7.3
In this practical section, we will build a real-life Java EE 7 enterprise application step by step so that you can learn quickly the basics about the
new and important timproved in Java EE 7, such as JPA
2.1, JSF 2.2, and CDI 1.1.


What we are going to do is create a typical three-tier Java EE 7
Web application that allows customers to view the show times for a movie showing at a seven theater Cineplex and then to make reservations.

Specifically, we will perform the following tasks:
■ Install and configure GlassFish and NetBeans IDE 7.3.
■ Load a sample Maven application by following the instructions and guidance.
■Review the configured datasource and generate database artifacts, such as tables.
■ Create the Web pages that allow a user to book a particular movie show in a theater.
■ Add and update existing code in order to demonstrate the usage of different technology stacks  in the Java EE 7 platform.
■ Run and test the sample application.

Install and Configure NetBeans IDE 7.3 and GlassFish 4
Let’s establish our development environment by downloading and installing the latest version of NetBeans IDE and GlassFish.
1. Download and install the latest version of NetBeans IDE:
a. Download the All or Java EE version of NetBeans IDE 7.3 or higher.
b. Follow the installation instructions here.
2. Download the GlassFish server and configure it in NetBeans IDE. To be sure we use GlassFish as our application server, we are going to specify it in NetBeans IDE:
a. Download GlassFish 4.0.
b. Unzip the compressed file in the location where you want the glassfish4 folder to be placed.
c. Open NetBeans IDE and clickthe Services tab.
d. Right-click Servers and then choose Add Server, as shown
e. Select GlassFish Server 3+ in the Add Server Instance wizard,
f. Type GlassFish4.0b80 in the Name field, and click Next.
g. Click Browse, browse to the location where you unzipped the GlassFish files, and select the glassfish4 folder.
h. Click Finish.

Bravo! Now your environment is ready for fun. Continue reading this blog for further Instructions


Thursday, 12 September 2013

One step ahead into Lambda

Let’s dig a little deeper into the consequences of modeling an infinite sequence of numbers. Some consequences include the following:

We can’t materialize the whole stream to a Collection, so methods such as collect() won’t be
possible.
We must operate by pulling the elements out of the Stream. We need a bit of code that returns the next element as we need it.

This approach also means that the values of expressions are not computed until they are needed. It might not seem so, but this simple statement actually represents a huge step for Java. Before Java 8, the value of an expression was always computed as soon as it was bound to a variable or passed into a function. This is called eager evaluation and it is, of course, the default behavior for expression evaluation in most mainstream programming languages. With Java 8, a new programming paradigm is being introduced for Java: Stream uses lazy evaluation. This is an extremely powerful new feature, and it takes a bit of getting used to.

Let’s look at a map/filter pipeline,  The stream() method returns a Stream object. The map() and filter() methods (like almost all the operations on Stream) are lazy. At the other end of the pipeline, we have a collect() operation, which materializes the entire Stream back into a Collection. This means that, apart from the materialization back into the Collection, the platform has complete control over how much of the Stream to evaluate, which opens the door to a range of optimizations that are not available in Java 7 and earlier versions. Lazy evaluation requires more care from the programmer, but this burden largely falls upon the library writer. The aim of lambda expressions in Java 8 is to simplify life for the ordinary programmer, even if that requires extra complexity in the platform.

Limitations of collections

                          Java collections have served the Java language extremely well. However, they are based upon the idea that all the elements of a collection exist and are represented somewhere in memory. This means that they are not capable of representing more-general data, such as infinite sets.
Consider, for example, the set of all prime numbers.

                         This cannot be modeled as Set<Integer> because we don’t know what all the prime numbers are, and we certainly don’t have enough heap space to represent them all. In Java 7 and earlier versions, the only way to model the set would be to work with an Iterator representing the set instead. It is possible to construct a view of data that works primarily with iterators and relegates the underlying collections to a supporting role. However, this requires discipline and is not an immediately obvious approach to working with the Java collections.With Java 7 and earlier versions, if you wanted to use this type of approach, you would typically depend upon an external library that provided better support for this functionality. The upcoming release of Java 8 addresses this use case by introducing the Stream interface as an abstraction that is better suited to dealing with more-general data structures than basic, finite collections. This means that a Stream can be thought of as more general than an Iterator or a Collection. However, a Stream is not really a data structure; instead, it’s an abstraction for handling data. What does this distinction mean? It means a Stream does not manage the storage for elements nor does it provide a way to access individual elements directly from the Stream.

Friday, 6 September 2013

A cloud primer for java developers

With every passing year, we draw closer and closer to achieving the vision of the ubiquitously connected global village. The number of internet users  today exceeds 2 billion worldwide, with global internet penetration estimated to  grow from 34.3 percent at the end of 2012 to 45 percent of the world’s projected population by the end of 2016. For the world of software development, this offers unique opportunities to lower development costs and improve productivity and throughput by utilizing geographically dispersed teams and processes. Data production is expected to be 44 times greater in 2020 than it was in 2009, reaching a world wide total of 7.9 zettabytes(or eight trillion gigabytes) by2015. Developers are under pressure to use that data to create more-compelling applications. Also, companies are searching for solutions that will provide unprecedented capacity, scalability, and speed to keep pace with that explosive growth. There’s another trend affecting developers: mobility is un tethering individuals from the need to be at any particular place in order to be productive. In 2011, 420million smart phones and66 million tablets were sold. In 2016, those numbers are projected to balloon to 1.2billion smartphones and tablets being sold. Project teams are global, sharing code and collaborating from anywhere in the world as seamlessly as possible. They need infrastructure that allows them to do that. Social platform adoption is such an integral part of our lives that 90 percent of all internet users now have an account on at least one social service, and there are more than 13 million business pages on Facebook alone. Associal behaviors continue to increase, modern development environments must keep pace and offer similar levels of seamless and frequent interaction. Due to the need forcutting-edge infrastructures, enterprises are facing pressure to modernize to achieve the flexibility, scalability, and responsiveness that will help them remain competitive. But companies can rarely afford to rip out and replace their entire infrastructure or retrain their staffs. Adopting a standards-based cloud infrastructure enables companies to modernize at a gradual pace. As a result of these trends, application needs are growing exponentially. In addition ,the pace and competitiveness of development put enormous pressure on productivity, throughput, and quality. But development resources continue to grow as linearly as ever, resulting in a growing “development gap” . It’s the ability to fill in this development gap that has made the cloud such a valuable force in the developer world.

Thursday, 5 September 2013

A look at JavaFX

JavaFX technology creates stunning user interfaces. But how should a JavaFX enthusiast develop the next enterprise application or migrate an existing one? OpenDolphin is a freeopen source library that strictly separates business logic from visualization.This architectural approach
assists in making a switch between different UI toolkits while ensuring that all investments in business logic are protected. At JavaOne 2012,OpenDolphin was presented at the Java Strategy Keynote as an example of successfully integrating JavaFX with enterprise applications. The keynote demonstrated an interactive 3-D application that monitors a container yard, facilitates planning activities for container relocations,
and simulates the execution of resulting work plans .This container monitoring demo—from Navis(CargoTec), the world market leader of container terminal software—illustrates two important characteristics
of many JavaFX  enterprise applications:
■  First, you want to fully exploit the rich UI capabilities of JavaFX.
Second, often a server centric programming model has been used
for many years and this architecture cannot be compromised.

OpenDolphin is very flexible when it comes to supporting different
UI toolkits. JavaFX is preferred,but you can also use Swing, AWT,
SWT, and client-side frameworks such as Eclipse RCP or NetBeans.
Any Java-based UI toolkit is just fine as long as it is able to register
itself as a listener in a JavaBeans likefashion.
First encapsulate the view layer with the helpof  OpenDolphin, and then replace it. This strategy safeguards you regardless of whether
you want to prepare yourself for a future move to JavaFX or you
want to jump into JavaFX right away and hedge your bets.
The demo section ofOpenDolphin  contains the so-called performance
demo which comes in a Swing version and a JavaFX version to show the ease of migration. The business logic is not touched at all. The same
application code runs on the server for both applications, and only the

views differ.

Sunday, 1 September 2013

Just Apply JVM Again

Since , 22 years Java has been showing us a drastic development and people are still working on it to improve and add enhanced features to it.

Some of the reasons of why we prefer using java is being listed below:

  1. You can actually hire engineers
  2. IDEs take the pain away
  3. Language support
  4.  Android
  5. Everybody else does
  6. It changes slowly
  7. You’ll end up using it anyway