SlideShare una empresa de Scribd logo
1 de 51
Belfast Java User Group
Stuart Greenlees
Eamonn Long
Niall McLoughlin

Wednesday 23/10/2013
Belfast Java User Group
Agenda
Introduction to the Belfast JUG
• What is a JUG?
• Some Logistics
• How can you get involved?

JavaOne Key Notes
20+ New Features of JEE7
Extras
Belfast Java User Group
What is a JUG?
Belfast Java User Group

Java User Groups (JUGs) are volunteer organizations that strive to distribute Java-rela
Belfast Java User Group
Relation to Tech Forums?
Relation to LIT?
Belfast Java User Group
Meet Quarterly

October
2013

August
2014

February
2014

May
2014
Belfast Java User Group
Where can I find the Belfast JUG?
JUG Page on Java.Net: https://java.net/projects/belfast-jug

The Belfast JUG is on the MAP!
Belfast Java User Group
What are the Goals of the JUG?
Key
• Establish Regular meetings of Java Users in Belfast
• Share Information about Java
• Get people involved
Optional
• Adopt a JSR - https://java.net/projects/adoptajsr/pages/Home
• Adopt Open JDK - https://java.net/projects/adoptopenjdk/pages/AdoptOpenJDK
Belfast Java User Group
How can you get involved?
We Need Help!
• Create a Belfast JUG logo
• Create a simple website/wikki out on Java.Net

Contribute content
•
•
•
•
•
•

Join the Java.Net project
Post topic suggestions you would like to here about
Post recommendations of any good speakers you would like to hear from
Contributing to OpenSource we would love to hear from you
E.g. Night-hacking with Raspberry Pi
Post Content on the java.net wiki/mailing list
Belfast Java User Group
How Do I sign Up?
Belfast Java User Group
JUG Leadership Team
Stuart Greenlees – s.greenlees@liberty-it.co.uk
Eamonn Long (a.k.a BlueArsedFly) – e.long@liberty-it.co.uk
Niall McLoughlin – n.mclouoghlin@liberty-it.co.uk
JavaOne 2013 Keynote Speech
Internet of Things

Java 8

JEE7
Java 8 – What is a Lambda?
Lambda expressions are anonymous methods
Arguments
person

Arrow Expression or {Statement}
->
person.getAge() > minimumAge

Example usage with new Iterable.forEach default method:
employees.forEach(e -> e.setSalary(e.getSalary() * 1.03));
The general syntax consists of an argument list, the arrow token ->, and a
body. The body can either be a single expression, or a statement block. In the
expression form, the body is simply evaluated and returned. In the block form,
the body is evaluated like a method body.
Benefits
Internal Iteration
Pass Behaviour not just Data
Fluent Pipelined Operations
Lazy Evaluation
Parallelization
Java 8 –Streams
A stream is a sequence of elements. Unlike a collection, it is not a
data structure that stores elements. Instead, a stream carries
values from a source, such as collection, through a pipeline.
int sum = widgets.stream()
.filter(w -> w.getColor() == RED)
.mapToInt(w -> w.getWeight())
.sum();

// Filter
// Map
// Collect

The operations filter, map, and forEach are aggregate operations.
Aggregate operations process elements from a stream, not directly
from a collection.

A pipeline is a sequence of stream operations, which in this
example is filter-map-sum. In addition, aggregate operations
typically accept lambda expressions as parameters, enabling you to
customize how they behave.
Java 8 – Lambda Stream Methods
public interface Stream<T> extends BaseStream<T, Stream<T>> {
/**
* Returns a stream consisting of the elements of this stream that match
* the given predicate.
*
* @param predicate a <a href="package-summary.html#NonInterference">
*
non-interfering, stateless</a> predicate to apply to
*
each element to determine if it should be included
* @return the new stream
*/
Stream<T> filter(Predicate<? super T> predicate);
/**
* Returns a stream consisting of the results of applying the given
* function to the elements of this stream.
*
* @param <R> The element type of the new stream
* @param mapper a <a href="package-summary.html#NonInterference">
*
non-interfering, stateless</a> function to apply to each
*
element
* @return the new stream
*/
<R> Stream<R> map(Function<? super T, ? extends R> mapper);
}
Lambda – Filtering / Mapping
Filtering
List<Person> eligibleVoters =
potentialVoters.
stream().
// Get the List of voters as a Stream
filter(p -> p.getAge() > legalAgeOfVoting). // Filter using Predicate
collect(Collectors.toList()); // Convert Stream Back to List
Mapping
return mixedCaseStrings.
stream().
// Get Stream from List
map(s -> s.toUpperCase()). // Convert Value
collect(Collectors.toList());
// Convert Back to List
Lambda – Method References
// Reference to a Static method
Arrays.asList("a", "b", "c").forEach(Printers::print)

// Reference to an method on an instance
public static void printPages(Document doc, int[] pageNumbers)
{
Arrays.stream(pageNumbers).
map(doc::getPageContent).
forEach(Printers::print);
}
Java 8 – Lambda
http://openjdk.java.net/projects/lambda/
Streams – Brian Goetz/Paul Sandoz
CON7942_Sandoz-javaone-streamstopgear.pdf
Stuart Marks
TUT3877_Marks-JumpStartingLambda-v6.pdf
Brian Goetz – State of the Lambda
http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-final.html
Java Tutorial
http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html
JUnit Based Tutorial
https://github.com/AdoptOpenJDK/lambda-tutorial
Adam Bien – Java Rockstar
http://www.adam-bien.com/roller/abien/

Lightweight Java EE Architectures (Free Devcast)
http://www.adam-bien.com/roller/abien/entry/lightweight_java_ee_architectures_a

Rethinking JEE Design Patterns
EJB’s are cool
No need for DAO’s with EntityManager
No need for DTO’s with JPA Entity
No need to have an interface for every class

Setting up JEE7 projects with Maven3
http://www.adam-bien.com/roller/abien/entry/setting_up_java_ee_7
Starting WebSphere with Java EE 6...in 3 seconds
http://www.adam-bien.com/roller/abien/entry/starting_websphere_with_java_ee
Building Modular Cloud Apps
- Luminis Technologies http://luminis-technologies.com
20+ New Features of JEE7
20+ New Features of JEE7
Bean Validation: Method Validation
20+ New Features of JEE7
Concurrency: ManagedExecutor
20+ New Features of JEE7
JPA: Schema Generation
20+ New Features of JEE7
JPA: @Index
20+ New Features of JEE7
JPA: Stored Procedure
20+ New Features of JEE7
JTA: @Transactional
20+ New Features of JEE7
JTA: @TransactionScoped
20+ New Features of JEE7
JMS: JMSContext API
20+ New Features of JEE7
JMS: Autocloseable
20+ New Features of JEE7

Servlet: Improved Security
20+ New Features of JEE7
WebSocket: Annotated server endpoint
20+ New Features of JEE7

WebSocket: Annotated client endpoint
20+ New Features of JEE7
JSF: Faces Flow
20+ New Features of JEE7
JSF: Pass-through Attributes
20+ New Features of JEE7
JSF: File Upload Component
20+ New Features of JEE7
JAX-RS: Client API
20+ New Features of JEE7
JAX-RS: Async Client
20+ New Features of JEE7
JAX-RS: Async Server
20+ New Features of JEE7
JSON-P: JSON Builder
20+ New Features of JEE7
Batch: Chunk-style Processing
20+ New Features of JEE7
Batch: Chunk-style processing
20+ New Features of JEE7
Batch: Batchlet-style Processing
20+ New Features of JEE7
Batch: Job/Step/Chunk Listeners
20+ New Features of JEE7

Batch: Job/Step/Chunk Listeners
20+ New Features of JEE7
Batch: Creating Workflows
20+ New Features of JEE7
Batch: Creating Workflows
Ten Tips for Unit Tests
•

•

Make the tests understandable
• Comments
• Expected Behaviour
• Diagnostics

•

Absolute Repeatability
• Must trust each test

•

Independent Tests only
• Must run in any order
• No dependencies

•

Diagnostics on Failure
• Message in assets
• Reference input data
• Record test environment info
• Make it simple to debug

•

•

Think Before Testing
• Input Data
• What is it called
• Expected Output

