Return of Rich Client Java - Brazil
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Return of Rich Client Java - Brazil

on

  • 7,218 views

 

Statistics

Views

Total Views
7,218
Views on SlideShare
1,851
Embed Views
5,367

Actions

Likes
2
Downloads
26
Comments
0

11 Embeds 5,367

http://steveonjava.com 4408
http://javafx.steveonjava.com 904
http://agile.steveonjava.com 23
http://flash.steveonjava.com 15
http://us-w1.rockmelt.com 6
http://translate.googleusercontent.com 5
http://webcache.googleusercontent.com 2
http://wwww.steveonjava.com 1
http://x.steveonjava.com 1
http://www.flash.steveonjava.com 1
http://avafx.steveonjava.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

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
  • Oracle Java/JavaFX EvangelistAuthored several Java books, most recently Pro JavaFX 2Blog: steveonjava.comTwitter: @steveonjavastephen.chin@oracle.com
  • Visit ProJavaFX2.com to download Chapter 1 and all code examplesJavaFX site: oracle.com/javafxNetBeans site: netbeans.orgfxexperience blog: fxexperience.comJim Weaver’s JavaFX blog: JavaFXpert.comMy JavaFX blog: steveonjava.com
  • The JRE with JavaFX enables graphically rich, fast performing applications Developing JavaFX apps is natural and funLots of great resources exist to help you get started with JavaFXYou should begin playing with JavaFX now!
  • Bringing back rich-client JavaLearning the history of JavaFXObtaining JavaFX tools and resourcesBuilding and running Hello EarthRiseReviewing the structure of Hello EarthRise
  • The web, originally intended for sharing hypertext-linked resources, has been force-fit into being a rich-client platformThe JRE with JavaFX is a much better client platform, enabling graphically rich, fast performing applications See Chapter 1 JavaFX Can’t Bring Rich-Client Java Back by Itself section

