JavaOne 2013 - First8 / AMIS Review
Upcoming SlideShare
Loading in...5
×
 

JavaOne 2013 - First8 / AMIS Review

on

  • 515 views

JavaOne2013 Review

JavaOne2013 Review

Statistics

Views

Total Views
515
Views on SlideShare
515
Embed Views
0

Actions

Likes
0
Downloads
4
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

JavaOne 2013 - First8 / AMIS Review JavaOne 2013 - First8 / AMIS Review Presentation Transcript

  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 J a v a O n e 2 0 1 3 2 2 – 2 6 s e p t e m b e r , S a n F r a n c is c o
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 A g e n d a W e lk o m • J a v a O n e • J a v a S E 8 • J a v a E E 7 • H ig h lig h t s – B lin g ID E – E r r a i – R x J a v a – U n it T e s t in g – E v o lu t io n a r y A lg o r it h m s B lo g Jeroen Ted
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 3 J a v a O n e 2 2 t /m 2 6 s e p t e m b e r S a n F r a n c is c o
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 4 J a v a S E 8 J S R 3 3 7
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 5 J a v a S E 8 (J S R 3 3 7 ) • L a m b d a e x p r e s s io n s • B u lk d a t a o p e r a t io n s f o r c o lle c t io n s – F ilt e r , m a p , r e d u c e – S t r e a m it e r a t o r • P a r a lle l a r r a y s o r t in g • E x t e n s io n m e t h o d s • D a t e a n d T im e A P I
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 6 J a v a S E 8 (J S R 3 3 7 ) L a m b a E x p r e s s io n s public interface ActionListener extends EventListener { public void actionPerformed(ActionEvent e); } JButton testButton = new JButton("Testknopje"); testButton.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ae){ System.out.println("Klik met Anon class"); } }); testButton.addActionListener(e -> System.out.println("Klik met Lambda"));
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 7 J a v a S E 8 (J S R 3 3 7 ) B u lk O p e r a t io n s List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); // Verdubbel het eerste even getal groter dan 3 uit de lijst. numbers.stream() // vs .parallelStream() .filter(number -> number > 3) .filter(number -> number % 2 == 0) .mapToInt(number -> number * 2) .findFirst() .getAsInt() // antwoord: 8
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 8 J a v a S E 8 (J S R 3 3 7 ) P a r a lle l A r r a y S o r t in g Arrays.sort(numbers) vs. Arrays.parallelSort(numbers) V e r t ic a a l: t ijd , H o r iz o n t a a l: a a n t a l e le m e n t e n (4 C P U ’s )
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 9 J a v a S E 8 (J S R 3 3 7 ) E x t e n s io n M e t h o d s public interface Iterable<T> { Iterator<T> iterator(); default void forEach(Consumer<? super T> action) { Objects.requireNonNull(action); for (T t : this) { action.accept(t); } } } numbers.forEach(System.out::println);
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 0 J a v a S E 8 (J S R 3 3 7 ) : D a t e a n d T im e A P I static import java.time.Month.JUNE; static import java.time.Month.DECEMBER; LocalDate date = LocalDate.of(2013, JUNE, 30); Month month = DECEMBER; int monIndex = month.getValue(); // 1..12 ZonedDateTime now = ZonedDateTime.now(); String nowString = now.toString(); // 2013-08-06T18:12:17.423-04:00[America/New_York] DateTimeFormatter fmt = DateTimeFormatter.ISO_ZONED_DATE_TIME; String nowFormatted = now.format(fmt); // 2013-08-06T18:12:17.423-04:00[America/New_York]
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 1 J a v a S E 8 L in k s J D K 8 P r o je c t P a g e • h t t p : //o p e n jd k . ja v a . n e t /p r o je c t s /jd k 8 / E a r ly A c c e s s J D K 8 J a v a d o c • h t t p : //d o w n lo a d . ja v a . n e t /jd k 8 /d o c s D e v e lo p e r P r e v ie w D o w n lo a d • h t t p s : //jd k 8 . ja v a . n e t /d o w n lo a d . h t m l
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 2 J a v a E E 7 J S R 3 4 2 w w w . o r a c le . c o m /t e c h n e t w o r k /ja v a /ja v a e e
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 3 J a v a E E 7 • J S O N • W e b S o c k e t 1 . 0 • J A X -R S 2 . 0 • J S F 2 . 2 • S e r v le t 3 . 1 • E x p r e s s io n L a n g u a g e 3 . 0 • B a t c h 1 . 0 • C o n c u r r e n c y 1 . 0 • J M S 2 . 0 • J P A 2 . 1 • E J B 3 . 2 • C D I 1 . 1 • B e a n V a lid a t io n 1 . 1 • J T A 1 . 2 • In t e r c e p t o r s 1 . 2
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 4 J a v a E E 7 W e b s o c k e t A P I
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 5 J a v a E E 7 J a v a A P I f o r J S O N P r o c e s s in g 1 . 0
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 6 J a v a E E 7 J a v a S e r v e r F a c e s 2 . 2
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 7 J a v a E E 7 B a t c h A p p lic a t io n s f o r t h e J a v a P la t f o r m 1 . 0
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 8 H ig h lig h t s
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 9 B lin g ID E T h e G P U -P o w e r e d G a m e ID E
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 0 E r r a i F r a m e w o r k • H T M L 5 /C S S t e m p la t e s • M a k k e lijk d e le n v a n c o d e o p c lie n t e n s e r v e r • G W T o n d e r d e m o t o r k a p • G e m a k v a n a n n o t a t ie s m e t C D I • T w o -w a y d a t a b in d in g • L o c a l s t o r a g e v ia J P A + d a t a s y n c • M o b ile f e a t u r e s v ia P h o n e G a p
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 1 E r r a i F r a m e w o r k H T M L 5 /C S S t e m p la t e s <!DOCTYPE html> <link href="css/bootstrap.css" rel="stylesheet"> <form data-field="app-template"> <input data-field="name" type="text" placeholder="Full Name"> <input data-field="email" type="text" placeholder="you@example.com"> <textarea data-field="complaint" rows="10"></textarea> <button data-field="submit">Submit</button> </form>
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 2 E r r a i F r a m e w o r k H e t g e m a k v a n a n n o t a t ie s . @Page @Templated public class ComplaintForm extends Composite { @Inject @Model private UserComplaint model; @Inject @Bound @DataField private TextBox name; @Inject @Bound @DataField private TextBox email; @Inject @Bound @DataField private TextArea complaint; @Inject @DataField private Button submit; @Inject private EntityManager entityManager; @Inject private ClientSyncManager syncManager; }
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 3 E r r a i F r a m e w o r k L in k s W e b s it e : • h t t p : //w w w . e r r a ip r o je c t . o r g S lid e s : • h t t p s : //o r a c le u s . a c t iv e e v e n t s . c o m /2 0 1 3 /c o n n e c t /f ile D o w n lo a d /s e s s io n /2 9 D B B 4 5 5 B F 0 2 C 1 3 8 0 4 1 F A 2 3 D 7 1 D 5 2 8 C 0 /C O N 4 3 1 3 _S a d ile k F u e r t h . p d f V id e o : • h t t p : //y o u t u . b e /r z 2 X 6 6 7 W k _4
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 4 F u n c t io n a l R e a c t iv e P r o g r a m m in g w it h R x J a v a R x J a v a “A library for composing asynchronous and event- based programs using observable sequences for the Java VM” h t t p s : //g it h u b . c o m /n e t f lix /r x ja v a
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 5 T e n T h in g s Y o u S h o u ld K n o w W h e n W r it in g G o o d U n it T e s t C a s e s in J a v a 1 . T h in k b e f o r e y o u a c t 2 . M a k e y o u r t e s t s u n d e r s t a n d a b le 3 . K e e p y o u r t e s t s “ s m a ll a n d s im p le ” 4 . T e s t o n e t h in g o n ly 5 . F a s t t e s t s o n ly 6 . A b s o lu t e r e p e a t a b ilit y 7 . In d e p e n d e n t t e s t s o n ly 8 . P r o v id e d ia g n o s t ic d a t a o n f a ilu r e 9 . N o h a r d -c o d in g o f y o u r e n v ir o n m e n t 1 0 . N o e x t r a n e o u s in p u t
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 6 E v o lu t io n a r y A lg o r it h m s T h e K e y t o S o lv in g C o m p le x J a v a P u z z le s
  • s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 7 F ir s t 8 f ir s t 8 . n l/b lo g f a c e b o o k . c o m /F i r s t 8 B V @F ir s t 8 B V