SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Java EE 7 – New
Features?
Presenter: Shahzad Badar
Agenda
 Who am I?
 Java EE 7 – New Features?
Pakistan Java User Group
Who am I?
A programmer working on java since
2002
Spent most of the time in Islamabad
Leading Pakistan Java User Group
Working in Royal Cyber
Pakistan Java User Group
Catch me
@shahzadbadar
shahzadbadar@gmail.com
http://www.implementsjava.com
Pakistan Java User Group
Pakistan Java User Group
Pakistan Java User Group
Java EE 6 - Achievements
 50,000,000 + downloads
 #1 choice for enterprise developers
 #1 application development platform
 Fastest adoptions of any Java EE release – 18 complaint
servers
Pakistan Java User Group
Java EE 6 – Main Features
 Web Profile
 EJB packaged in war
 Optional web.xml
 Type-safe dependency injection
 CDI Events
 JSF standardizing on facelets
 @Schedule
Pakistan Java User Group
JEE 7 Theme
Pakistan Java User Group
Pakistan Java User Group
Active JSRs
 JSR 342: Java EE 7 Platform
 JSR 338: Java API for RESTful Web Services 2.0
 JSR 339: Java Persistence API 2.1
 JSR 340: Servlet 3.1
 JSR 341: Expression Language 3.0
 JSR 343: Java Message Service 2.0
 JSR 344: JavaServer Faces 2.2
 JSR 345: Enteprise JavaBeans 3.2
 JSR 346: Contexts and Dependency Injection 1.1
 JSR 349: Bean Validation 1.1
 JSR 236: Concurrency Utilities for Java EE 1.0
 JSR 352: Batch Applications for the Java Platform 1.0
 JSR 353: Java API for JSON Processing 1.0
 JSR 356: Java API for WebSocket 1.0
Pakistan Java User Group
Concurrency and Java EE
 Managing your own threads within a Java EE container is
not recommended
 Using java.util.concurrent API in a Java EE application
component such as EJB or Servlet are problematic since the
container and server have no knowledge of these resource
 Provides simple, safe API for concurrency in Java EE
 Builds on Java SE concurrency
java.util.concurrent.ExecutorService
Pakistan Java User Group
Pakistan Java User Group
Batch Applications for the Java
Platform
 Batch processing is execution of series of "jobs"
that is suitable for non-interactive, bulk-oriented
and long-running tasks.
 no standard Java programming model existed for
batch applications.
Pakistan Java User Group
Pakistan Java User Group
Java EE Web Profile Enhancements
 The Java Enterprise Edition Web Profile was introduced
in Java EE 6
 Most Web applications have significant requirements
in the areas of transaction management, security, and
persistence.
 but are not supported by standalone servlet containers
 Web Profile is provided with pre-installed, pre-
integrated, fully tested Web infrastructure features.
 The Java EE 7 Web Profile adds support for HTML5
with WebSockets, JSON, JAX-RS 2.0, and more.
Pakistan Java User Group
Bean Validation 1.1
 Method constraints
 Bean Validation artifacts injectable
 Fixes, clarifications and enhancements
Pakistan Java User Group
Bean Validation 1.1
Method Level Constraints
Pakistan Java User Group
public void placeOrder( @NotNull String productName,
@NotNull @Max(“10”) Integer quantity,
@Customer String customer) {
. . .
}
@Future
public Date getAppointment() {
. . .
}
JSF 2.2
 HTML5 Support
 @FlowScoped
 @ViewScoped for CDI
 Managed beans deprecated/CDI alignment
 File upload component
 View actions
 Multi-templating
 Security
 Fixes and enhancements
Pakistan Java User Group
JSON Processing Support
 JSON (JavaScript Object Notation) is a lightweight data-interchange
format. It is easy for humans to read and write.
 It is easy for machines to parse and generate.
 It is based on a subset of the JavaScript Programming