Return of Rich Client Java - Brazil Presentation Transcript

  • 1. 1 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 2. O Retorno do Rich-Client Java Translation By:Apresentado por Stephen Chin Marcelo Quinta @mrquinta 2 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 3. Sobre o palestrante: Stephen Chin • Evangelista Java/JavaFX na Oracle • Autor de vários livros de Java, mais recentemente o Pro JavaFX 2 • Blog: steveonjava.com • Twitter: @steveonjava • stephen.chin@oracle.com3 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 4. Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.4 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 5. Recursos da apresentação• Visite ProJavaFX2.com para baixar o capítulo 1 e todos os exemplos• Site do JavaFX: oracle.com/javafx• Site do NetBeans: netbeans.org• Blog fxexperience: fxexperience.com• Blog do Jim Weaver sobre JavaFX: JavaFXpert.com• Meu blog de JavaFX: steveonjava.com 5 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 6. O que eu quero que vocês percebam 1. A JRE com JavaFX permite a execução de aplicações graficamente ricas e com ótima performance 2. Desenvolver apps em JavaFX é natural e divertido 3. Existem ótimos recursos para ajudá-lo a começar com JavaFX 4. Você deve começar a brincar com JavaFX agora!6 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 7. 1. Introdução ao JavaFX • Trazendo de volta o rich-client Java • Entendendo a história do JavaFX • Obtendo ferramentas e recursos do JavaFX • Desenvolvendo e rodando o Hello EarthRise • Revisando a estrutura do Hello EarthRise7 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 8. Trazendo de volta o rich-client Java• A web, originalmente projetada para compartilhamento de recursos de hipertexto ligados (ex:HTML) está sendo forçada a se tornar uma plataforma para clientes ricos (rich-client)• A JRE com JavaFX é uma plataforma de rich-client muito melhor, permitindo a execução de aplicações graficamente ricas e com ótima performance• Veja a seção JavaFX Can’t Bring Rich-Client Java Back by Itself do capítulo 1 8 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 9. Entendendo a história do JavaFX • A idéia é de Chris Oliver na SeeBeyond, que foi adquirida pela Sun • Plataforma e linguagem JavaFX Script anunciada no JavaOne 2007 • Oracle implementou JavaFX 2 como uma API para Java, anunciada no JavaOne 2010 • JavaFX 2.1 GA lançado no JavaOne India 2012 – Windows and OS/X now GA, Linux GA soon • Veja a seção A Brief History of JavaFX no Capítulo 19 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 10. Obtendo ferramentas e recursos JavaFX • Visite oracle.com/javafx e navegue para JavaFX 2.1 SDK. Página de download é: – http://www.oracle.com/technetwork/java/javafx/downloads • Você também pode fazer download do NetBeans 7.1 nessa página • Siga as instruções do Set Up NetBeans IDE With JavaFX • Nota: JDK 7u4 já vem com o SDK do JavaFX 2.110 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 11. Construindo e executando o Hello EarthRise • Siga os passos da seção Building and Running the Program with NetBeans do Capítulo 111 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 12. Demo12 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 13. Revisão da estrutura do Hello Earthrise• Classe da aplicação e o método sobrescrito start()• Código declarativo que define a interface do usuário• Usando a classe Stage• Usando a classe Scente• Mostrando imagens• Veja a seção Understanding the Hello Earthrise Program do capítulo 113 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 14. Passo-a-passo no código 14 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 15. 2. Criando uma interface gráfica em JavaFX• Demo da app MetronomeTransition• Revisão do código do MetronomeTransition• Expressando a interface gráfica de maneira declarativa• Fazendo o binding(ligação) de propriedades no modelo• Nós de animação15 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 16. Demo da app MetronomeTransition • Código do MetronomeTransition está na pasta 8727_ch02code do pacote de download do Pro JavaFX 2 code16 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 17. Demo17 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 18. Revisão do código do MetronomeTransition • Expressando a interface gráfica de maneira declarativa • Usando classes de layout • Fazendo o binding(ligação) de propriedades no modelo • Nós de animação18 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 19. Passo-a-passo no código 19 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 20. 3. Usando os controles da JavaFX UI• Demo do exemplo StarterApp• Examinando o código do StarterApp• Visão geral dos componentes de interação da StarterApp• Aproveitando os controles de UI em código• Associando uma folha de estilos CSS ao JavaFX• Definindo as classes do domínio20 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 21. Demo do exemplo StarterApp • Código do StarterApp está na pasta 8727_ch05code do pacote de download do Pro JavaFX 2 code21 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 22. Demo22 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 23. Examinando o código StarterApp • Visão geral dos componentes de interação da StarterApp • Aproveitando os controles de UI em código • Associando uma folha de estilos CSS ao JavaFX • Definindo as classes do domínio23 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 24. Passo-a-passo no código 24 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 25. 4. Usando as classes de Mídia• Demo da app VideoPlayer1• Examinando o código do VideoPlayer1• Usando MediaView, MediaPlayer e classes de Mídia• Programação procedural vs. abordagem declarativa25 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 26. Demo do VideoPlayer1 • Código do VideoPlayer1 está na pasta 8727_ch08code do pacote de download do Pro JavaFX 2 code26 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 27. Passo-a-passo no código 27 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 28. Examinando o código do VideoPlayer1 • Usando MediaView, MediaPlayer e classes de Mídia • Programação procedural vs. abordagem declarativa28 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 29. Passo-a-passo no código 29 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 30. 5. Usando FXML • Demo da app AdoptionForm • Examinando a arquitetura do AdoptionForm • Ferramenta Scene Builder gera FXML30 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 31. The AdoptionForm example app31 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 32. Demo32 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 33. 6. Implantando apps JavaFX • Algumas opções são Java WebStart e rodar como um applet – ex. Ícone em uma página conhecida que invoca o TweetBrowser no Java WebStart • Outra boa opção de implantação é chamar um instalador – “Não há aplicação que faça isso” – Veja o post relacionado no FXexperience.com33 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 34. 7. Embutindo HTML5 • Ver a API WebView • Demonstrar o exemplo Java Conference Tour • Examinar a arquitetura do Java Conference Tour34 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 35. Mostrando HTML no JavaFX public class WebViewTest extends Application { public static void main(String[] args) { launch(WebViewTest.class, args); } @Override public void start(Stage stage) { WebView webView = new WebView(); webView.getEngine().load("http://google.com"); Scene scene = new Scene(webView); stage.setScene(scene); stage.setTitle("Web Test"); stage.show(); }}35 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 36. Mostrando HTMLno JavaFX36 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 37. Chamando Javascript no JavaFX String script = "alert(We have got a message, Houston!);”; eng.executeScript(script);37 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 38. Conversão de tipos JavaScript para JavaJavaScript Javanull nullundefined “undefined”number java.lang.Number (Integer ou Double)string java.lang.Stringboolean java.lang.Booleanobject netscape.javascript.JSObject 38 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 39. Respondendo a eventos de Browser • Alert/Confirm/Prompt – Responder para funções de interação JavaScript • Redimensionamento – Página web se move ou redimensiona a janela • Status – Página muda o texto de status • Visibilidade – Esconder ou mostrar a janela • Popup – Gerar uma segunda tela/engine39 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 40. A app Java Conference Tour40 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 41. Demo41 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 42. O que vimos nessa apresentação 1. A JRE com JavaFX permite a execução de aplicações graficamente ricas e com ótima performance 2. Desenvolver apps em JavaFX é natural e divertido 3. Existem ótimos recursos para ajudá-lo a começar com JavaFX 4. Você deve começar a brincar com JavaFX agora!42 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 43. Perguntas e Respostas43 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 44. 44 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.