No hard coding environment
• Chained exceptions
• Use config files for portability
• Mock objects
• No databases

•

No Extraneous Output
• Too much output == confusion
• Slient test
• Use option/config to turn debug on

Small and Simple
• Use setup and teardown
• Separate test logic from setup to make it easier to debug

•

Test 1 thing only
• One scenario per test so its more obvious why it failed
• Enables faster debugging

•

Fast Tests only
• Run as often as possible
• Quick results
• Maintain quaility bar
• More likely that devs will run with every change
Stress Testing – Arquillian & JMeter
http://arquillian.org/

Arquillian brings the test to the runtime so you don’t have to
manage the runtime from the test (or the build). Arquillian eliminates
this burden by covering all aspects of test execution, which entails:
• Managing the lifecycle of the container (or containers)
• Bundling the test case, dependent classes and resources into a

ShrinkWrap archive (or archives) Executing the tests inside (or against)
the container

http://jmeter.apache.org/
Apache JMeter - may be used to test performance both on static and
dynamic resources (Files, Web dynamic languages - PHP, Java, ASP.NET,
etc. -, Java Objects, Data Bases and Queries, FTP Servers and more).
It can be used to simulate a heavy load on a server, group of servers,
network or object to test its strength or to analyze overall performance
under different load types. You can use it to make a graphical analysis of
performance or to test your server/script/object behavior under heavy
concurrent load.
Security – OWASP Top 10 Web App Defenses
• SQL Injection Defence
• Query Parameterization
• Password Defences
• Don’t limit length
• credential-specific salt
• Keyed functions
• Multi-Factor Authentication
• SMS / Mobile App / Tokens
• Cross Site Scripting Defence
• OWASP Java Encoder
• OWASP HTML Sanitizer
• JSHtmlSanitizer
• Cross Site Request Forgery Defence
• CSRF Cryptographic Tokens
• Re-authentication

• Controlling Access
• Apache Shiro - comprehensive solution to
authentication, authorization, cryptography, and
session management.
• Clickjacking Defence
• response.addHeader( "X-FRAME-OPTIONS",
"SAMEORIGIN" );
• App Layer Intrusion Detection
• Input validation failure server side on non-user
editable parameters
• OWASP AppSensor Project
• Encryption in Transit (HTTPS/TLS)
• Credentials and Session IDs Encrypted in Transit
• Use HTTPS/TLS from login to logout
• Certificate Pinning
• File Upload Security

Jim Manico
https://oracleus.activeevents.com/2013/connect/fileDownload/session/0C826D948B4001909E22C76D363E0E86
/CON5523_Manico-Top%20Ten%20Defenses%20v11.ppt
Security – OWASP Recommended Tools
OWASP Java Encoder Project
https://www.owasp.org/index.php/OWASP_Java_Encoder_Project

XSS Defence - OWASP HTML Sanitizer Project
https://www.owasp.org/index.php/OWASP_Java_HTML_Sanitizer_Project

Apache SHIRO
http://shiro.apache.org/

App Sensor Intrusion Detection
https://www.owasp.org/index.php/OWASP_AppSensor_Project

Más contenido relacionado

La actualidad más candente

Best Practices for Interoperable XML Databinding with JAXB
Best Practices for Interoperable XML Databinding with JAXBBest Practices for Interoperable XML Databinding with JAXB
Best Practices for Interoperable XML Databinding with JAXBMartin Grebac
 
jstl ( jsp standard tag library )
jstl ( jsp standard tag library )jstl ( jsp standard tag library )
jstl ( jsp standard tag library )Adarsh Patel
 
How to execute an oracle stored procedure with nested table as a parameter fr...
How to execute an oracle stored procedure with nested table as a parameter fr...How to execute an oracle stored procedure with nested table as a parameter fr...
How to execute an oracle stored procedure with nested table as a parameter fr...Priyobroto Ghosh (Mule ESB Certified)
 
CBStreams - Java Streams for ColdFusion (CFML)
CBStreams - Java Streams for ColdFusion (CFML)CBStreams - Java Streams for ColdFusion (CFML)
CBStreams - Java Streams for ColdFusion (CFML)Ortus Solutions, Corp
 
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...Raffi Khatchadourian
 
