Upload
oracle-espana
View
309
Download
6
Tags:
Embed Size (px)
Citation preview
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted
Últimas novedades de Java : JDK 8 y JavaEE7
Joan Carles Agustí i MasPrincipal Sales ConsultantMadrid, jueves 12 de Junio 2014
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Safe Harbor StatementThe following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
Oracle Confidential – Internal/Restricted/Highly Restricted 3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 4
Presentación de la sesión
• JDK 8 introduce importantes novedades y mejoras en cuanto a productividad y rendimiento tales como: streams, parallel processing, lambda expressions, etc
• JavaEE 7 tiene como temas principales el soporte HTML5 o mejoras en productividad y escalabilidad
• Pero aún hay mas
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 5
Agenda
1
2
Novedades JDK8
Java EE 7 y futuro
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 6
Agenda
1
2
Novedades JDK8
Java EE 7 y futuro
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• Simplificar el desarrollo de las aplicaciones para ser mas productivos
• Facilitar un mismo estilo de desarrollo común e independiente del despliegue ( cloud, mobile, Social, ..)
• Un viejo slogan : “any device, any size, any market” ( IoT ) www.oracle.com/java8
“Create the Future with Java 8” ---- 18 Marzo 2014
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Java SE 8www.oracle.com/java8
Características Beneficio Mensaje
Streams Facil distribución del proceso de colecciones sobre varios threads
Mejor productividad al desarrollo con mejor rendimiento en runtime.
Expresiones lambda Estilo de programación mas funcional Simplificación y flexibilidad al programar con un estilo más orientado a la funcionalidad.
Anotaciones y tipos Facilidad en la progrmación para evitar errores de compilación
Mejora en el tiempo de desarollo
Date and Time API API simplificada API mas entendible y mejoras en el rendimiento
Compactación de perfiles Reducción del tamaño del JRE Expande las posibilidades de JAVA a entornos con un “footprint” limitad
Motor Nashorn para JavaScript Mejoras en el rendimiento de JavaScript JavaScript rápido
JavaFX Se añade soporte a HTML 5. Interoperación con SWING
Soporte a un visor HTML 5 , 3-D, embeded Swing, nuevos controles UI
Java Mission Control 5.3 Profiling Convergencia de JVM
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 9
Expresiones LambdaClausuras y programación funcional
• Lambda, Clausuras y programación funcional : conceptos matemáticos relacionados en el uso de funciones que admiten funciones como parámetros…Su adopción impacta en la productividad y sencillez del estilo de programación
public static ArrayList double(ArrayList x)
{
ArrayList y = new ArrayList();
for (Iterator i = x.iterator(); i.hasNext(); )
y.add(i.next() * 2);
return y;
}
function double($x) {
$y = array();
foreach ($x as $e)
array_push($y, $e*2);
return $y;
}
double x = map (*2) x
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Default methods• Históricamente, no podemos añadir nuevos métodos a interfaces
existentes– Nos puede romper implementaciones existentes ….. ¿Qué hacemos con los lambdas?
• Esto puede ser un problema cuando nuestras APIs core tienen 15 años– Necesitamos tecnología para “recubrir” nuestras interfaces antiguas
• Los “Default methods” nos permite la compatibilidad de añadir nuevos métodos a interfaces existentes
Collection<Person> people = ...;
int highestWeight = people.stream()
interface Collection<T> { default Stream<T> stream() {
}
}
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Java Mission Control 5.3
• Capacidad de analizar dónde hay problemas durante todo el ciclo de desarrollo de apps Java
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Java SE 8 Compact Profiles
Optional Components
Hotspot VM
Base Compact1 Classes
SE 8 Compact Profiles
Compact2 Class libraries
Compact3 Class libraries
1
2
3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Compact Profiles Las classes se categorizan y asi sabemos cuando pueden ser utilizadas
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Java SE 8 Compact Profiles SizesCurrent Static Footprint Sizes
Compact1 Compact2 Compact3 Full JRE
Java SE Embedded 8Linux x86
VM
11MB
Minimal
15MB
Minimal
21MB
Client
49MB
Client
Java SE Embedded 8 Linux ARM hard-float
VM
11MB
Minimal
15MB
Minimal
20MB
Client
48MB
Client
Java SE 8 Linux x86 Reference Implementation
VM
16MB
Client
23MB
Client
27MB
Client
97MB
Client
Headlesscompact1
10.4 MB
FX base graphics 7.8 MB
FX controls 2.2 MB
Total w/FX BaseTotal + controls
18.2 MB20.4 MB
Embedded FX Sizearm hard-float
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Java SE EmbeddedJava 8 Release Highlights
Configurable Footprint
Better Performance
Optimized for Embedded
Flight Recorder & Mission Control
Rich graphics
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
HealthcareIndustrialAutomation
HomeAutomation
SmartUtilities
AutomotiveTelematics
Java ME 8: Enabling New IoT services
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
El camino hacia nuevos “Servicios” con un mismo estilo
Siempre conectados. Gran variedad de
sensores con “software” distintos
Generación de análisis en tiempo real que nos permite una decisión
relacionada con el negocio
Nos permite un nivel de interactuación y
respuesta con elementos opacos
hasta la fecha
Responsiveness Big DataIntelligent Devices
Nuevos Servicios
GetGlobalTemp(time -> eventAlarm() )
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 18
Program Agenda
1
2
Novedades JDK8
Java EE 7 y futuro
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• Foco en la productividad:• Más anotaciones• “Dependency injecton”• Batch / Caching• Nuevas Apis para JMS
• Soporte para HTML 5• WebSockets• Json
• CLOUD ¿? Demasiado pronto para estándares
Java EE 7 : Alcance Revisado --- 12 de Junio 2013
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Java EE 7 : Principales JSRs
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• REST service en base anotaciones ( @Post, @Delete,…)• API Cliente : Estandariza y simplifica los patrones de respuesta en la parte
servidora. • Filtros e Interceptadores: Nos permite tener control antes del procesado de
la petición y después del procesado de la respuestas.• Procesado asíncrono –
API Servidor & API Cliente• Soporte Hyper-links• Configuración única.
Java API para RESTFul Web Services 2.0 ( JSR339 )
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• Reducción drástica de las plantillas de código
• Inyección de recursos• Connection, Session y otros objetos
son AutoCLoseables• API simplificada tanto para Java SE
como para EE
Java Message Service 2.0 . Simplificación API
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• JSON un formato para el intercambio sencillo de datos:– Mínimo, textual y dentro de JavaScript– (“name”:”Bob”, “age”:20,…)– Ampliamente usado (REST,DB,, Browser)– API para parsear, generar, transformar, conslutar– Modelo de objetos y Streaming API
( similar a DOM/SAX)
Java API para JSON Processing 1.0 (JSR 353)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• HTTP es half-duplex, prolijo…• Sobre el PUSH Server hay muchos sabores
( Polling, Long Polling/Comet/Ajax,…)• En definitiva : complejo, ineficiente, con
mucho gasto• WebSocket: Basado en TCP, bidireccional,
full-dúplex..• Propuesto originalmente como parte de
HTML 5.
WebSites Interactivos ( HTML 5.0, WebSocket,..)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• Establece Conexión ( Single conexión TCP )• Envío de mensajes bidireccionales• Envío de mensajes independientemente ( Full Dúplex )• Finaliza conexión
Java API para WebSocket 1.0 ( JSR 356 )
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
HTML 5.0 … La otra parte
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• Estandarizar una arquitectura Cloud• Multi-tenancy para aplicaciones SaaS• Entrega incremental de las JSRs• Modularidad ( Jigsaw )
Java EE 8 y futuro
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
oracle.com/java8
oracle.com/java8launchjava.oracle.com
@Java
blogs.oracle.com/java
ILoveJava
YouTube.com/Java
www.java.net/challenge
education.oracle.com/java
oracle.com/javamagazine
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |