Date post: | 16-May-2015 |
Category: |
Technology |
Upload: | arun-gupta |
View: | 2,849 times |
Download: | 1 times |
Powering the Next Generation Services with JavaTM Platform
Arun Gupta, GlassFish GuyOracle Corpblogs.sun.com/arungupta, @arungupta
#sparkitIndian Top-10trends ontwitter
'95 '96 '97 '98 '99 '00 '01 '02 '03 '04 '05 '06 '07 '08 '09 '10
Java released onwicked.neato.org
JDK 1.0
JDK 1.1
J2SE 1.2
JDK 1.3(Hotspot)
JDK 1.4(NIO)
J2SE 1.5(Generics, Annotation)
JDK 1.6(Rhino, JAX-WS)
J2SE 1.7(Modularity,Dyn Langs,
Coin)
'11
JSP /Servlets
J2EE 1.2
J2EE 1.3(Connectors)
J2EE 1.4(Web Services)
Java EE 5(Ease-of-use)
Java EE 6Jini
JavaCard2.0
JavaFX 1.0
Evolution of Java
The Java Eco-System
Digital TVs &Set-Top Boxes
> 2.6 BillionJava Powered
Phones
> 6 BillionJava CardsDeployed
Blu-ray DiscDevices
Multi-FunctionPrinters
850+ KGlassFishDownloadsPer month
850+ MPCs with
Java
$2.8BIn Java
App Servers$3BJava Mobile
Game Market
6.5+ MJava Dev.world wide
> 40.0 Million
250+ MJavaFXruntime
Standards-based
Role specialization: Communication, Enterprise, BPM, Web 2.0, ..
Converged Applications
Credits: http://scrapetv.com/News/News%20Pages/Business/images-2/one-billion-dollars.jpg
Robust
http://langpop.com/
12
ServiceComposition
• Enterprise Service Bus• Service engines: BPEL, Intelligent Event Processing,
XSLT, Data Mashup, Encoding, etc• Wide range of adapters: communications, databases,
EIS, etc.• Very easy to use through Netbeans IDE
SOAP Web Services
• High-performance, extensible, easy-to-use Web services stack
• Secure, Reliable and Transactions Web services• Interoperable with .NET• Transport agnostic• Very easy to use through IDEs support• https://metro.dev.java.net/
RESTful Web Services
• Annotation-driven API to build RESTful Web services> Resources / Methods / Representations
• Rapid creation of RESTful WS from JPA entity classes and patterns
• Generation of JavaScript client stubs• Test client generation for testing RESTful web services• Very easy to use through IDEs support• Jersey, RESTEasy, Restlet, CXF, ...
• Standard (JSR 116, 289) for developing and deploying communications applications
• Adds SIP servlet support on top of Java EE / GlassFish• Allows Converged Java EE, SIP applications• Test client generation for testing SIP services.• Very easy to use through IDEs support• https://sailfin.dev.java.net/
SIP Applications
Java EE is a monolithOne size fits all
Java EE 6 Web Profile 1.0
●Fully functional mid-sized profile● Actively discussed in the Java EE 6 Expert Group and
outside it● Technologies
● Servlets 3.0, JSP 2.2, EL 2.2, Debugging Support for Other Languages 1.0, JSTL 1.2, JSF 2.0, Common Annotations 1.1, EJB 3.1 Lite, JTA 1.1, JPA 2.0, Bean Validation 1.0, Managed Beans 1.0, Interceptors 1.1, Context & Dependency Injection 1.0, Dependency Injection for Java 1.0
Extensible
Java EE 6 Ease-of-use
• More annotations• More POJOs• Less XML
> Optional “web.xml”, “faces-config.xml”
• Simplified packaging
Ajax
• Java Server Faces 2.0> Integrated Ajax support> Facelets as templating language
Reverse Ajax / Comet
• Comet> Techniques that enable a server to push data to client browsers
through an HTTP open line of communication• Atmosphere: POJO-based portable framework
JVM
Co-hosting Java EE & Dynamic Langs
• GlassFish runs dynamic language applications along side Java EE apps with security, scalability, Java language and APIs benefits.
Pluggable Web Framework
JVM
V3 Kernel
Django ...
Jython Container
Grizzly
WSGI
JSF
Web Container
Servlet Spec
Grails ...
GlassFish v3 Modules
Web Framework Interface
GlassFish v3 Modules Java Framework
Ruby Framework
Python Framework
JRuby Container
Rack
Rails Merb ...
Key
JavaFX Vision
JavaFX is the platform for creating and delivering Rich Internet Applications
across all the screens of your life
JavaFX is Powered by Java
Java FX
• http://javafx.com/• Declarative Scripting Language
> Syntax Java-like with shades of JavaScript> For content designers and media engineers
• Facilitates rapid GUI development• Runs on the Java Virtual Machine• Richness of Java development
JavaFX Authoring Tool
Space is big. Really big. You just won’t believe how vastly, hugely, mind bogglingly big it is. I mean, you may think it’s a long way down the road to the chemist, but that’s just peanuts to space.
— Douglas Adams, The Hitchhiker’s Guide to the Galaxy
Project Jigsaw
JDK 7 #1: Modularity
• Address the “jar hell”• Enables scale down• Improve performance
> Download & Startup Time• Dependencies can now be more clearly defined
Logging NIO
JMXJavaBeans
JNDI
RMI
CORBA
AWT, ...
Applet
JDBC
Declaring that a class belongs to a module
module M;package P;
public class Foo { ... }
Defining a module in module-info.java file
module M @1.0 { requires N @2.1; requires L @0.5;}
JDK 7 #2: Multi-Lingual VM
• InvokeDynamic / JSR 292• New bytecode for Dynamic languages• 2-3x more efficient code generation
JDK 7 - Other Key Features
• G1 GC: Lower pause times & better predictability• Project Lambda (aka Closures)• NIO.2: File system & Asynchronous APIs
> Directory search, Symbolic Links, Listen to changes in file system
• Some change ...
Credits: http://www.flickr.com/photos/joeshlabotnik/2143212474/
JDK 7 #3: Project Coin
Collection of Literals
final List<Integer> piDigits = Collections.unmodifiableList(Arrays.asList( 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9 ));
final List<Integer> piDigits = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9];
final Set<Integer> primes = { 2, 7, 31, 127, 8191, 131071, 524287 };
String in “switch” statements
String s = ...switch(s) { case "foo": processFoo(s); break;}
String in “switch” statements
String s = ...switch(s) { case "quux": processQuux(s); // fall-through
case "foo": case "bar": processFooOrBar(s); break;
case "baz": processBaz(s); // fall-through
default: processDefault(s); break;}
Automatic Resource Management
static String readFirstLineFromFile(String path) throws IOException { BufferedReader br = new BufferedReader(new FileReader(path)); try { return br.readLine(); } finally { br.close(); } }
static String readFirstLineFromFile2(String path) throws IOException { try (BufferedReader br = new BufferedReader(new FileReader(path)) { return br.readLine(); } }
Improved Type Inference forGeneric Instance CreationMap<String, List<String>> anagrams = new HashMap<String, List<String>>();
Map<String, List<String>> anagrams = new HashMap<>();
NetBeans 6.9
• Visual JavaFX GUI Editing• JDK 7• Spring 3• Zend and CakePHP• Improved productivity with Java EE 6• . . .
http://wiki.netbeans.org/NetBeans_69
Development
• Team collaboration> Presence> Chat> Continuous integration> Issue Tracking> Team Member Status Resources
• Cloud Plug-In• Web on Web• . . .
Powering the Next Generation Services with JavaTM Platform
Arun Gupta, GlassFish GuyOracle Corpblogs.sun.com/arungupta, @arungupta
48