Towards Safe Refactoring for Intelligent Parallelization of Java 8 Streams
Towards Safe Refactoring for Intelligent Parallelization of Java 8 StreamsTowards Safe Refactoring for Intelligent Parallelization of Java 8 Streams
Towards Safe Refactoring for Intelligent Parallelization of Java 8 StreamsRaffi Khatchadourian
 
Introduction to JSP
Introduction to JSPIntroduction to JSP
Introduction to JSPGeethu Mohan
 
6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow Transformations6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow TransformationsPramod Singla
 
Practical RxJava for Android
Practical RxJava for AndroidPractical RxJava for Android
Practical RxJava for AndroidTomáš Kypta
 
JavaCro 2014 Scala and Java EE 7 Development Experiences
JavaCro 2014 Scala and Java EE 7 Development ExperiencesJavaCro 2014 Scala and Java EE 7 Development Experiences
JavaCro 2014 Scala and Java EE 7 Development ExperiencesPeter Pilgrim
 
Introduction to JDBC and database access in web applications
Introduction to JDBC and database access in web applicationsIntroduction to JDBC and database access in web applications
Introduction to JDBC and database access in web applicationsFulvio Corno
 
Android Automated Testing
Android Automated TestingAndroid Automated Testing
Android Automated Testingroisagiv
 

La actualidad más candente (19)

Best Practices for Interoperable XML Databinding with JAXB
Best Practices for Interoperable XML Databinding with JAXBBest Practices for Interoperable XML Databinding with JAXB
Best Practices for Interoperable XML Databinding with JAXB
 
jstl ( jsp standard tag library )
jstl ( jsp standard tag library )jstl ( jsp standard tag library )
jstl ( jsp standard tag library )
 
How to execute an oracle stored procedure with nested table as a parameter fr...
How to execute an oracle stored procedure with nested table as a parameter fr...How to execute an oracle stored procedure with nested table as a parameter fr...
How to execute an oracle stored procedure with nested table as a parameter fr...
 
Passing java arrays in oracle stored procedure from mule esb flow
Passing java arrays in oracle stored procedure from mule esb flowPassing java arrays in oracle stored procedure from mule esb flow
Passing java arrays in oracle stored procedure from mule esb flow
 
CBStreams - Java Streams for ColdFusion (CFML)
CBStreams - Java Streams for ColdFusion (CFML)CBStreams - Java Streams for ColdFusion (CFML)
CBStreams - Java Streams for ColdFusion (CFML)
 
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
 
Jsp project module
Jsp project moduleJsp project module
Jsp project module
 
Towards Safe Refactoring for Intelligent Parallelization of Java 8 Streams
Towards Safe Refactoring for Intelligent Parallelization of Java 8 StreamsTowards Safe Refactoring for Intelligent Parallelization of Java 8 Streams
Towards Safe Refactoring for Intelligent Parallelization of Java 8 Streams
 
Introduction to new features in java 8
Introduction to new features in java 8Introduction to new features in java 8
Introduction to new features in java 8
 
Introduction to JSP
Introduction to JSPIntroduction to JSP
Introduction to JSP
 
Plsql
PlsqlPlsql
Plsql
 
22jdbc
22jdbc22jdbc
22jdbc
 
6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow Transformations6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow Transformations
 
Jdbc[1]
Jdbc[1]Jdbc[1]
Jdbc[1]
 
Practical RxJava for Android
Practical RxJava for AndroidPractical RxJava for Android
Practical RxJava for Android
 
JavaCro 2014 Scala and Java EE 7 Development Experiences
JavaCro 2014 Scala and Java EE 7 Development ExperiencesJavaCro 2014 Scala and Java EE 7 Development Experiences
JavaCro 2014 Scala and Java EE 7 Development Experiences
 
Introduction to JDBC and database access in web applications
Introduction to JDBC and database access in web applicationsIntroduction to JDBC and database access in web applications
Introduction to JDBC and database access in web applications
 
Android Automated Testing
Android Automated TestingAndroid Automated Testing
Android Automated Testing
 
