SlideShare une entreprise Scribd logo
1  sur  25
Java 5,  un bilan Tareq Abed Rabbo Club Atuge Technologies 5/4/2007
Plan ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Java, c’est quoi ? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Evolution de Java 1995 Naissance  de Java! Java SE 6 2006 - Scripting Language  - JDBC 4.0 - JAXB 2.0 JDK 1.0 1996 - Initial release JDK 1.1 1997 - Java Beans - JDBC - RMI - Inner classes - AWT J2SE 1.2  1998 - Reflection - JIT compiler - Collections - Swing - strictfp Java SE 5.0 2004 - Generics - Metadata - Autoboxing - Enumerations - Varargs - Enhanced for loop - Concurrency utils - JMX J2SE 1.4 2002 - assert - JAXP - regular expression - NIO  J2SE 1.3 2000 - HotSpot JVM - JNDI Java SE 7 2008
Thèmes de Java 5 ,[object Object],[object Object],[object Object],[object Object]
Plan ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Annotations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Exemple : JAXB 2 @XmlAccessorType(XmlAccessType. FIELD ) @XmlRootElement(name = &quot;Address&quot;, namespace=&quot;http://www.example.com/&quot;) public   class  Address { @XmlElement(required = true) private   String  name; private   String  city; <Address> <name>aaa</name> <city>bbb</city> </Address>
Exemple : JPA @Entity public   class  User { @Id @GeneratedValue(strategy = GenerationType. SEQUENCE ,  generator = &quot;seq_id_user&quot;) @SequenceGenerator(name = &quot;seq_id_user&quot;, sequenceName = &quot;seq_id_user&quot;) public  Integer getId() { return  id; }
Anatomie d’une annotation @Target({ TYPE ,  FIELD ,  METHOD ,  PARAMETER ,  CONSTRUCTOR ,  LOCAL_VARIABLE }) @Retention(RetentionPolicy. SOURCE ) public  @interface   SuppressWarnings   { String[]   value(); }
Avantages des annotations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Remarques ,[object Object],[object Object],[object Object],[object Object],[object Object]
Plan ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Les types énumérés ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Enumération : exemple public   enum  Status { success ,  error ,  inProgress ; } Status status = …; switch  (status) { case   success : break ; case   error : break ; case   inProgress : break ; }
Plan ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Les types génériques ,[object Object],[object Object],[object Object],[object Object],[object Object]
Génériques : Exemple Vector v =  new  Vector(); v.add( new  String(&quot;abc&quot;);  v.add( new  Integer(4));  String s = (String)v.get(1); ClassCastException
Génériques : Exemple Vector <String>  vs =  new  Vector <String> (); vs.add( new  String(&quot;hello&quot;));  vs.add( new  Integer(5));  // Erreur de compilation! String s = vs.get(0); // Pas de casting
Plan ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JMX ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JMX et Java 5 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Jconsole
Plan ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bilan ,[object Object],[object Object],[object Object]

Contenu connexe

Tendances

Requêtes HTTP synchrones et asynchrones
Requêtes HTTPsynchrones et asynchronesRequêtes HTTPsynchrones et asynchrones
Requêtes HTTP synchrones et asynchronesAbdoulaye Dieng
 
Introduction à React JS
Introduction à React JSIntroduction à React JS
Introduction à React JSAbdoulaye Dieng
 
php2 : formulaire-session-PDO
php2 : formulaire-session-PDOphp2 : formulaire-session-PDO
php2 : formulaire-session-PDOAbdoulaye Dieng
 
Communications Réseaux et HTTP avec PHP
Communications Réseaux et HTTP avec PHPCommunications Réseaux et HTTP avec PHP
Communications Réseaux et HTTP avec PHPjulien pauli
 
PHP #1 : introduction
PHP #1 : introductionPHP #1 : introduction
PHP #1 : introductionJean Michel
 
Cours php & Mysql - 4éme partie
Cours php & Mysql - 4éme partieCours php & Mysql - 4éme partie
Cours php & Mysql - 4éme partiekadzaki
 
PHP 1 - Apprendre les bases
PHP 1 - Apprendre les basesPHP 1 - Apprendre les bases
PHP 1 - Apprendre les basesPierre Faure
 
PHP5 - POO
PHP5 - POOPHP5 - POO
PHP5 - POOmazenovi
 
Notions de base de JavaScript
Notions de base de JavaScriptNotions de base de JavaScript
Notions de base de JavaScriptKristen Le Liboux
 

Tendances (16)

Php
PhpPhp
Php
 
Requêtes HTTP synchrones et asynchrones
Requêtes HTTPsynchrones et asynchronesRequêtes HTTPsynchrones et asynchrones
Requêtes HTTP synchrones et asynchrones
 
Nouveautés php 7
Nouveautés php 7Nouveautés php 7
Nouveautés php 7
 
Introduction à React
Introduction à ReactIntroduction à React
Introduction à React
 
PHP Training
PHP TrainingPHP Training
PHP Training
 
Introduction à React JS
Introduction à React JSIntroduction à React JS
Introduction à React JS
 
Php & My Sql
Php & My SqlPhp & My Sql
Php & My Sql
 
php2 : formulaire-session-PDO
php2 : formulaire-session-PDOphp2 : formulaire-session-PDO
php2 : formulaire-session-PDO
 
Communications Réseaux et HTTP avec PHP
Communications Réseaux et HTTP avec PHPCommunications Réseaux et HTTP avec PHP
Communications Réseaux et HTTP avec PHP
 
PHP #1 : introduction
PHP #1 : introductionPHP #1 : introduction
PHP #1 : introduction
 
Cours php & Mysql - 4éme partie
Cours php & Mysql - 4éme partieCours php & Mysql - 4éme partie
Cours php & Mysql - 4éme partie
 
PHP 1 - Apprendre les bases
PHP 1 - Apprendre les basesPHP 1 - Apprendre les bases
PHP 1 - Apprendre les bases
 
PHP5 - POO
PHP5 - POOPHP5 - POO
PHP5 - POO
 
Cours php
Cours phpCours php
Cours php
 
Formation php 1
Formation php 1Formation php 1
Formation php 1
 
Notions de base de JavaScript
Notions de base de JavaScriptNotions de base de JavaScript
Notions de base de JavaScript
 

En vedette

Enterprise 365 - SoftServe presentation
Enterprise 365 - SoftServe presentationEnterprise 365 - SoftServe presentation
Enterprise 365 - SoftServe presentationSergii Alekseev
 
10 tips to optimize your facebook group (Infographic)
10 tips to optimize your facebook group (Infographic)10 tips to optimize your facebook group (Infographic)
10 tips to optimize your facebook group (Infographic)Stéphane Baudin
 
Agricultural sciences - Paul Nampala
Agricultural sciences - Paul NampalaAgricultural sciences - Paul Nampala
Agricultural sciences - Paul NampalaWorld Economic Forum
 
Employee Performance Appraisal Rig-Based
Employee Performance Appraisal Rig-BasedEmployee Performance Appraisal Rig-Based
Employee Performance Appraisal Rig-BasedA Nguyen Van
 
Article #2_ Qual Study_DRW_160504_Sub
Article #2_ Qual Study_DRW_160504_SubArticle #2_ Qual Study_DRW_160504_Sub
Article #2_ Qual Study_DRW_160504_SubDebra Wilson, PhD
 
The Galactic Superwave Tarot
The Galactic Superwave TarotThe Galactic Superwave Tarot
The Galactic Superwave TarotHugh Colmer
 
ITIL presentation
ITIL presentationITIL presentation
ITIL presentationmhormech
 
Chapter 2: Consolidation of Financial Information
Chapter 2: Consolidation of Financial InformationChapter 2: Consolidation of Financial Information
Chapter 2: Consolidation of Financial InformationAbdulkadir Molla
 
CFDi curso para la Factura Electrónica en México
CFDi curso para la Factura Electrónica en MéxicoCFDi curso para la Factura Electrónica en México
CFDi curso para la Factura Electrónica en MéxicoMario Perez Villeda
 
Leading Large Scale Product Development with Large-Scale Scrum (LeSS)
Leading Large Scale Product Development with Large-Scale Scrum (LeSS)Leading Large Scale Product Development with Large-Scale Scrum (LeSS)
Leading Large Scale Product Development with Large-Scale Scrum (LeSS)Kamlesh Ravlani
 
CNIT 121: 14 Investigating Applications
CNIT 121: 14 Investigating ApplicationsCNIT 121: 14 Investigating Applications
CNIT 121: 14 Investigating ApplicationsSam Bowne
 
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...Accelify
 

En vedette (19)

Enterprise 365 - SoftServe presentation
Enterprise 365 - SoftServe presentationEnterprise 365 - SoftServe presentation
Enterprise 365 - SoftServe presentation
 
10 tips to optimize your facebook group (Infographic)
10 tips to optimize your facebook group (Infographic)10 tips to optimize your facebook group (Infographic)
10 tips to optimize your facebook group (Infographic)
 
Two Functions of Corporate Finance
Two Functions of Corporate FinanceTwo Functions of Corporate Finance
Two Functions of Corporate Finance
 
ECONOMÍA APLICADA
ECONOMÍA APLICADAECONOMÍA APLICADA
ECONOMÍA APLICADA
 
Removing the “I” from IT
Removing the “I” from ITRemoving the “I” from IT
Removing the “I” from IT
 
Agricultural sciences - Paul Nampala
Agricultural sciences - Paul NampalaAgricultural sciences - Paul Nampala
Agricultural sciences - Paul Nampala
 
Employee Performance Appraisal Rig-Based
Employee Performance Appraisal Rig-BasedEmployee Performance Appraisal Rig-Based
Employee Performance Appraisal Rig-Based
 
Article #2_ Qual Study_DRW_160504_Sub
Article #2_ Qual Study_DRW_160504_SubArticle #2_ Qual Study_DRW_160504_Sub
Article #2_ Qual Study_DRW_160504_Sub
 
The Galactic Superwave Tarot
The Galactic Superwave TarotThe Galactic Superwave Tarot
The Galactic Superwave Tarot
 
ITIL presentation
ITIL presentationITIL presentation
ITIL presentation
 
Chapter 2: Consolidation of Financial Information
Chapter 2: Consolidation of Financial InformationChapter 2: Consolidation of Financial Information
Chapter 2: Consolidation of Financial Information
 
CFDi curso para la Factura Electrónica en México
CFDi curso para la Factura Electrónica en MéxicoCFDi curso para la Factura Electrónica en México
CFDi curso para la Factura Electrónica en México
 
Leading Large Scale Product Development with Large-Scale Scrum (LeSS)
Leading Large Scale Product Development with Large-Scale Scrum (LeSS)Leading Large Scale Product Development with Large-Scale Scrum (LeSS)
Leading Large Scale Product Development with Large-Scale Scrum (LeSS)
 
Why Large Scale Scrum (LeSS)?
Why Large Scale Scrum (LeSS)?Why Large Scale Scrum (LeSS)?
Why Large Scale Scrum (LeSS)?
 
ANxiety bolouri
ANxiety bolouriANxiety bolouri
ANxiety bolouri
 
Mc kay bolouri
Mc kay bolouriMc kay bolouri
Mc kay bolouri
 
CNIT 121: 14 Investigating Applications
CNIT 121: 14 Investigating ApplicationsCNIT 121: 14 Investigating Applications
CNIT 121: 14 Investigating Applications
 
Cebolla
CebollaCebolla
Cebolla
 
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
 

Similaire à Java 5, un blian

La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !
La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !
La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !Paris Salesforce Developer Group
 
Présentation de JavaServer Faces
Présentation de JavaServer FacesPrésentation de JavaServer Faces
Présentation de JavaServer FacesJS Bournival
 
Prsentation de-javaserver-faces4124
Prsentation de-javaserver-faces4124Prsentation de-javaserver-faces4124
Prsentation de-javaserver-faces4124Mejdeddine Bouzouita
 
Tester les applications Zend Framework
Tester les applications Zend FrameworkTester les applications Zend Framework
Tester les applications Zend FrameworkMickael Perraud
 
Java Database Connectivity
Java Database ConnectivityJava Database Connectivity
Java Database ConnectivityKorteby Farouk
 
GWT : under the hood
GWT : under the hoodGWT : under the hood
GWT : under the hoodsvuillet
 
Présentation Javascript à l'ESI (Alger)
Présentation Javascript à l'ESI (Alger)Présentation Javascript à l'ESI (Alger)
Présentation Javascript à l'ESI (Alger)Dr Samir A. ROUABHI
 
Workshop spring session 2 - La persistance au sein des applications Java
Workshop spring   session 2 - La persistance au sein des applications JavaWorkshop spring   session 2 - La persistance au sein des applications Java
Workshop spring session 2 - La persistance au sein des applications JavaAntoine Rey
 
Presentation Spring, Spring MVC
Presentation Spring, Spring MVCPresentation Spring, Spring MVC
Presentation Spring, Spring MVCNathaniel Richand
 
Présentation Groovy
Présentation GroovyPrésentation Groovy
Présentation Groovyguest6e3bed
 
Présentation Groovy
Présentation GroovyPrésentation Groovy
Présentation GroovyJS Bournival
 
Voxxeddays lux 2018 apres java 8, java 9 et 10
Voxxeddays lux 2018 apres java 8, java 9 et 10Voxxeddays lux 2018 apres java 8, java 9 et 10
Voxxeddays lux 2018 apres java 8, java 9 et 10Jean-Michel Doudoux
 

Similaire à Java 5, un blian (20)

La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !
La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !
La Tooling API, est-ce pour moi ? Bien sûr, viens voir pourquoi !
 
Présentation de JavaServer Faces
Présentation de JavaServer FacesPrésentation de JavaServer Faces
Présentation de JavaServer Faces
 
Prsentation de-javaserver-faces4124
Prsentation de-javaserver-faces4124Prsentation de-javaserver-faces4124
Prsentation de-javaserver-faces4124
 
Dynamic Languages
Dynamic LanguagesDynamic Languages
Dynamic Languages
 
Tester les applications Zend Framework
Tester les applications Zend FrameworkTester les applications Zend Framework
Tester les applications Zend Framework
 
Jdbc
JdbcJdbc
Jdbc
 
Java Database Connectivity
Java Database ConnectivityJava Database Connectivity
Java Database Connectivity
 
Drools
DroolsDrools
Drools
 
Drools et les moteurs de règles
Drools et les moteurs de règlesDrools et les moteurs de règles
Drools et les moteurs de règles
 
Apache ANT
Apache ANTApache ANT
Apache ANT
 
Presentation JPA
Presentation JPAPresentation JPA
Presentation JPA
 
GWT : under the hood
GWT : under the hoodGWT : under the hood
GWT : under the hood
 
Spring 3.0
Spring 3.0Spring 3.0
Spring 3.0
 
Services rest & jersey
Services rest & jerseyServices rest & jersey
Services rest & jersey
 
Présentation Javascript à l'ESI (Alger)
Présentation Javascript à l'ESI (Alger)Présentation Javascript à l'ESI (Alger)
Présentation Javascript à l'ESI (Alger)
 
Workshop spring session 2 - La persistance au sein des applications Java
Workshop spring   session 2 - La persistance au sein des applications JavaWorkshop spring   session 2 - La persistance au sein des applications Java
Workshop spring session 2 - La persistance au sein des applications Java
 
Presentation Spring, Spring MVC
Presentation Spring, Spring MVCPresentation Spring, Spring MVC
Presentation Spring, Spring MVC
 
Présentation Groovy
Présentation GroovyPrésentation Groovy
Présentation Groovy
 
Présentation Groovy
Présentation GroovyPrésentation Groovy
Présentation Groovy
 
Voxxeddays lux 2018 apres java 8, java 9 et 10
Voxxeddays lux 2018 apres java 8, java 9 et 10Voxxeddays lux 2018 apres java 8, java 9 et 10
Voxxeddays lux 2018 apres java 8, java 9 et 10
 

Java 5, un blian

  • 1. Java 5,  un bilan Tareq Abed Rabbo Club Atuge Technologies 5/4/2007
  • 2.
  • 3.
  • 4. Evolution de Java 1995 Naissance de Java! Java SE 6 2006 - Scripting Language - JDBC 4.0 - JAXB 2.0 JDK 1.0 1996 - Initial release JDK 1.1 1997 - Java Beans - JDBC - RMI - Inner classes - AWT J2SE 1.2 1998 - Reflection - JIT compiler - Collections - Swing - strictfp Java SE 5.0 2004 - Generics - Metadata - Autoboxing - Enumerations - Varargs - Enhanced for loop - Concurrency utils - JMX J2SE 1.4 2002 - assert - JAXP - regular expression - NIO J2SE 1.3 2000 - HotSpot JVM - JNDI Java SE 7 2008
  • 5.
  • 6.
  • 7.
  • 8. Exemple : JAXB 2 @XmlAccessorType(XmlAccessType. FIELD ) @XmlRootElement(name = &quot;Address&quot;, namespace=&quot;http://www.example.com/&quot;) public class Address { @XmlElement(required = true) private String name; private String city; <Address> <name>aaa</name> <city>bbb</city> </Address>
  • 9. Exemple : JPA @Entity public class User { @Id @GeneratedValue(strategy = GenerationType. SEQUENCE , generator = &quot;seq_id_user&quot;) @SequenceGenerator(name = &quot;seq_id_user&quot;, sequenceName = &quot;seq_id_user&quot;) public Integer getId() { return id; }
  • 10. Anatomie d’une annotation @Target({ TYPE , FIELD , METHOD , PARAMETER , CONSTRUCTOR , LOCAL_VARIABLE }) @Retention(RetentionPolicy. SOURCE ) public @interface SuppressWarnings { String[] value(); }
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. Enumération : exemple public enum Status { success , error , inProgress ; } Status status = …; switch (status) { case success : break ; case error : break ; case inProgress : break ; }
  • 16.
  • 17.
  • 18. Génériques : Exemple Vector v = new Vector(); v.add( new String(&quot;abc&quot;); v.add( new Integer(4)); String s = (String)v.get(1); ClassCastException
  • 19. Génériques : Exemple Vector <String> vs = new Vector <String> (); vs.add( new String(&quot;hello&quot;)); vs.add( new Integer(5)); // Erreur de compilation! String s = vs.get(0); // Pas de casting
  • 20.
  • 21.
  • 22.
  • 24.
  • 25.