Language, Standard ECMA-262 3rd Edition - December 1999.
 JSON is a text format that is completely language independent but uses
conventions that are familiar to programmers
Pakistan Java User Group
{
“employee": [
{ "firstName":"John" , "lastName":"Doe" },
{ "firstName":"Anna" , "lastName":"Smith" },
{ "firstName":"Peter" , "lastName":"Jones" }
]
}
JSON Example
JSON Implementations for Java
 org.json.
 org.json.me.
 Jackson JSON Processor.
 Json-lib.
 JSON Tools.
 Stringtree.
 SOJO.
 Jettison.
 json-taglib.
 XStream.
 Flexjson.
 JON tools.
 Argo.
 jsonij.
 fastjson.
 mjson.
 jjson.
 json-simple.
 json-io.
 JsonMarshaller.
 google-gson.
 Json-smart.
 FOSS Nova JSON.
 Corn CONVERTER.
Pakistan Java User Group
a lot of implementations for other languages
Why we need another API?
Pakistan Java User Group
• JSON has become a defacto data transfer standard specially for
RESTful Web Services.
• Java applications use different implementations to consume and
process JSON data
• There should be standardized Java API for JSON so that
applications do not need to bundle the implementation libraries
JSON Processing Support
 API to parse and generate JSON
 Streaming API
 Low level efficient way to parse/generate JSON
 Provide pluggability for parser/generator
 Object Model
 Simple, Easy-to-use high-level API
 Implemented on top of Streaming API