Java 8 Intro - Core Features
Java 8 Intro - Core FeaturesJava 8 Intro - Core Features
Java 8 Intro - Core Features
 

Similar a Belfast JUG 23-10-2013

OGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewOGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewBartosz Dobrzelecki
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaRick Warren
 
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Arun Gupta
 
New Features in JDK 8
New Features in JDK 8New Features in JDK 8
New Features in JDK 8Martin Toshev
 
Java colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsJava colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsSagara Gunathunga
 
JavaEE and RESTful development - WSO2 Colombo Meetup
JavaEE and RESTful development - WSO2 Colombo Meetup JavaEE and RESTful development - WSO2 Colombo Meetup
JavaEE and RESTful development - WSO2 Colombo Meetup Sagara Gunathunga
 
Java SE 8 - New Features
Java SE 8 - New FeaturesJava SE 8 - New Features
Java SE 8 - New FeaturesNaveen Hegde
 
Spring into rails
Spring into railsSpring into rails
Spring into railsHiro Asari
 
What's Coming in Spring 3.0
What's Coming in Spring 3.0What's Coming in Spring 3.0
What's Coming in Spring 3.0Matt Raible
 
RxJava2 Slides
RxJava2 SlidesRxJava2 Slides
RxJava2 SlidesYarikS
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsJeff Durta
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsKaml Sah
 
OSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian SchneiderOSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian Schneidermfrancis
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootJosué Neis
 

Similar a Belfast JUG 23-10-2013 (20)

Java 8 Feature Preview
Java 8 Feature PreviewJava 8 Feature Preview
Java 8 Feature Preview
 
OGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewOGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's View
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
 
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
 
Json generation
Json generationJson generation
Json generation
 
Struts2 - 101
Struts2 - 101Struts2 - 101
Struts2 - 101
 
New Features in JDK 8
New Features in JDK 8New Features in JDK 8
New Features in JDK 8
 
Java colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsJava colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rs
 
Java8
Java8Java8
Java8
 
Lambda.pdf
Lambda.pdfLambda.pdf
Lambda.pdf
 
JDK8 Streams
JDK8 StreamsJDK8 Streams
JDK8 Streams
 
JavaEE and RESTful development - WSO2 Colombo Meetup
JavaEE and RESTful development - WSO2 Colombo Meetup JavaEE and RESTful development - WSO2 Colombo Meetup
JavaEE and RESTful development - WSO2 Colombo Meetup
 
Java SE 8 - New Features
Java SE 8 - New FeaturesJava SE 8 - New Features
Java SE 8 - New Features
 
Spring into rails
Spring into railsSpring into rails
Spring into rails
 
What's Coming in Spring 3.0
What's Coming in Spring 3.0What's Coming in Spring 3.0
What's Coming in Spring 3.0
 
RxJava2 Slides
RxJava2 SlidesRxJava2 Slides
RxJava2 Slides
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - Components
 
OSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian SchneiderOSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian Schneider
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 

