SlideShare a Scribd company logo
Introducere in Daniel Nastase, trainer LEC
Agenda De ce JavaFx ? Bazele limbajului JavaFx (din perspectiva unui developer de Java) Aplicatie construita de la 0 Resurse
Integrare java – backend Portabilitate Suport CSS & Softuri editare grafica vs Java –  PRODUCTIVIATE
Variabile Variabilele nu au tip ! def numeConstanta = 0 var numeVariabila = “text” numeVariabila = 90 def numOne : Number = 1.0 def numTwo : Integer = 1
String def nume = ‘Daniel’;  var s = “Salut {nume}”;  def s1 = “acesta este un text” def s2 = ‘acesta este alt text’ Nu mai trebuie comparate folosind metoda equals(String) ! concatenare
Tipul de date duration 5ms; // 5  milsecunde 10s; // 10  secunde 30m; // 30  minute 1h;  // 1  ora
function add(argOne: Integer, argTwo: Integer) : Integer {  result = argOne + argTwo; println("{argOne} + {argTwo} = {result}"); return result;  }   Functii
Sequences  (arrays) def  zile  = ["Mon","Tue","Wed","Thu","Fri"];   def  zileSapt  = [ zile  , ["Sat","Sun"]];   reuniune def  num  = [1..100];   definire interval   def  numMaiMariCa2  = nums[n | n > 2];  conditie var lungime =  sizeof  zile;  aflare lungime   insert "Tue" into  zile ;   adaugare element insert "Thu" before  zile [2];   delete "Sun" from  zile ;   eliminare element delete  zile [0];   delete  zile ;
Sequences  (arrays) def seq1 = [1,2,3,4,5]; def seq2 = [1,2,3,4,5]; println(seq1 == seq2) ;  true def seq1 = [1,2,3,4,5]; def seq2 = [1,3,2,4,5]; println(seq1 == seq2);   false seq[a..b] seq[a..]
Structuri de control if else for  while throw - cath - finally var s = "The answer is {if (answer) "Yes“ else "No"}"; // s = 'The answer is Yes' – expresii embedded
Replace Triggers  & Bind Replace Triggers var password = “ test1 "  on replace  oldValue { println("\nALERT!  Parola s-a schimbat !");  println(“ Val veche : {oldValue}");  println(“ Val noua : {password}"); }; password = “ test2 ";   Bining password = "bar";   var x = 0;  def y = bind x;  x = 1;  println(y); // y este acum 1  x = 47;  println(y); // y este acum 47
“Constructorul” class  Address {  var street: String;  var city: String;  var state: String;  var zip: String;  }  class  Customer {  var firstName: String;  var lastName: String;  var phoneNum: String;  var address: Address;   } def customer = Customer {  firstName: "John";  lastName: "Doe";  phoneNum: "(408) 555-1212"  address: Address {  street: "1 Main Street";  city: "Santa Clara";  state: "CA"; zip: "95050"; } }
Noi modificatori de acces public private protected defaults public-read    public-init
Mostenire multipla !!! mixin  class MyNameMixin {  var firstName = "John";  var lastName = "Doe";  function printName(){    println("My name is: {firstName} {lastName}");} } mixin  class MyAddressMixin {  var address = "1 Main Street, Anytown USA";  function printAddress(){  println("My address is: {address}");} } class MyContact extends MyNameMixin, MyAddressMixin { }
Doua metode cu aceasi semnatura ? Initial se verifica daca metoda apelata exista in clasa curenta, iar daca nu exista va fi apelata metoda  primului parinte  din declaratia clasei.   class MyContact extends  MyNameMixin ,  MyAddressMixin { }
Charts
Transformari
javafx.com
learnjavafx.typepad.com
Essential JavaFx
http://java.sun.com/javafx/1.2/docs/api/
google.com  :p

More Related Content

PPTX
Programming - Marla Fuentes
DOC
Control structures
PDF
Ownership System in Rust
PDF
clap: Command line argument parser for Pharo
PPT
Loops
PPT
C Sharp Jn (3)
PDF
Logging in JavaScript - part-2
Programming - Marla Fuentes
Control structures
Ownership System in Rust
clap: Command line argument parser for Pharo
Loops
C Sharp Jn (3)
Logging in JavaScript - part-2

What's hot (20)

PDF
Effective Modern C++ - Item 35 & 36
PDF
Protocol handler in Gecko
PPTX
OSGi Asynchronous Services: more than RPC
PPTX
C++ Lambda and concurrency
PDF
Степан Кольцов — Rust — лучше, чем C++
PPTX
Android taipei 20160225 淺談closure
PPTX
Ruby Code Optimizations (for beginners)
PPT
Os Secoske
PDF
Telegram bots
PPTX
Evgeniy Muralev, Mark Vince, Working with the compiler, not against it
PDF
Demystifying the Go Scheduler
PPTX
What is recursion?
PDF
Qt Rest Server
PDF
Modern C++ Concurrency API
DOC
Data structure
TXT
Sine Wave Generator with controllable frequency displayed on a seven segment ...
PPTX
JavaScript Loop: Optimization of Weak Typing
PDF
Are we ready to Go?
PPT
Processes And Job Control
PPTX
Teorical 1
Effective Modern C++ - Item 35 & 36
Protocol handler in Gecko
OSGi Asynchronous Services: more than RPC
C++ Lambda and concurrency
Степан Кольцов — Rust — лучше, чем C++
Android taipei 20160225 淺談closure
Ruby Code Optimizations (for beginners)
Os Secoske
Telegram bots
Evgeniy Muralev, Mark Vince, Working with the compiler, not against it
Demystifying the Go Scheduler
What is recursion?
Qt Rest Server
Modern C++ Concurrency API
Data structure
Sine Wave Generator with controllable frequency displayed on a seven segment ...
JavaScript Loop: Optimization of Weak Typing
Are we ready to Go?
Processes And Job Control
Teorical 1
Ad

Similar to Introducere In Java Jx (20)

ODP
Scala 2 + 2 > 4
ODP
Scala introduction
PPTX
Oscon 2010 Specs talk
PPTX
Scala 3camp 2011
ODP
Modern Perl
PPTX
Groovy
PPT
Dealing with Legacy Perl Code - Peter Scott
PPTX
C to perl binding
PDF
Einführung in TypeScript
PDF
Good Evils In Perl
PPT
Fantom and Tales
PPT
Embedded Typesafe Domain Specific Languages for Java
ODP
Advanced Perl Techniques
ODP
Python quickstart for programmers: Python Kung Fu
DOCX
YOU SHOULD NOT MODIFY ANYTHING IN THIS FILE .docx
PPT
Unit8
ODP
Test du futur avec Spock
PPT
SDC - Einführung in Scala
ODP
Introduction to Perl
PDF
Dart - en ny platform til webudvikling af Rico Wind, Google
Scala 2 + 2 > 4
Scala introduction
Oscon 2010 Specs talk
Scala 3camp 2011
Modern Perl
Groovy
Dealing with Legacy Perl Code - Peter Scott
C to perl binding
Einführung in TypeScript
Good Evils In Perl
Fantom and Tales
Embedded Typesafe Domain Specific Languages for Java
Advanced Perl Techniques
Python quickstart for programmers: Python Kung Fu
YOU SHOULD NOT MODIFY ANYTHING IN THIS FILE .docx
Unit8
Test du futur avec Spock
SDC - Einführung in Scala
Introduction to Perl
Dart - en ny platform til webudvikling af Rico Wind, Google
Ad

Recently uploaded (20)

PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Pharma ospi slides which help in ospi learning
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
GDM (1) (1).pptx small presentation for students
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Complications of Minimal Access Surgery at WLH
PDF
Classroom Observation Tools for Teachers
PPTX
master seminar digital applications in india
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Lesson notes of climatology university.
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Chinmaya Tiranga quiz Grand Finale.pdf
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Anesthesia in Laparoscopic Surgery in India
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Pharma ospi slides which help in ospi learning
Microbial disease of the cardiovascular and lymphatic systems
GDM (1) (1).pptx small presentation for students
A systematic review of self-coping strategies used by university students to ...
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Complications of Minimal Access Surgery at WLH
Classroom Observation Tools for Teachers
master seminar digital applications in india
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Lesson notes of climatology university.
Final Presentation General Medicine 03-08-2024.pptx
Cell Structure & Organelles in detailed.
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
O5-L3 Freight Transport Ops (International) V1.pdf
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE

Introducere In Java Jx

  • 1. Introducere in Daniel Nastase, trainer LEC
  • 2. Agenda De ce JavaFx ? Bazele limbajului JavaFx (din perspectiva unui developer de Java) Aplicatie construita de la 0 Resurse
  • 3. Integrare java – backend Portabilitate Suport CSS & Softuri editare grafica vs Java – PRODUCTIVIATE
  • 4. Variabile Variabilele nu au tip ! def numeConstanta = 0 var numeVariabila = “text” numeVariabila = 90 def numOne : Number = 1.0 def numTwo : Integer = 1
  • 5. String def nume = ‘Daniel’; var s = “Salut {nume}”; def s1 = “acesta este un text” def s2 = ‘acesta este alt text’ Nu mai trebuie comparate folosind metoda equals(String) ! concatenare
  • 6. Tipul de date duration 5ms; // 5 milsecunde 10s; // 10 secunde 30m; // 30 minute 1h; // 1 ora
  • 7. function add(argOne: Integer, argTwo: Integer) : Integer { result = argOne + argTwo; println("{argOne} + {argTwo} = {result}"); return result; } Functii
  • 8. Sequences (arrays) def zile = ["Mon","Tue","Wed","Thu","Fri"]; def zileSapt = [ zile , ["Sat","Sun"]]; reuniune def num = [1..100]; definire interval def numMaiMariCa2 = nums[n | n > 2]; conditie var lungime = sizeof zile; aflare lungime insert "Tue" into zile ; adaugare element insert "Thu" before zile [2]; delete "Sun" from zile ; eliminare element delete zile [0]; delete zile ;
  • 9. Sequences (arrays) def seq1 = [1,2,3,4,5]; def seq2 = [1,2,3,4,5]; println(seq1 == seq2) ; true def seq1 = [1,2,3,4,5]; def seq2 = [1,3,2,4,5]; println(seq1 == seq2); false seq[a..b] seq[a..]
  • 10. Structuri de control if else for while throw - cath - finally var s = "The answer is {if (answer) "Yes“ else "No"}"; // s = 'The answer is Yes' – expresii embedded
  • 11. Replace Triggers & Bind Replace Triggers var password = “ test1 " on replace oldValue { println("\nALERT! Parola s-a schimbat !"); println(“ Val veche : {oldValue}"); println(“ Val noua : {password}"); }; password = “ test2 "; Bining password = "bar"; var x = 0; def y = bind x; x = 1; println(y); // y este acum 1 x = 47; println(y); // y este acum 47
  • 12. “Constructorul” class Address { var street: String; var city: String; var state: String; var zip: String; } class Customer { var firstName: String; var lastName: String; var phoneNum: String; var address: Address; } def customer = Customer { firstName: "John"; lastName: "Doe"; phoneNum: "(408) 555-1212" address: Address { street: "1 Main Street"; city: "Santa Clara"; state: "CA"; zip: "95050"; } }
  • 13. Noi modificatori de acces public private protected defaults public-read  public-init
  • 14. Mostenire multipla !!! mixin class MyNameMixin { var firstName = "John"; var lastName = "Doe"; function printName(){ println("My name is: {firstName} {lastName}");} } mixin class MyAddressMixin { var address = "1 Main Street, Anytown USA"; function printAddress(){ println("My address is: {address}");} } class MyContact extends MyNameMixin, MyAddressMixin { }
  • 15. Doua metode cu aceasi semnatura ? Initial se verifica daca metoda apelata exista in clasa curenta, iar daca nu exista va fi apelata metoda primului parinte din declaratia clasei. class MyContact extends MyNameMixin , MyAddressMixin { }

Editor's Notes

  • #8: Tipul returnat poate fi omis daca este null, nu mai trebuie sa punem void
  • #9: Paranteze patrate in loc de acolade
  • #11: Din ce stiu eu nu exista un alt limbaj de scripting care sa aiba thow – catch implementat
  • #12: Pentru exemplu cu Replace Triggers listenerul se apeleaza de doua ori
  • #13: Va reamintesc ca in aceasta prezentare vom sublinia doar lucrurile care sunt diferite de limbajul Java. De exemplu definirea unei clase se face 90% la fel, mostenirea se face tot folosind extends si asa mai departe. Nu mai exista keyword-ul new