Pakistan Java User Group
Java API for JSON Processing
Writing JSON (Object Model API)
Pakistan Java User Group
“employees": [
{ “firstName": “Asif", “lastName": ”Naveed” },
{ “firstName": “Khalid", “lastName": ”Ali” }
]
JsonObject jsonObject =
new JsonBuilder() .beginArray(“employees")
.beginObject() .add(“firstName", “Asif")
.add(“lastName", “Naveed") .endObject()
.beginObject () .add(“firstName", “Khalid")
.add(“lastName", “Ali").endObject()
.endArray() .build();
Java API for JSON Processing
Pakistan Java User Group
{
"firstName": "Javaid", "lastName": “Shah", "age": 19,
"phoneNumber": [
{ "type": “cell", "number": “03218983449" },
{ "type": "fax", "number": “02142423212" }
]
}
Iterator<Event> it = parser.iterator();
Event event = it.next(); // START_OBJECT
event = it.next(); // KEY_NAME
event = it.next(); // VALUE_STRING
String name = parser.getString(); // "Javaid”
Reading JSON (Streaming API)
Web Socket Support
In age of Web 2.0 / 3.0 , We need interactive websites
Pakistan Java User Group
but
In the standard HTTP model, a server cannot initiate a connection
with a client nor send an unrequested HTTP response to a client;
thus, the server cannot push asynchronous events to clients.
Why WebSocket?
 HTTP is half duplex
 HTTP is verbose
 Hacks for Server Push
 Polling
 Long Polling
 Comet/Ajax
 Complex, Wasteful, Inefficient
Pakistan Java User Group
HTTP Communication
Pakistan Java User Group
Polling
Pakistan Java User Group
Long Polling
Pakistan Java User Group
HTTP Streaming (Comet)
Pakistan Java User Group
WebSocket to rescue
 TCP based, bi-directional, full-duplex messaging
 Capable of sending both UTF-8 string and binary
frames in any direction at the same time
 Operating from a single socket across the web
 As part of HTML5, the application of the client
interface will become native to all modern browsers
 To establish a Web Socket connection, the browser or
client simply makes a request to the server for an
upgrade from HTTP to a Web Socket
Pakistan Java User Group
WebSocket to rescue
Pakistan Java User Group
Pakistan Java User Group
“Reducing kilobytes of data to 2
bytes…and reducing latency from
150ms to 50ms is far more than
marginal. In fact, these two factors
alone are enough to make Web Sockets
seriously interesting to Google.”
Java WebSocket Implementations
Pakistan Java User Group
WebSocket API
Connection Life Cycle
@Singleton
@WebSocketEndpoint(path=”/chat”)
public class ChatServer {
Set<Session> peers = ...
@WebSocketOpen
public void onOpen(Session peer) { peers.add(session);
}
@WebSocketClose
public void onClose(Session session) {
peers.remove(session);
}
...
Pakistan Java User Group
WebSocket API
WebSocket Communication
. . .
@WebSocketMessage
public void message(String message, Session client)
throws IOException {
for (Session session : peers) {
if (!session.equals(client)) {
session.getRemote().sendObject(message);
}
}
}
}
Pakistan Java User Group
JPA 2.1 – New Features
The first spec to include new features is the JPA 2.1. The new
features can be described with the following short list:
 Multi-Tenancy (Table discriminator)
 Stored Procedures
 Custom types and transformation methods - Query
by Example
 Dynamic PU Definition
 Schema Generation (Additional mapping metadata
to provide better standardization)
Pakistan Java User Group
Servlet 3.1 – New Features
NIO.2 async I/O
Leverage Java EE concurrency
Security improvements
Web Sockets support
Ease-of-Development
Pakistan Java User Group
Enteprise JavaBeans 3.2 – New
Features
The scope of EJB 3.2 is intended to be relatively
constrained in focusing on these goals.
 Incremental factorization (Interceptors)
 Further use of annotations to simplify the EJB
programming model
 Proposed Optional: BMP/CMP
 Proposed Optional: Web Services invocation using
RPC
Pakistan Java User Group
Java EE 8 Plan
 JSON-B
 JCache
 More CDI/EJB alignment
 Cloud, PaaS, multitenancy/SaaS
 JMS.next()?
 JAX-RS.next()?
 Modularity?
 NoSQL?
 Action-oriented Web framework/HTML 5?
 Configuration API?
 Security?
Pakistan Java User Group
References
 http://www.oracle.com/technetwork/java/javaee/index.
html
 https://blogs.oracle.com/arungupta/
 http://www.infoq.com/presentations/Java-EE-7-8
Pakistan Java User Group
Pakistan Java User Group

Weitere ähnliche Inhalte

Was ist angesagt?

Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Murat Yener
 
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGThe Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGArun Gupta
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depthVinay Kumar
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Hirofumi Iwasaki
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RSFahad Golra
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - CoreDzmitry Naskou
 
Better Front-end Development in Atlassian Plugins
Better Front-end Development in Atlassian PluginsBetter Front-end Development in Atlassian Plugins
Better Front-end Development in Atlassian PluginsWojciech Seliga
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudArun Gupta
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom Joshua Long
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentationsourabh aggarwal
 
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...Edureka!
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerArun Gupta
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2aIvan Ma
 
Spring 3.1: a Walking Tour
Spring 3.1: a Walking TourSpring 3.1: a Walking Tour
Spring 3.1: a Walking TourJoshua Long
 
50 features of Java EE 7 in 50 minutes at Geecon 2014
50 features of Java EE 7 in 50 minutes at Geecon 201450 features of Java EE 7 in 50 minutes at Geecon 2014
50 features of Java EE 7 in 50 minutes at Geecon 2014Arun Gupta
 
Spring Framework Presantation Part 1-Core
Spring Framework Presantation Part 1-CoreSpring Framework Presantation Part 1-Core
Spring Framework Presantation Part 1-CoreDonald Lika
 
Spring5 hibernate5 security5 lab step by step
Spring5 hibernate5 security5 lab step by stepSpring5 hibernate5 security5 lab step by step
Spring5 hibernate5 security5 lab step by stepRajiv Gupta
 

Was ist angesagt? (19)

Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
 
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGThe Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RS
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
Better Front-end Development in Atlassian Plugins
Better Front-end Development in Atlassian PluginsBetter Front-end Development in Atlassian Plugins
Better Front-end Development in Atlassian Plugins
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the Cloud
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentation
 
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
 
Spring 3.1: a Walking Tour
Spring 3.1: a Walking TourSpring 3.1: a Walking Tour
Spring 3.1: a Walking Tour
 
50 features of Java EE 7 in 50 minutes at Geecon 2014
50 features of Java EE 7 in 50 minutes at Geecon 201450 features of Java EE 7 in 50 minutes at Geecon 2014
50 features of Java EE 7 in 50 minutes at Geecon 2014
 
Spring Framework Presantation Part 1-Core
Spring Framework Presantation Part 1-CoreSpring Framework Presantation Part 1-Core
Spring Framework Presantation Part 1-Core
 
Spring5 hibernate5 security5 lab step by step
Spring5 hibernate5 security5 lab step by stepSpring5 hibernate5 security5 lab step by step
Spring5 hibernate5 security5 lab step by step
 
GlassFish v3 at JavaZone 09
GlassFish v3 at JavaZone 09GlassFish v3 at JavaZone 09
GlassFish v3 at JavaZone 09
 

Ähnlich wie Java ee 7 New Features

What’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyWhat’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyMohamed Taman
 
Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Jagadish Prasath
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Red Hat Developers
 
What's new in Java EE 7? From HTML5 to JMS 2.0
What's new in Java EE 7? From HTML5 to JMS 2.0What's new in Java EE 7? From HTML5 to JMS 2.0
What's new in Java EE 7? From HTML5 to JMS 2.0Bruno Borges
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7Bruno Borges
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 DemystifiedAnkara JUG
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootJosué Neis
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New EvolutionAllan Huang
 
Java EE7
Java EE7Java EE7
Java EE7Jay Lee
 
JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?gedoplan
 
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2
 
Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Pavel Kaminsky
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureIndicThreads
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...jaxLondonConference
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Arun Gupta
 
Jax ws
Jax wsJax ws
Jax wsF K
 

Ähnlich wie Java ee 7 New Features (20)

What’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyWhat’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new Strategy
 
Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
 
What's new in Java EE 7? From HTML5 to JMS 2.0
What's new in Java EE 7? From HTML5 to JMS 2.0What's new in Java EE 7? From HTML5 to JMS 2.0
What's new in Java EE 7? From HTML5 to JMS 2.0
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
 
Java ee7 1hour
Java ee7 1hourJava ee7 1hour
Java ee7 1hour
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New Evolution
 
Java EE7
Java EE7Java EE7
Java EE7
 
JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?
 
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
 
WSO2 AppDev platform
WSO2 AppDev platformWSO2 AppDev platform
WSO2 AppDev platform
 
Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The Future
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5
 
Jax ws
Jax wsJax ws
Jax ws
 

Kürzlich hochgeladen

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Kürzlich hochgeladen (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

Java ee 7 New Features

  • 1. Java EE 7 – New Features? Presenter: Shahzad Badar
  • 2. Agenda  Who am I?  Java EE 7 – New Features? Pakistan Java User Group
  • 3. Who am I? A programmer working on java since 2002 Spent most of the time in Islamabad Leading Pakistan Java User Group Working in Royal Cyber Pakistan Java User Group
  • 7. Java EE 6 - Achievements  50,000,000 + downloads  #1 choice for enterprise developers  #1 application development platform  Fastest adoptions of any Java EE release – 18 complaint servers Pakistan Java User Group
  • 8. Java EE 6 – Main Features  Web Profile  EJB packaged in war  Optional web.xml  Type-safe dependency injection  CDI Events  JSF standardizing on facelets  @Schedule Pakistan Java User Group
  • 9. JEE 7 Theme Pakistan Java User Group
  • 11. Active JSRs  JSR 342: Java EE 7 Platform  JSR 338: Java API for RESTful Web Services 2.0  JSR 339: Java Persistence API 2.1  JSR 340: Servlet 3.1  JSR 341: Expression Language 3.0  JSR 343: Java Message Service 2.0  JSR 344: JavaServer Faces 2.2  JSR 345: Enteprise JavaBeans 3.2  JSR 346: Contexts and Dependency Injection 1.1  JSR 349: Bean Validation 1.1  JSR 236: Concurrency Utilities for Java EE 1.0  JSR 352: Batch Applications for the Java Platform 1.0  JSR 353: Java API for JSON Processing 1.0  JSR 356: Java API for WebSocket 1.0 Pakistan Java User Group
  • 12. Concurrency and Java EE  Managing your own threads within a Java EE container is not recommended  Using java.util.concurrent API in a Java EE application component such as EJB or Servlet are problematic since the container and server have no knowledge of these resource  Provides simple, safe API for concurrency in Java EE  Builds on Java SE concurrency java.util.concurrent.ExecutorService Pakistan Java User Group
  • 14. Batch Applications for the Java Platform  Batch processing is execution of series of "jobs" that is suitable for non-interactive, bulk-oriented and long-running tasks.  no standard Java programming model existed for batch applications. Pakistan Java User Group
  • 16. Java EE Web Profile Enhancements  The Java Enterprise Edition Web Profile was introduced in Java EE 6  Most Web applications have significant requirements in the areas of transaction management, security, and persistence.  but are not supported by standalone servlet containers  Web Profile is provided with pre-installed, pre- integrated, fully tested Web infrastructure features.  The Java EE 7 Web Profile adds support for HTML5 with WebSockets, JSON, JAX-RS 2.0, and more. Pakistan Java User Group
  • 17. Bean Validation 1.1  Method constraints  Bean Validation artifacts injectable  Fixes, clarifications and enhancements Pakistan Java User Group
  • 18. Bean Validation 1.1 Method Level Constraints Pakistan Java User Group public void placeOrder( @NotNull String productName, @NotNull @Max(“10”) Integer quantity, @Customer String customer) { . . . } @Future public Date getAppointment() { . . . }
  • 19. JSF 2.2  HTML5 Support  @FlowScoped  @ViewScoped for CDI  Managed beans deprecated/CDI alignment  File upload component  View actions  Multi-templating  Security  Fixes and enhancements Pakistan Java User Group
  • 20. JSON Processing Support  JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write.  It is easy for machines to parse and generate.  It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999.  JSON is a text format that is completely language independent but uses conventions that are familiar to programmers Pakistan Java User Group { “employee": [ { "firstName":"John" , "lastName":"Doe" }, { "firstName":"Anna" , "lastName":"Smith" }, { "firstName":"Peter" , "lastName":"Jones" } ] } JSON Example
  • 21. JSON Implementations for Java  org.json.  org.json.me.  Jackson JSON Processor.  Json-lib.  JSON Tools.  Stringtree.  SOJO.  Jettison.  json-taglib.  XStream.  Flexjson.  JON tools.  Argo.  jsonij.  fastjson.  mjson.  jjson.  json-simple.  json-io.  JsonMarshaller.  google-gson.  Json-smart.  FOSS Nova JSON.  Corn CONVERTER. Pakistan Java User Group a lot of implementations for other languages
  • 22. Why we need another API? Pakistan Java User Group • JSON has become a defacto data transfer standard specially for RESTful Web Services. • Java applications use different implementations to consume and process JSON data • There should be standardized Java API for JSON so that applications do not need to bundle the implementation libraries
  • 23. JSON Processing Support  API to parse and generate JSON  Streaming API  Low level efficient way to parse/generate JSON  Provide pluggability for parser/generator  Object Model  Simple, Easy-to-use high-level API  Implemented on top of Streaming API Pakistan Java User Group
  • 24. Java API for JSON Processing Writing JSON (Object Model API) Pakistan Java User Group “employees": [ { “firstName": “Asif", “lastName": ”Naveed” }, { “firstName": “Khalid", “lastName": ”Ali” } ] JsonObject jsonObject = new JsonBuilder() .beginArray(“employees") .beginObject() .add(“firstName", “Asif") .add(“lastName", “Naveed") .endObject() .beginObject () .add(“firstName", “Khalid") .add(“lastName", “Ali").endObject() .endArray() .build();
  • 25. Java API for JSON Processing Pakistan Java User Group { "firstName": "Javaid", "lastName": “Shah", "age": 19, "phoneNumber": [ { "type": “cell", "number": “03218983449" }, { "type": "fax", "number": “02142423212" } ] } Iterator<Event> it = parser.iterator(); Event event = it.next(); // START_OBJECT event = it.next(); // KEY_NAME event = it.next(); // VALUE_STRING String name = parser.getString(); // "Javaid” Reading JSON (Streaming API)
  • 26. Web Socket Support In age of Web 2.0 / 3.0 , We need interactive websites Pakistan Java User Group but In the standard HTTP model, a server cannot initiate a connection with a client nor send an unrequested HTTP response to a client; thus, the server cannot push asynchronous events to clients.
  • 27. Why WebSocket?  HTTP is half duplex  HTTP is verbose  Hacks for Server Push  Polling  Long Polling  Comet/Ajax  Complex, Wasteful, Inefficient Pakistan Java User Group
  • 32. WebSocket to rescue  TCP based, bi-directional, full-duplex messaging  Capable of sending both UTF-8 string and binary frames in any direction at the same time  Operating from a single socket across the web  As part of HTML5, the application of the client interface will become native to all modern browsers  To establish a Web Socket connection, the browser or client simply makes a request to the server for an upgrade from HTTP to a Web Socket Pakistan Java User Group
  • 33. WebSocket to rescue Pakistan Java User Group
  • 34. Pakistan Java User Group “Reducing kilobytes of data to 2 bytes…and reducing latency from 150ms to 50ms is far more than marginal. In fact, these two factors alone are enough to make Web Sockets seriously interesting to Google.”
  • 36. WebSocket API Connection Life Cycle @Singleton @WebSocketEndpoint(path=”/chat”) public class ChatServer { Set<Session> peers = ... @WebSocketOpen public void onOpen(Session peer) { peers.add(session); } @WebSocketClose public void onClose(Session session) { peers.remove(session); } ... Pakistan Java User Group
  • 37. WebSocket API WebSocket Communication . . . @WebSocketMessage public void message(String message, Session client) throws IOException { for (Session session : peers) { if (!session.equals(client)) { session.getRemote().sendObject(message); } } } } Pakistan Java User Group
  • 38. JPA 2.1 – New Features The first spec to include new features is the JPA 2.1. The new features can be described with the following short list:  Multi-Tenancy (Table discriminator)  Stored Procedures  Custom types and transformation methods - Query by Example  Dynamic PU Definition  Schema Generation (Additional mapping metadata to provide better standardization) Pakistan Java User Group
  • 39. Servlet 3.1 – New Features NIO.2 async I/O Leverage Java EE concurrency Security improvements Web Sockets support Ease-of-Development Pakistan Java User Group
  • 40. Enteprise JavaBeans 3.2 – New Features The scope of EJB 3.2 is intended to be relatively constrained in focusing on these goals.  Incremental factorization (Interceptors)  Further use of annotations to simplify the EJB programming model  Proposed Optional: BMP/CMP  Proposed Optional: Web Services invocation using RPC Pakistan Java User Group
  • 41. Java EE 8 Plan  JSON-B  JCache  More CDI/EJB alignment  Cloud, PaaS, multitenancy/SaaS  JMS.next()?  JAX-RS.next()?  Modularity?  NoSQL?  Action-oriented Web framework/HTML 5?  Configuration API?  Security? Pakistan Java User Group