Último

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
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
 
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
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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
 
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
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Último (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
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...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
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
 
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
 
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...
 
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?
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
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
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Belfast JUG 23-10-2013

  • 1. Belfast Java User Group Stuart Greenlees Eamonn Long Niall McLoughlin Wednesday 23/10/2013
  • 2. Belfast Java User Group Agenda Introduction to the Belfast JUG • What is a JUG? • Some Logistics • How can you get involved? JavaOne Key Notes 20+ New Features of JEE7 Extras
  • 3. Belfast Java User Group What is a JUG?
  • 4. Belfast Java User Group Java User Groups (JUGs) are volunteer organizations that strive to distribute Java-rela
  • 5. Belfast Java User Group Relation to Tech Forums? Relation to LIT?
  • 6. Belfast Java User Group Meet Quarterly October 2013 August 2014 February 2014 May 2014
  • 7. Belfast Java User Group Where can I find the Belfast JUG? JUG Page on Java.Net: https://java.net/projects/belfast-jug The Belfast JUG is on the MAP!
  • 8. Belfast Java User Group What are the Goals of the JUG? Key • Establish Regular meetings of Java Users in Belfast • Share Information about Java • Get people involved Optional • Adopt a JSR - https://java.net/projects/adoptajsr/pages/Home • Adopt Open JDK - https://java.net/projects/adoptopenjdk/pages/AdoptOpenJDK
  • 9. Belfast Java User Group How can you get involved? We Need Help! • Create a Belfast JUG logo • Create a simple website/wikki out on Java.Net Contribute content • • • • • • Join the Java.Net project Post topic suggestions you would like to here about Post recommendations of any good speakers you would like to hear from Contributing to OpenSource we would love to hear from you E.g. Night-hacking with Raspberry Pi Post Content on the java.net wiki/mailing list
  • 10. Belfast Java User Group How Do I sign Up?
  • 11. Belfast Java User Group JUG Leadership Team Stuart Greenlees – s.greenlees@liberty-it.co.uk Eamonn Long (a.k.a BlueArsedFly) – e.long@liberty-it.co.uk Niall McLoughlin – n.mclouoghlin@liberty-it.co.uk
  • 12. JavaOne 2013 Keynote Speech Internet of Things Java 8 JEE7
  • 13. Java 8 – What is a Lambda? Lambda expressions are anonymous methods Arguments person Arrow Expression or {Statement} -> person.getAge() > minimumAge Example usage with new Iterable.forEach default method: employees.forEach(e -> e.setSalary(e.getSalary() * 1.03)); The general syntax consists of an argument list, the arrow token ->, and a body. The body can either be a single expression, or a statement block. In the expression form, the body is simply evaluated and returned. In the block form, the body is evaluated like a method body. Benefits Internal Iteration Pass Behaviour not just Data Fluent Pipelined Operations Lazy Evaluation Parallelization
  • 14. Java 8 –Streams A stream is a sequence of elements. Unlike a collection, it is not a data structure that stores elements. Instead, a stream carries values from a source, such as collection, through a pipeline. int sum = widgets.stream() .filter(w -> w.getColor() == RED) .mapToInt(w -> w.getWeight()) .sum(); // Filter // Map // Collect The operations filter, map, and forEach are aggregate operations. Aggregate operations process elements from a stream, not directly from a collection. A pipeline is a sequence of stream operations, which in this example is filter-map-sum. In addition, aggregate operations typically accept lambda expressions as parameters, enabling you to customize how they behave.
  • 15. Java 8 – Lambda Stream Methods public interface Stream<T> extends BaseStream<T, Stream<T>> { /** * Returns a stream consisting of the elements of this stream that match * the given predicate. * * @param predicate a <a href="package-summary.html#NonInterference"> * non-interfering, stateless</a> predicate to apply to * each element to determine if it should be included * @return the new stream */ Stream<T> filter(Predicate<? super T> predicate); /** * Returns a stream consisting of the results of applying the given * function to the elements of this stream. * * @param <R> The element type of the new stream * @param mapper a <a href="package-summary.html#NonInterference"> * non-interfering, stateless</a> function to apply to each * element * @return the new stream */ <R> Stream<R> map(Function<? super T, ? extends R> mapper); }
  • 16. Lambda – Filtering / Mapping Filtering List<Person> eligibleVoters = potentialVoters. stream(). // Get the List of voters as a Stream filter(p -> p.getAge() > legalAgeOfVoting). // Filter using Predicate collect(Collectors.toList()); // Convert Stream Back to List Mapping return mixedCaseStrings. stream(). // Get Stream from List map(s -> s.toUpperCase()). // Convert Value collect(Collectors.toList()); // Convert Back to List
  • 17. Lambda – Method References // Reference to a Static method Arrays.asList("a", "b", "c").forEach(Printers::print) // Reference to an method on an instance public static void printPages(Document doc, int[] pageNumbers) { Arrays.stream(pageNumbers). map(doc::getPageContent). forEach(Printers::print); }
  • 18. Java 8 – Lambda http://openjdk.java.net/projects/lambda/ Streams – Brian Goetz/Paul Sandoz CON7942_Sandoz-javaone-streamstopgear.pdf Stuart Marks TUT3877_Marks-JumpStartingLambda-v6.pdf Brian Goetz – State of the Lambda http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-final.html Java Tutorial http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html JUnit Based Tutorial https://github.com/AdoptOpenJDK/lambda-tutorial
  • 19. Adam Bien – Java Rockstar http://www.adam-bien.com/roller/abien/ Lightweight Java EE Architectures (Free Devcast) http://www.adam-bien.com/roller/abien/entry/lightweight_java_ee_architectures_a Rethinking JEE Design Patterns EJB’s are cool No need for DAO’s with EntityManager No need for DTO’s with JPA Entity No need to have an interface for every class Setting up JEE7 projects with Maven3 http://www.adam-bien.com/roller/abien/entry/setting_up_java_ee_7 Starting WebSphere with Java EE 6...in 3 seconds http://www.adam-bien.com/roller/abien/entry/starting_websphere_with_java_ee
  • 20. Building Modular Cloud Apps - Luminis Technologies http://luminis-technologies.com
  • 21. 20+ New Features of JEE7
  • 22. 20+ New Features of JEE7 Bean Validation: Method Validation
  • 23. 20+ New Features of JEE7 Concurrency: ManagedExecutor
  • 24. 20+ New Features of JEE7 JPA: Schema Generation
  • 25. 20+ New Features of JEE7 JPA: @Index
  • 26. 20+ New Features of JEE7 JPA: Stored Procedure
  • 27. 20+ New Features of JEE7 JTA: @Transactional
  • 28. 20+ New Features of JEE7 JTA: @TransactionScoped
  • 29. 20+ New Features of JEE7 JMS: JMSContext API
  • 30. 20+ New Features of JEE7 JMS: Autocloseable
  • 31. 20+ New Features of JEE7 Servlet: Improved Security
  • 32. 20+ New Features of JEE7 WebSocket: Annotated server endpoint
  • 33. 20+ New Features of JEE7 WebSocket: Annotated client endpoint
  • 34. 20+ New Features of JEE7 JSF: Faces Flow
  • 35. 20+ New Features of JEE7 JSF: Pass-through Attributes
  • 36. 20+ New Features of JEE7 JSF: File Upload Component
  • 37. 20+ New Features of JEE7 JAX-RS: Client API
  • 38. 20+ New Features of JEE7 JAX-RS: Async Client
  • 39. 20+ New Features of JEE7 JAX-RS: Async Server
  • 40. 20+ New Features of JEE7 JSON-P: JSON Builder
  • 41. 20+ New Features of JEE7 Batch: Chunk-style Processing
  • 42. 20+ New Features of JEE7 Batch: Chunk-style processing
  • 43. 20+ New Features of JEE7 Batch: Batchlet-style Processing
  • 44. 20+ New Features of JEE7 Batch: Job/Step/Chunk Listeners
  • 45. 20+ New Features of JEE7 Batch: Job/Step/Chunk Listeners
  • 46. 20+ New Features of JEE7 Batch: Creating Workflows
  • 47. 20+ New Features of JEE7 Batch: Creating Workflows
  • 48. Ten Tips for Unit Tests • • Make the tests understandable • Comments • Expected Behaviour • Diagnostics • Absolute Repeatability • Must trust each test • Independent Tests only • Must run in any order • No dependencies • Diagnostics on Failure • Message in assets • Reference input data • Record test environment info • Make it simple to debug • • Think Before Testing • Input Data • What is it called • Expected Output No hard coding environment • Chained exceptions • Use config files for portability • Mock objects • No databases • No Extraneous Output • Too much output == confusion • Slient test • Use option/config to turn debug on Small and Simple • Use setup and teardown • Separate test logic from setup to make it easier to debug • Test 1 thing only • One scenario per test so its more obvious why it failed • Enables faster debugging • Fast Tests only • Run as often as possible • Quick results • Maintain quaility bar • More likely that devs will run with every change
  • 49. Stress Testing – Arquillian & JMeter http://arquillian.org/ Arquillian brings the test to the runtime so you don’t have to manage the runtime from the test (or the build). Arquillian eliminates this burden by covering all aspects of test execution, which entails: • Managing the lifecycle of the container (or containers) • Bundling the test case, dependent classes and resources into a ShrinkWrap archive (or archives) Executing the tests inside (or against) the container http://jmeter.apache.org/ Apache JMeter - may be used to test performance both on static and dynamic resources (Files, Web dynamic languages - PHP, Java, ASP.NET, etc. -, Java Objects, Data Bases and Queries, FTP Servers and more). It can be used to simulate a heavy load on a server, group of servers, network or object to test its strength or to analyze overall performance under different load types. You can use it to make a graphical analysis of performance or to test your server/script/object behavior under heavy concurrent load.
  • 50. Security – OWASP Top 10 Web App Defenses • SQL Injection Defence • Query Parameterization • Password Defences • Don’t limit length • credential-specific salt • Keyed functions • Multi-Factor Authentication • SMS / Mobile App / Tokens • Cross Site Scripting Defence • OWASP Java Encoder • OWASP HTML Sanitizer • JSHtmlSanitizer • Cross Site Request Forgery Defence • CSRF Cryptographic Tokens • Re-authentication • Controlling Access • Apache Shiro - comprehensive solution to authentication, authorization, cryptography, and session management. • Clickjacking Defence • response.addHeader( "X-FRAME-OPTIONS", "SAMEORIGIN" ); • App Layer Intrusion Detection • Input validation failure server side on non-user editable parameters • OWASP AppSensor Project • Encryption in Transit (HTTPS/TLS) • Credentials and Session IDs Encrypted in Transit • Use HTTPS/TLS from login to logout • Certificate Pinning • File Upload Security Jim Manico https://oracleus.activeevents.com/2013/connect/fileDownload/session/0C826D948B4001909E22C76D363E0E86 /CON5523_Manico-Top%20Ten%20Defenses%20v11.ppt
  • 51. Security – OWASP Recommended Tools OWASP Java Encoder Project https://www.owasp.org/index.php/OWASP_Java_Encoder_Project XSS Defence - OWASP HTML Sanitizer Project https://www.owasp.org/index.php/OWASP_Java_HTML_Sanitizer_Project Apache SHIRO http://shiro.apache.org/ App Sensor Intrusion Detection https://www.owasp.org/index.php/OWASP_AppSensor_Project

Notas del editor

  1. The operations filter, map, and forEach are aggregate operations. Aggregate operations process elements from a stream, not directly from a collection. A stream is a sequence of elements. Unlike a collection, it is not a data structure that stores elements. Instead, a stream carries values from a source, such as collection, through a pipeline. A pipeline is a sequence of stream operations, which in this example is filter- map-forEach. In addition, aggregate operations typically accept lambda expressions as parameters, enabling you to customize how they behave.default void forEach(Consumer&lt;? super T&gt; action)
  2. The operations filter, map, and forEach are aggregate operations. Aggregate operations process elements from a stream, not directly from a collection. A stream is a sequence of elements. Unlike a collection, it is not a data structure that stores elements. Instead, a stream carries values from a source, such as collection, through a pipeline. A pipeline is a sequence of stream operations, which in this example is filter- map-forEach. In addition, aggregate operations typically accept lambda expressions as parameters, enabling you to customize how they behave.default void forEach(Consumer&lt;? super T&gt; action)
  3. The operations filter, map, and forEach are aggregate operations. Aggregate operations process elements from a stream, not directly from a collection. A stream is a sequence of elements. Unlike a collection, it is not a data structure that stores elements. Instead, a stream carries values from a source, such as collection, through a pipeline. A pipeline is a sequence of stream operations, which in this example is filter- map-forEach. In addition, aggregate operations typically accept lambda expressions as parameters, enabling you to customize how they behave.
  4. Everything in blue has been updated in JEE7
  5. Concurrency: ManagedExecutor DefaultManagedExecutor Specify in web.xmlConcurrency: ManagedScheduledExecutor Submit delayed or periodic tasks Access using JNDI. Can be defined in web.xml as wellConcurrency: ManagedThreadFactoryConcurrency: DynamicProxy
  6. Can hook in encoders and decoders
  7. Can hook in encoders and decoders
  8. Can have Job/Step/Chunk
  9. Jim Manicohttps://oracleus.activeevents.com/2013/connect/fileDownload/session/0C826D948B4001909E22C76D363E0E86/CON5523_Manico-Top%20Ten%20Defenses%20v11.ppt