SlideShare ist ein Scribd-Unternehmen logo
1 von 55
Downloaden Sie, um offline zu lesen
[грýви]	
  
Привет!	
  




@antonarhipov	
             @jrebel	
  

          Java,	
  Groovy	
  
Немного	
  истории	
  


           Rhino	
  
1995	
     1997	
      2001	
     2003	
     2011	
  


                BeanShell
James	
  Strachan	
  
                 29	
  Aug	
  2003	
  Groovy	
  –	
  the	
  birth	
  of	
  	
  
                 new	
  dynamic	
  language	
  for	
  Java	
  
                 PlaOorm	
  
                 h0p://radio-­‐weblogs.com/0112098/2003/08/29.html	
  	
  


July	
  2009	
  “I	
  can	
  honestly	
  say	
  if	
  someone	
  had	
  	
  
shown	
  me	
  the	
  Programming	
  in	
  Scala	
  book	
  back	
  	
  
in	
  2003	
  I’d	
  probably	
  never	
  created	
  Groovy”	
  
Плюшки	
  
 •  Скрипты!	
  
 •  Коллекции	
  
 •  GPath	
  
 •  “Строители”	
  
 •  Метапрограммирование	
  
 •  Экосистема	
  
System.out.println(“Hello, World!”);!
println ‘Hello, World!’!
System.out.println(“Hello, World!”);!
println ‘Hello, World!’!




                Необязательны:	
  “;”,	
  
                   System.out,	
  (),	
  	
  
                   метод	
  main(),	
  	
  
                определение	
  класса	
  
System.out.println(“Hello, World!”);!
println ‘Hello, World!’!
def name = ‘Anton’!
println “Hello, $name!”!




                   Динамическая	
  
                    типизация,	
  
                      GString	
  
System.out.println(“Hello, World!”);!
println ‘Hello, World!’!
def name = ‘Anton’!
println “Hello, $name!”!
String longer = “””Hello, $name, !
          Groovy is really cool!”””!




                    Статическая	
  
                    типизация,	
  
                 «многострочность»	
  
System.out.println(“Hello, World!”);!
println ‘Hello, World!’!
def name = ‘Anton’!
println “Hello, $name!”!
String longer = “””Hello, $name, !
          Groovy is really cool!”””!
assert 1.5 == 3/2!



                     BigDecimal	
  
                      equals()	
  
System.out.println(“Hello, World!”);!
println ‘Hello, World!’!

                 «утиная»	
  
def name = ‘Anton’!
println “Hello, $name!”!
String longer =  типизация	
  
                 “””Hello, $name,!
          Groovy is really cool!”””!
assert 1.5 == 1/2!
def printSize(obj){!
   print obj?.size()!
                           безопасное	
  
}!
                         разыменование	
  
                             ссылок	
  
System.out.println(“Hello, World!”);!
println ‘Hello, World!’!
def name = ‘Anton’!
  Специальный	
  
println “Hello, $name!”!
String longerля	
   “””Hello, $name, !
  синтаксис	
  д =
          Groovy is really cool!”””!
    коллекций	
  
assert 1.5 == 1/2!
def printSize(obj){!
   print obj?.size()!
}!
def pets = [‘dog’,’cat’]!     замыкания	
  и	
  
pets.each {pet ->!             перегрузка	
  
   assert pet < ‘dog’!         операторов	
  
}!
System.out.println(“Hello, World!”);!
println ‘Hello, World!’!
def name = ‘Anton’!
println “Hello, $name!”!
String longer = “””Hello, $name, !
          Groovy is really cool!”””!
assert 1.5 == 1/2!
def printSize(obj){!
   print obj?.size()!
}!
def pets = [‘dog’,’cat’]!
pets.each {pet ->!
   assert pet < ‘dog’!
}!
import java.util.List;!
import java.util.ArrayList;!
class Erase {!
   private List removeLongerThan(List strings, int length) {!
      List result = new ArrayList();!




                                                                Java	
  ==	
  Groovy	
  
      for (String s: strings) {!
         if (s.length() <= length) {!
            result.add(s);!
         }!
      }!
      return result;!
   }!
!
   public static void main(String[] args) {!
      List names = new ArrayList();!
      names.add("Вася"); names.add("Коля");!
      names.add("Петя"); names.add("Фёдор");!
      System.out.println(names);!
      Erase e = new Erase();!
      List shortNames = e.removeLongerThan(names, 4);!
      System.out.println(shortNames.size());!
      for (String s: shortNames) {!
         System.out.println(s);!
      }!
   }!
}!
import java.util.List;!
import java.util.ArrayList;!
class Erase {!
   private List removeLongerThan(List strings, int length) {!
      List result = new ArrayList();!
      for (String s: strings) {!
         if (s.length() <= length) {!
            result.add(s);!
         }!
      }!                            Импорты	
  по-­‐умолчанию	
  
      return result;!
   }!                                  ;	
  необязателен	
  
!
   public static void main(String[] args) {!
      List names = new ArrayList();!
      names.add("Вася"); names.add("Коля");!
      names.add("Петя"); names.add("Фёдор");          !
      System.out.println(names);!
      Erase e = new Erase();!
      List shortNames = e.removeLongerThan(names, 4);         !
      System.out.println(shortNames.size());!
      for (String s: shortNames) {!
         System.out.println(s);!
      }!
   }!
}!
class Erase {!
   private List removeLongerThan(List strings, int length) {!
      List result = new ArrayList()!
      for (String s: strings) {!
         if (s.length() <= length) {!
            result.add(s)!
         }!
      }!
      return result!
   }!
!
   public static void main(String[] args) {!
      List names = new ArrayList()!
      names.add("Вася") names.add("Коля") !
      names.add("Петя") names.add("Фёдор") !
      System.out.println(names)!
      Erase e = new Erase()!
      List shortNames = e.removeLongerThan(names, 4)        !
      System.out.println(shortNames.size())!
      for (String s: shortNames) {!
         System.out.println(s)!
      }!
   }!
}!
class Erase {!
   private List removeLongerThan(List strings, int length) {!
      List result = new ArrayList()!
      for (String s: strings) {!
         if (s.length() <= length) {!
            result.add(s)!
         }!              Динамическая	
  типизация	
  
      }!
      return result!
                         Не	
  надо	
  определять	
  класс	
  и	
  main()	
  
!
   }!                    length	
  и	
  size	
  
   public static void main(String[] args) {!
      List names = new ArrayList()!
      names.add("Вася") names.add("Коля") !
      names.add("Петя") names.add("Фёдор")          !
      System.out.println(names)!
      Erase e = new Erase()!
      List shortNames = e.removeLongerThan(names, 4)!
      System.out.println(shortNames.size())!
      for (String s: shortNames) {!
         System.out.println(s)!
      }!
   }!
}!
def removeLongerThan(strings, length) {!
   def result = new ArrayList()!
   for (s in strings) {!
      if (s.size() <= length) {!
         result.add(s)!
      }!
   }!
   return result!
}!
   !
names = new ArrayList()!
names.add("Вася") !
names.add("Коля") !
names.add("Петя") !
names.add("Фёдор") !
System.out.println(names)!
shortNames = e.removeLongerThan(names, 4)!
System.out.println(shortNames.size())!
for (s: shortNames) {!
   System.out.println(s)!
}!
def removeLongerThan(strings, length) {!
   def result = new ArrayList()!
   for (s in strings) {!
      if (s.size() <= length) {!
         result.add(s)!
      }!
   }!                       Нотация	
  для	
  списков	
  
   return result!
}!                          Упрощённая	
  работа	
  со	
  списками	
  
   !
names = new ArrayList()!    return	
  необязателен	
  
names.add("Вася") !
names.add("Коля") !
names.add("Петя")!
names.add("Фёдор")!
System.out.println(names)!
shortNames = e.removeLongerThan(names, 4)!
System.out.println(shortNames.size())!
for (s: shortNames) {!
   System.out.println(s)!
}!
def removeLongerThan(strings, length) {!
   strings.findAll { it.size() <= length }!
}!
   !
names = ["Вася", "Коля", "Петя", "Фёдор"]!
System.out.println(names)!
shortNames = e.removeLongerThan(names, 4)!
System.out.println(shortNames.size())!
shortNames.each { System.out.println(s) }!
def removeLongerThan(strings, length) {!
   strings.findAll { it.size() <= length }!
}!
   !
names = ["Вася", "Коля", "Петя", "Фёдор"]!
System.out.println(names)!
shortNames = e.removeLongerThan(names, 4)!
System.out.println(shortNames.size())!
shortNames.each { System.out.println(s) }!




                 Ненужный	
  метод!	
  
       Убрать	
  ненавистный	
  System.out	
  !	
  
                   Скобки	
  в	
  сад!	
  
names = ["Вася", "Коля", "Петя", "Фёдор"]!
println names!
shortNames = names.findAll { it.size() <= 4 }!
println shortNames.size()!
shortNames.each { println it }!


            [Вася,	
  Коля,	
  Петя,	
  Федя]	
  
            3	
  
            Вася	
  
            Коля	
  
            Петя	
  
Коллекции	
  
def list = [1, 2, 3, 4, 5, 5]!
assert list.get(2) == 3!
assert list[2] == 3!
assert list instanceOf java.util.List!
def list = [1, 2, 3, 4, 5, 5]!
assert list.get(2) == 3!
assert list[2] == 3!
assert list instanceOf java.util.List!


def list = [1, 2, 3, 4, 5, 5] as Set!
assert list.size() == 5!
assert list instanceOf java.util.Set!
!
def range = 5..8!
assert range.size() == 4!
assert range[2] == 7!
assert range.contains(5)!
!
!
!
def range = 5..8!
assert range.size() == 4!
assert range[2] == 7!
assert range.contains(5)!
!
def range = 5..<8!
assert range.size() == 3!
assert ! range.contains(8)!
!
!
!
def range = 5..8!
assert range.size() == 4!
assert range[2] == 7!
assert range.contains(5)!
!
def range = 5..<8!
assert range.size() == 3!
assert ! range.contains(8)!
!
assert range.from == 5!
assert range.to == 7!
!
!
def range = ‘a’..’d’!
assert range.size() == 4!
assert range[2] == ‘c’!
assert range.contains(‘a’)!
assert ! range.contains(‘e’)!
!
!
for(i in 1..10) { !
   println “${i}” !
}!
!
(1..10).each { !
    println “$it” !
}!
!
switch(years){!
   case 1..10: rate = 1.015; break; !
   case 11..25: rate = 0.905; break;!
       default: rate = 0.755; !
}!
def map = [name:’Anton’, age:28, id:2]!
assert map[’name’] == 'Anton’!
assert map.id == 2!
assert map instanceOf java.util.Map!
!
!
!
def map = [name:’Anton’, age:28, id:2]!
assert map[’name’] == 'Anton’!
assert map.id == 2!
assert map instanceOf java.util.Map!
!
def empty = [:]!
empty.foo = 25!
assert empty.foo == 25!
!
!
[1,2,3,4,5]*.plus(1)!
[2,	
  3,	
  4,	
  5,	
  6]	
  
[1,2,3,4,5]*.plus(1)!
[2,	
  3,	
  4,	
  5,	
  6]	
  

[1,2,3,4,5].findAll {it > 3}!
[4,	
  5,	
  6]	
  
[5,2,1,3,4].sort()!
[1,	
  2,	
  3,	
  4,	
  5]	
  
[5,2,1,3,4].sort()!
[1,	
  2,	
  3,	
  4,	
  5]	
  


[‘ccc’,‘a’,‘bb’].sort {it.size()}!

[‘a’,	
  ‘bb’,	
  ‘ccc’]	
  
['test', 12, 20, true].grep(Boolean)!
!
['test', 'Groovy', 'Java'].grep(~/^G.*/)!
!
['a', 'b', 'c', 'd'].grep(['b', 'c'])!
!
[1, 15, 16, 30, 12].grep(12..18)!
!
[12.300, 109.20, 42.031].grep(42.031)!
!
[10, 20, 30, 50, 100].grep({ it > 50 })!
def	
  text	
  ="""	
  
	
  	
  	
  	
  <cars>	
  
	
  	
  	
  	
  	
  	
  <car	
  name='HSV	
  Maloo'	
  year='2006'>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <country>Australia</country>	
  
	
  	
  	
  	
  	
  	
  </car>	
  
	
  	
  	
  	
  	
  	
  <car	
  name='P50'	
  year='1962'>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <country>Isle	
  of	
  Man</country>	
  
	
  	
  	
  	
  	
  	
  </car>	
  
	
  	
  	
  	
  	
  	
  <car	
  name='Royale'	
  year='1931'>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <country>France</country>	
  
	
  	
  	
  	
  	
  	
  </car>	
  
	
  	
  	
  	
  </cars>	
                                                  [‘HSV	
  Maloo’,	
  ‘P50’]	
  
"""	
  
def	
  records	
  =	
  new	
  XmlParser().parseText(text)	
  
	
  
cars	
  =	
  records.car.grep	
  {	
  it.@year	
  >	
  '1960'	
  }	
  
names	
  =	
  cars.collect	
  {it.@name}	
  
import groovy.xml.MarkupBuilder!
!
def builder = new MarkupBuilder()!
!
builder.html {!
   head {!
      title ”Page Title”!
   }!
                          <html>	
  
   body {!                	
  	
  <head>	
  
      p ”My text" !       	
  	
  	
  	
  <•tle>Page	
  Title</•tle>	
  
   }!                     	
  	
  </head>	
  
}!                        	
  	
  <body>	
  
                                           	
  	
  	
  	
  <p>My	
  text</p>	
  
                                           	
  	
  </body>	
  
                                           </html>	
  	
  
import groovy.json.JsonBuilder!
!
def builder = new JsonBuilder()!
def root = builder.me {!
   name ”Anton”!
   lastName ”Arhipov”!
   age 13!
}!

println builder!
{"me":{"name":"Anton","lastName":"Arhipov","age":13}}	
  

println root!
[me:[name:Anton,	
  lastName:Arhipov,	
  age:13]]	
  
import groovy.util.AntBuilder!
def ant = new AntBuilder()!
ant.sequential {!
    echo("inside sequential")!
    myDir = "target/AntTest/"!
    mkdir(dir:myDir)!
    copy(todir:myDir) {!
        fileset(dir:"src/test") {!
            include(name:"**/*.groovy")!
        }!
    }!
    echo("done")!
}!
html {!
   head {!
      title "Hello"!
   }!
   body {!
      p "Hello"!
   }!
}!
html({!
  head({!
    title("Hello")!
  }),!
  body({!
    p("Hello")!
  })!
})!
html { }!
Название	
  метода	
  


                html { }!

                             Параметр	
  
                         instanceof	
  Closure	
  
html { }!
html { title {} }!
html { title {   итд } }!
invokeMethod!
     !
methodMissing!
class Foo {!
 !
 }!
 !
 foo = new Foo()!
 !
 foo.hello()!

groovy.lang.MissingMethodExcep^on:	
  No	
  signature	
  of	
  method:	
  
Foo.hello()	
  is	
  applicable	
  for	
  argument	
  types:	
  ()	
  values:	
  []	
  
Possible	
  solu•ons:	
  sleep(long),	
  sleep(long,	
  groovy.lang.Closure),	
  
each(groovy.lang.Closure),	
  split(groovy.lang.Closure),	
  
getAt(java.lang.String),	
  wait()	
  
class Foo {!
 def methodMissing(String name, args) {…}!
}!
!
foo = new Foo()!
!
foo.hello()!
def invokeMethod(String name, args){!
   def call = args[0]!
   println "<$name>"!
   if(call instanceof Closure){!
      call.delegate = this!
      call.call()!
   } else {!
      println call.toString()!
   }!
   println "</$name>"       !
}!
Integer.metaClass {!
  getEur = { -> delegate + "EUR" }!
}!
!
10.eur!


price:	
  10EUR	
  
import groovy.time.TimeCategory!
!
use(TimeCategory){!
     1.day.from.now!
}!
groovy.codehaus.org	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Scala in a Java 8 World
Scala in a Java 8 WorldScala in a Java 8 World
Scala in a Java 8 WorldDaniel Blyth
 
Investigating Python Wats
Investigating Python WatsInvestigating Python Wats
Investigating Python WatsAmy Hanlon
 
Learn python - for beginners - part-2
Learn python - for beginners - part-2Learn python - for beginners - part-2
Learn python - for beginners - part-2RajKumar Rampelli
 
Python and sysadmin I
Python and sysadmin IPython and sysadmin I
Python and sysadmin IGuixing Bai
 
Switching from java to groovy
Switching from java to groovySwitching from java to groovy
Switching from java to groovyPaul Woods
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In PythonMarwan Osman
 
Real world gobbledygook
Real world gobbledygookReal world gobbledygook
Real world gobbledygookPawel Szulc
 
Impress Your Friends with EcmaScript 2015
Impress Your Friends with EcmaScript 2015Impress Your Friends with EcmaScript 2015
Impress Your Friends with EcmaScript 2015Lukas Ruebbelke
 
A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009Jordan Baker
 
Python WATs: Uncovering Odd Behavior
Python WATs: Uncovering Odd BehaviorPython WATs: Uncovering Odd Behavior
Python WATs: Uncovering Odd BehaviorAmy Hanlon
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to PythonUC San Diego
 
An (Inaccurate) Introduction to Python
An (Inaccurate) Introduction to PythonAn (Inaccurate) Introduction to Python
An (Inaccurate) Introduction to PythonNicholas Tollervey
 

Was ist angesagt? (20)

Scala in a Java 8 World
Scala in a Java 8 WorldScala in a Java 8 World
Scala in a Java 8 World
 
Investigating Python Wats
Investigating Python WatsInvestigating Python Wats
Investigating Python Wats
 
Learn python - for beginners - part-2
Learn python - for beginners - part-2Learn python - for beginners - part-2
Learn python - for beginners - part-2
 
Python and sysadmin I
Python and sysadmin IPython and sysadmin I
Python and sysadmin I
 
Having Fun Programming!
Having Fun Programming!Having Fun Programming!
Having Fun Programming!
 
Switching from java to groovy
Switching from java to groovySwitching from java to groovy
Switching from java to groovy
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In Python
 
Real world gobbledygook
Real world gobbledygookReal world gobbledygook
Real world gobbledygook
 
Impress Your Friends with EcmaScript 2015
Impress Your Friends with EcmaScript 2015Impress Your Friends with EcmaScript 2015
Impress Your Friends with EcmaScript 2015
 
1 the ruby way
1   the ruby way1   the ruby way
1 the ruby way
 
Programação Funcional
Programação FuncionalProgramação Funcional
Programação Funcional
 
A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009
 
List out of lambda
List out of lambdaList out of lambda
List out of lambda
 
The Magic Of Elixir
The Magic Of ElixirThe Magic Of Elixir
The Magic Of Elixir
 
Python WATs: Uncovering Odd Behavior
Python WATs: Uncovering Odd BehaviorPython WATs: Uncovering Odd Behavior
Python WATs: Uncovering Odd Behavior
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScript
 
Five
FiveFive
Five
 
An (Inaccurate) Introduction to Python
An (Inaccurate) Introduction to PythonAn (Inaccurate) Introduction to Python
An (Inaccurate) Introduction to Python
 
Begin with Python
Begin with PythonBegin with Python
Begin with Python
 

Andere mochten auch

JavaOne 2015 - Having fun with Javassist
JavaOne 2015 - Having fun with JavassistJavaOne 2015 - Having fun with Javassist
JavaOne 2015 - Having fun with JavassistAnton Arhipov
 
JPoint 2016 - Bytecode
JPoint 2016 - BytecodeJPoint 2016 - Bytecode
JPoint 2016 - BytecodeAnton Arhipov
 
Con-FESS 2015 - Having Fun With Javassist
Con-FESS 2015 - Having Fun With JavassistCon-FESS 2015 - Having Fun With Javassist
Con-FESS 2015 - Having Fun With JavassistAnton Arhipov
 
Joker 2016 - Bytecode 101
Joker 2016 - Bytecode 101Joker 2016 - Bytecode 101
Joker 2016 - Bytecode 101Anton Arhipov
 
Devclub 01/2017 - (Не)адекватное Java-интервью
Devclub 01/2017 - (Не)адекватное Java-интервьюDevclub 01/2017 - (Не)адекватное Java-интервью
Devclub 01/2017 - (Не)адекватное Java-интервьюAnton Arhipov
 
JPoint 2016 - Etudes of DIY Java profiler
JPoint 2016 - Etudes of DIY Java profilerJPoint 2016 - Etudes of DIY Java profiler
JPoint 2016 - Etudes of DIY Java profilerAnton Arhipov
 
Something about Golang
Something about GolangSomething about Golang
Something about GolangAnton Arhipov
 
Oredev 2015 - Taming Java Agents
Oredev 2015 - Taming Java AgentsOredev 2015 - Taming Java Agents
Oredev 2015 - Taming Java AgentsAnton Arhipov
 
Riga Dev Day 2016 - Having fun with Javassist
Riga Dev Day 2016 - Having fun with JavassistRiga Dev Day 2016 - Having fun with Javassist
Riga Dev Day 2016 - Having fun with JavassistAnton Arhipov
 
Con-FESS 2015 - Is your profiler speaking to you?
Con-FESS 2015 - Is your profiler speaking to you?Con-FESS 2015 - Is your profiler speaking to you?
Con-FESS 2015 - Is your profiler speaking to you?Anton Arhipov
 
import continuous.delivery.*
import continuous.delivery.*import continuous.delivery.*
import continuous.delivery.*Anton Arhipov
 
JPoint 2015 - Javassist на службе Java-разработчика
JPoint 2015 - Javassist на службе Java-разработчикаJPoint 2015 - Javassist на службе Java-разработчика
JPoint 2015 - Javassist на службе Java-разработчикаAnton Arhipov
 
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Anton Arhipov
 
NetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience ReportNetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience ReportAnton Arhipov
 
Загрузчики классов в Java - коллекция граблей
Загрузчики классов в Java - коллекция граблейЗагрузчики классов в Java - коллекция граблей
Загрузчики классов в Java - коллекция граблейAnton Arhipov
 
Voxxed Days Vilnius 2015 - Having fun with Javassist
Voxxed Days Vilnius 2015 - Having fun with JavassistVoxxed Days Vilnius 2015 - Having fun with Javassist
Voxxed Days Vilnius 2015 - Having fun with JavassistAnton Arhipov
 
Something about Golang
Something about GolangSomething about Golang
Something about GolangAnton Arhipov
 
Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Anton Arhipov
 
Under the hood of scala implicits (Scala eXchange 2014)
Under the hood of scala implicits (Scala eXchange 2014)Under the hood of scala implicits (Scala eXchange 2014)
Under the hood of scala implicits (Scala eXchange 2014)Alexander Podkhalyuzin
 

Andere mochten auch (20)

JavaOne 2015 - Having fun with Javassist
JavaOne 2015 - Having fun with JavassistJavaOne 2015 - Having fun with Javassist
JavaOne 2015 - Having fun with Javassist
 
JPoint 2016 - Bytecode
JPoint 2016 - BytecodeJPoint 2016 - Bytecode
JPoint 2016 - Bytecode
 
Con-FESS 2015 - Having Fun With Javassist
Con-FESS 2015 - Having Fun With JavassistCon-FESS 2015 - Having Fun With Javassist
Con-FESS 2015 - Having Fun With Javassist
 
Joker 2016 - Bytecode 101
Joker 2016 - Bytecode 101Joker 2016 - Bytecode 101
Joker 2016 - Bytecode 101
 
Devclub 01/2017 - (Не)адекватное Java-интервью
Devclub 01/2017 - (Не)адекватное Java-интервьюDevclub 01/2017 - (Не)адекватное Java-интервью
Devclub 01/2017 - (Не)адекватное Java-интервью
 
JPoint 2016 - Etudes of DIY Java profiler
JPoint 2016 - Etudes of DIY Java profilerJPoint 2016 - Etudes of DIY Java profiler
JPoint 2016 - Etudes of DIY Java profiler
 
Something about Golang
Something about GolangSomething about Golang
Something about Golang
 
Oredev 2015 - Taming Java Agents
Oredev 2015 - Taming Java AgentsOredev 2015 - Taming Java Agents
Oredev 2015 - Taming Java Agents
 
Riga Dev Day 2016 - Having fun with Javassist
Riga Dev Day 2016 - Having fun with JavassistRiga Dev Day 2016 - Having fun with Javassist
Riga Dev Day 2016 - Having fun with Javassist
 
Con-FESS 2015 - Is your profiler speaking to you?
Con-FESS 2015 - Is your profiler speaking to you?Con-FESS 2015 - Is your profiler speaking to you?
Con-FESS 2015 - Is your profiler speaking to you?
 
Taming Java Agents
Taming Java AgentsTaming Java Agents
Taming Java Agents
 
import continuous.delivery.*
import continuous.delivery.*import continuous.delivery.*
import continuous.delivery.*
 
JPoint 2015 - Javassist на службе Java-разработчика
JPoint 2015 - Javassist на службе Java-разработчикаJPoint 2015 - Javassist на службе Java-разработчика
JPoint 2015 - Javassist на службе Java-разработчика
 
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
 
NetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience ReportNetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience Report
 
Загрузчики классов в Java - коллекция граблей
Загрузчики классов в Java - коллекция граблейЗагрузчики классов в Java - коллекция граблей
Загрузчики классов в Java - коллекция граблей
 
Voxxed Days Vilnius 2015 - Having fun with Javassist
Voxxed Days Vilnius 2015 - Having fun with JavassistVoxxed Days Vilnius 2015 - Having fun with Javassist
Voxxed Days Vilnius 2015 - Having fun with Javassist
 
Something about Golang
Something about GolangSomething about Golang
Something about Golang
 
Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012
 
Under the hood of scala implicits (Scala eXchange 2014)
Under the hood of scala implicits (Scala eXchange 2014)Under the hood of scala implicits (Scala eXchange 2014)
Under the hood of scala implicits (Scala eXchange 2014)
 

Ähnlich wie Introduction to Groovy

5 Bullets to Scala Adoption
5 Bullets to Scala Adoption5 Bullets to Scala Adoption
5 Bullets to Scala AdoptionTomer Gabel
 
Naïveté vs. Experience
Naïveté vs. ExperienceNaïveté vs. Experience
Naïveté vs. ExperienceMike Fogus
 
CodeCamp Iasi 10 march 2012 - Practical Groovy
CodeCamp Iasi 10 march 2012 - Practical GroovyCodeCamp Iasi 10 march 2012 - Practical Groovy
CodeCamp Iasi 10 march 2012 - Practical GroovyCodecamp Romania
 
An Intro To ES6
An Intro To ES6An Intro To ES6
An Intro To ES6FITC
 
Functional Thinking for Java Developers (presented in Javafest Bengaluru)
Functional Thinking for Java Developers (presented in Javafest Bengaluru)Functional Thinking for Java Developers (presented in Javafest Bengaluru)
Functional Thinking for Java Developers (presented in Javafest Bengaluru)KonfHubTechConferenc
 
Writing Apps the Google-y Way (Brisbane)
Writing Apps the Google-y Way (Brisbane)Writing Apps the Google-y Way (Brisbane)
Writing Apps the Google-y Way (Brisbane)Pamela Fox
 
Are we ready to Go?
Are we ready to Go?Are we ready to Go?
Are we ready to Go?Adam Dudczak
 
Clojure for Java developers - Stockholm
Clojure for Java developers - StockholmClojure for Java developers - Stockholm
Clojure for Java developers - StockholmJan Kronquist
 
Rust Mozlando Tutorial
Rust Mozlando TutorialRust Mozlando Tutorial
Rust Mozlando Tutorialnikomatsakis
 
Productive Programming in Groovy
Productive Programming in GroovyProductive Programming in Groovy
Productive Programming in GroovyGanesh Samarthyam
 
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기Suyeol Jeon
 
Scala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar ProkopecScala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar ProkopecLoïc Descotte
 
Kotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in KotlinKotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in KotlinJetBrains Russia
 
2007 09 10 Fzi Training Groovy Grails V Ws
2007 09 10 Fzi Training Groovy Grails V Ws2007 09 10 Fzi Training Groovy Grails V Ws
2007 09 10 Fzi Training Groovy Grails V Wsloffenauer
 
Plugin jQuery, Design Patterns
Plugin jQuery, Design PatternsPlugin jQuery, Design Patterns
Plugin jQuery, Design PatternsRobert Casanova
 
Writing Apps the Google-y Way
Writing Apps the Google-y WayWriting Apps the Google-y Way
Writing Apps the Google-y WayPamela Fox
 

Ähnlich wie Introduction to Groovy (20)

5 Bullets to Scala Adoption
5 Bullets to Scala Adoption5 Bullets to Scala Adoption
5 Bullets to Scala Adoption
 
Naïveté vs. Experience
Naïveté vs. ExperienceNaïveté vs. Experience
Naïveté vs. Experience
 
CodeCamp Iasi 10 march 2012 - Practical Groovy
CodeCamp Iasi 10 march 2012 - Practical GroovyCodeCamp Iasi 10 march 2012 - Practical Groovy
CodeCamp Iasi 10 march 2012 - Practical Groovy
 
An Intro To ES6
An Intro To ES6An Intro To ES6
An Intro To ES6
 
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
 
Functional Thinking for Java Developers (presented in Javafest Bengaluru)
Functional Thinking for Java Developers (presented in Javafest Bengaluru)Functional Thinking for Java Developers (presented in Javafest Bengaluru)
Functional Thinking for Java Developers (presented in Javafest Bengaluru)
 
Writing Apps the Google-y Way (Brisbane)
Writing Apps the Google-y Way (Brisbane)Writing Apps the Google-y Way (Brisbane)
Writing Apps the Google-y Way (Brisbane)
 
Are we ready to Go?
Are we ready to Go?Are we ready to Go?
Are we ready to Go?
 
Clojure for Java developers - Stockholm
Clojure for Java developers - StockholmClojure for Java developers - Stockholm
Clojure for Java developers - Stockholm
 
Python Basic
Python BasicPython Basic
Python Basic
 
Rust Mozlando Tutorial
Rust Mozlando TutorialRust Mozlando Tutorial
Rust Mozlando Tutorial
 
Productive Programming in Groovy
Productive Programming in GroovyProductive Programming in Groovy
Productive Programming in Groovy
 
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기
 
Scala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar ProkopecScala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar Prokopec
 
Kotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in KotlinKotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
 
My First Ruby
My First RubyMy First Ruby
My First Ruby
 
2007 09 10 Fzi Training Groovy Grails V Ws
2007 09 10 Fzi Training Groovy Grails V Ws2007 09 10 Fzi Training Groovy Grails V Ws
2007 09 10 Fzi Training Groovy Grails V Ws
 
Plugin jQuery, Design Patterns
Plugin jQuery, Design PatternsPlugin jQuery, Design Patterns
Plugin jQuery, Design Patterns
 
Writing Apps the Google-y Way
Writing Apps the Google-y WayWriting Apps the Google-y Way
Writing Apps the Google-y Way
 
Java 8 Lambda Expressions
Java 8 Lambda ExpressionsJava 8 Lambda Expressions
Java 8 Lambda Expressions
 

Mehr von Anton Arhipov

JavaZone 2022 - Building Kotlin DSL.pdf
JavaZone 2022 - Building Kotlin DSL.pdfJavaZone 2022 - Building Kotlin DSL.pdf
JavaZone 2022 - Building Kotlin DSL.pdfAnton Arhipov
 
TechTrain 2019 - (Не)адекватное техническое интервью
TechTrain 2019 - (Не)адекватное техническое интервьюTechTrain 2019 - (Не)адекватное техническое интервью
TechTrain 2019 - (Не)адекватное техническое интервьюAnton Arhipov
 
Build pipelines with TeamCity
Build pipelines with TeamCityBuild pipelines with TeamCity
Build pipelines with TeamCityAnton Arhipov
 
Build pipelines with TeamCity
Build pipelines with TeamCityBuild pipelines with TeamCity
Build pipelines with TeamCityAnton Arhipov
 
Devoxx Ukraine 2018 - Kotlin DSL in under an hour
Devoxx Ukraine 2018 - Kotlin DSL in under an hourDevoxx Ukraine 2018 - Kotlin DSL in under an hour
Devoxx Ukraine 2018 - Kotlin DSL in under an hourAnton Arhipov
 
GeeCON Prague 2018 - Kotlin DSL in under an hour
GeeCON Prague 2018 - Kotlin DSL in under an hourGeeCON Prague 2018 - Kotlin DSL in under an hour
GeeCON Prague 2018 - Kotlin DSL in under an hourAnton Arhipov
 
Build pipelines with TeamCity and Kotlin DSL
Build pipelines with TeamCity and Kotlin DSLBuild pipelines with TeamCity and Kotlin DSL
Build pipelines with TeamCity and Kotlin DSLAnton Arhipov
 
Build pipelines with TeamCity
Build pipelines with TeamCityBuild pipelines with TeamCity
Build pipelines with TeamCityAnton Arhipov
 
JavaDay Kiev 2017 - Integration testing with TestContainers
JavaDay Kiev 2017 - Integration testing with TestContainersJavaDay Kiev 2017 - Integration testing with TestContainers
JavaDay Kiev 2017 - Integration testing with TestContainersAnton Arhipov
 
GeeCON Prague 2017 - TestContainers
GeeCON Prague 2017 - TestContainersGeeCON Prague 2017 - TestContainers
GeeCON Prague 2017 - TestContainersAnton Arhipov
 
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloadingJavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloadingAnton Arhipov
 
JavaOne 2017 - TestContainers: integration testing without the hassle
JavaOne 2017 - TestContainers: integration testing without the hassleJavaOne 2017 - TestContainers: integration testing without the hassle
JavaOne 2017 - TestContainers: integration testing without the hassleAnton Arhipov
 
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloadingJavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloadingAnton Arhipov
 
JavaZone 2017 - The Hitchhiker’s guide to Java class reloading
JavaZone 2017 - The Hitchhiker’s guide to Java class reloadingJavaZone 2017 - The Hitchhiker’s guide to Java class reloading
JavaZone 2017 - The Hitchhiker’s guide to Java class reloadingAnton Arhipov
 
JUG.ua 20170225 - Java bytecode instrumentation
JUG.ua 20170225 - Java bytecode instrumentationJUG.ua 20170225 - Java bytecode instrumentation
JUG.ua 20170225 - Java bytecode instrumentationAnton Arhipov
 
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloadingRiga DevDays 2017 - The hitchhiker’s guide to Java class reloading
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloadingAnton Arhipov
 
GeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassleGeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassleAnton Arhipov
 
JEEConf 2017 - The hitchhiker’s guide to Java class reloading
JEEConf 2017 - The hitchhiker’s guide to Java class reloadingJEEConf 2017 - The hitchhiker’s guide to Java class reloading
JEEConf 2017 - The hitchhiker’s guide to Java class reloadingAnton Arhipov
 
JEEConf 2017 - Having fun with Javassist
JEEConf 2017 - Having fun with JavassistJEEConf 2017 - Having fun with Javassist
JEEConf 2017 - Having fun with JavassistAnton Arhipov
 

Mehr von Anton Arhipov (20)

JavaZone 2022 - Building Kotlin DSL.pdf
JavaZone 2022 - Building Kotlin DSL.pdfJavaZone 2022 - Building Kotlin DSL.pdf
JavaZone 2022 - Building Kotlin DSL.pdf
 
Idiomatic kotlin
Idiomatic kotlinIdiomatic kotlin
Idiomatic kotlin
 
TechTrain 2019 - (Не)адекватное техническое интервью
TechTrain 2019 - (Не)адекватное техническое интервьюTechTrain 2019 - (Не)адекватное техническое интервью
TechTrain 2019 - (Не)адекватное техническое интервью
 
Build pipelines with TeamCity
Build pipelines with TeamCityBuild pipelines with TeamCity
Build pipelines with TeamCity
 
Build pipelines with TeamCity
Build pipelines with TeamCityBuild pipelines with TeamCity
Build pipelines with TeamCity
 
Devoxx Ukraine 2018 - Kotlin DSL in under an hour
Devoxx Ukraine 2018 - Kotlin DSL in under an hourDevoxx Ukraine 2018 - Kotlin DSL in under an hour
Devoxx Ukraine 2018 - Kotlin DSL in under an hour
 
GeeCON Prague 2018 - Kotlin DSL in under an hour
GeeCON Prague 2018 - Kotlin DSL in under an hourGeeCON Prague 2018 - Kotlin DSL in under an hour
GeeCON Prague 2018 - Kotlin DSL in under an hour
 
Build pipelines with TeamCity and Kotlin DSL
Build pipelines with TeamCity and Kotlin DSLBuild pipelines with TeamCity and Kotlin DSL
Build pipelines with TeamCity and Kotlin DSL
 
Build pipelines with TeamCity
Build pipelines with TeamCityBuild pipelines with TeamCity
Build pipelines with TeamCity
 
JavaDay Kiev 2017 - Integration testing with TestContainers
JavaDay Kiev 2017 - Integration testing with TestContainersJavaDay Kiev 2017 - Integration testing with TestContainers
JavaDay Kiev 2017 - Integration testing with TestContainers
 
GeeCON Prague 2017 - TestContainers
GeeCON Prague 2017 - TestContainersGeeCON Prague 2017 - TestContainers
GeeCON Prague 2017 - TestContainers
 
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloadingJavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
 
JavaOne 2017 - TestContainers: integration testing without the hassle
JavaOne 2017 - TestContainers: integration testing without the hassleJavaOne 2017 - TestContainers: integration testing without the hassle
JavaOne 2017 - TestContainers: integration testing without the hassle
 
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloadingJavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
 
JavaZone 2017 - The Hitchhiker’s guide to Java class reloading
JavaZone 2017 - The Hitchhiker’s guide to Java class reloadingJavaZone 2017 - The Hitchhiker’s guide to Java class reloading
JavaZone 2017 - The Hitchhiker’s guide to Java class reloading
 
JUG.ua 20170225 - Java bytecode instrumentation
JUG.ua 20170225 - Java bytecode instrumentationJUG.ua 20170225 - Java bytecode instrumentation
JUG.ua 20170225 - Java bytecode instrumentation
 
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloadingRiga DevDays 2017 - The hitchhiker’s guide to Java class reloading
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
 
GeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassleGeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassle
 
JEEConf 2017 - The hitchhiker’s guide to Java class reloading
JEEConf 2017 - The hitchhiker’s guide to Java class reloadingJEEConf 2017 - The hitchhiker’s guide to Java class reloading
JEEConf 2017 - The hitchhiker’s guide to Java class reloading
 
JEEConf 2017 - Having fun with Javassist
JEEConf 2017 - Having fun with JavassistJEEConf 2017 - Having fun with Javassist
JEEConf 2017 - Having fun with Javassist
 

Kürzlich hochgeladen

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Kürzlich hochgeladen (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Introduction to Groovy

  • 2. Привет!   @antonarhipov   @jrebel   Java,  Groovy  
  • 3. Немного  истории   Rhino   1995   1997   2001   2003   2011   BeanShell
  • 4. James  Strachan   29  Aug  2003  Groovy  –  the  birth  of     new  dynamic  language  for  Java   PlaOorm   h0p://radio-­‐weblogs.com/0112098/2003/08/29.html     July  2009  “I  can  honestly  say  if  someone  had     shown  me  the  Programming  in  Scala  book  back     in  2003  I’d  probably  never  created  Groovy”  
  • 5. Плюшки   •  Скрипты!   •  Коллекции   •  GPath   •  “Строители”   •  Метапрограммирование   •  Экосистема  
  • 7. System.out.println(“Hello, World!”);! println ‘Hello, World!’! Необязательны:  “;”,   System.out,  (),     метод  main(),     определение  класса  
  • 8. System.out.println(“Hello, World!”);! println ‘Hello, World!’! def name = ‘Anton’! println “Hello, $name!”! Динамическая   типизация,   GString  
  • 9. System.out.println(“Hello, World!”);! println ‘Hello, World!’! def name = ‘Anton’! println “Hello, $name!”! String longer = “””Hello, $name, ! Groovy is really cool!”””! Статическая   типизация,   «многострочность»  
  • 10. System.out.println(“Hello, World!”);! println ‘Hello, World!’! def name = ‘Anton’! println “Hello, $name!”! String longer = “””Hello, $name, ! Groovy is really cool!”””! assert 1.5 == 3/2! BigDecimal   equals()  
  • 11. System.out.println(“Hello, World!”);! println ‘Hello, World!’! «утиная»   def name = ‘Anton’! println “Hello, $name!”! String longer = типизация   “””Hello, $name,! Groovy is really cool!”””! assert 1.5 == 1/2! def printSize(obj){! print obj?.size()! безопасное   }! разыменование   ссылок  
  • 12. System.out.println(“Hello, World!”);! println ‘Hello, World!’! def name = ‘Anton’! Специальный   println “Hello, $name!”! String longerля   “””Hello, $name, ! синтаксис  д = Groovy is really cool!”””! коллекций   assert 1.5 == 1/2! def printSize(obj){! print obj?.size()! }! def pets = [‘dog’,’cat’]! замыкания  и   pets.each {pet ->! перегрузка   assert pet < ‘dog’! операторов   }!
  • 13. System.out.println(“Hello, World!”);! println ‘Hello, World!’! def name = ‘Anton’! println “Hello, $name!”! String longer = “””Hello, $name, ! Groovy is really cool!”””! assert 1.5 == 1/2! def printSize(obj){! print obj?.size()! }! def pets = [‘dog’,’cat’]! pets.each {pet ->! assert pet < ‘dog’! }!
  • 14. import java.util.List;! import java.util.ArrayList;! class Erase {! private List removeLongerThan(List strings, int length) {! List result = new ArrayList();! Java  ==  Groovy   for (String s: strings) {! if (s.length() <= length) {! result.add(s);! }! }! return result;! }! ! public static void main(String[] args) {! List names = new ArrayList();! names.add("Вася"); names.add("Коля");! names.add("Петя"); names.add("Фёдор");! System.out.println(names);! Erase e = new Erase();! List shortNames = e.removeLongerThan(names, 4);! System.out.println(shortNames.size());! for (String s: shortNames) {! System.out.println(s);! }! }! }!
  • 15. import java.util.List;! import java.util.ArrayList;! class Erase {! private List removeLongerThan(List strings, int length) {! List result = new ArrayList();! for (String s: strings) {! if (s.length() <= length) {! result.add(s);! }! }! Импорты  по-­‐умолчанию   return result;! }! ;  необязателен   ! public static void main(String[] args) {! List names = new ArrayList();! names.add("Вася"); names.add("Коля");! names.add("Петя"); names.add("Фёдор"); ! System.out.println(names);! Erase e = new Erase();! List shortNames = e.removeLongerThan(names, 4); ! System.out.println(shortNames.size());! for (String s: shortNames) {! System.out.println(s);! }! }! }!
  • 16. class Erase {! private List removeLongerThan(List strings, int length) {! List result = new ArrayList()! for (String s: strings) {! if (s.length() <= length) {! result.add(s)! }! }! return result! }! ! public static void main(String[] args) {! List names = new ArrayList()! names.add("Вася") names.add("Коля") ! names.add("Петя") names.add("Фёдор") ! System.out.println(names)! Erase e = new Erase()! List shortNames = e.removeLongerThan(names, 4) ! System.out.println(shortNames.size())! for (String s: shortNames) {! System.out.println(s)! }! }! }!
  • 17. class Erase {! private List removeLongerThan(List strings, int length) {! List result = new ArrayList()! for (String s: strings) {! if (s.length() <= length) {! result.add(s)! }! Динамическая  типизация   }! return result! Не  надо  определять  класс  и  main()   ! }! length  и  size   public static void main(String[] args) {! List names = new ArrayList()! names.add("Вася") names.add("Коля") ! names.add("Петя") names.add("Фёдор") ! System.out.println(names)! Erase e = new Erase()! List shortNames = e.removeLongerThan(names, 4)! System.out.println(shortNames.size())! for (String s: shortNames) {! System.out.println(s)! }! }! }!
  • 18. def removeLongerThan(strings, length) {! def result = new ArrayList()! for (s in strings) {! if (s.size() <= length) {! result.add(s)! }! }! return result! }! ! names = new ArrayList()! names.add("Вася") ! names.add("Коля") ! names.add("Петя") ! names.add("Фёдор") ! System.out.println(names)! shortNames = e.removeLongerThan(names, 4)! System.out.println(shortNames.size())! for (s: shortNames) {! System.out.println(s)! }!
  • 19. def removeLongerThan(strings, length) {! def result = new ArrayList()! for (s in strings) {! if (s.size() <= length) {! result.add(s)! }! }! Нотация  для  списков   return result! }! Упрощённая  работа  со  списками   ! names = new ArrayList()! return  необязателен   names.add("Вася") ! names.add("Коля") ! names.add("Петя")! names.add("Фёдор")! System.out.println(names)! shortNames = e.removeLongerThan(names, 4)! System.out.println(shortNames.size())! for (s: shortNames) {! System.out.println(s)! }!
  • 20. def removeLongerThan(strings, length) {! strings.findAll { it.size() <= length }! }! ! names = ["Вася", "Коля", "Петя", "Фёдор"]! System.out.println(names)! shortNames = e.removeLongerThan(names, 4)! System.out.println(shortNames.size())! shortNames.each { System.out.println(s) }!
  • 21. def removeLongerThan(strings, length) {! strings.findAll { it.size() <= length }! }! ! names = ["Вася", "Коля", "Петя", "Фёдор"]! System.out.println(names)! shortNames = e.removeLongerThan(names, 4)! System.out.println(shortNames.size())! shortNames.each { System.out.println(s) }! Ненужный  метод!   Убрать  ненавистный  System.out  !   Скобки  в  сад!  
  • 22. names = ["Вася", "Коля", "Петя", "Фёдор"]! println names! shortNames = names.findAll { it.size() <= 4 }! println shortNames.size()! shortNames.each { println it }! [Вася,  Коля,  Петя,  Федя]   3   Вася   Коля   Петя  
  • 24. def list = [1, 2, 3, 4, 5, 5]! assert list.get(2) == 3! assert list[2] == 3! assert list instanceOf java.util.List!
  • 25. def list = [1, 2, 3, 4, 5, 5]! assert list.get(2) == 3! assert list[2] == 3! assert list instanceOf java.util.List! def list = [1, 2, 3, 4, 5, 5] as Set! assert list.size() == 5! assert list instanceOf java.util.Set! !
  • 26. def range = 5..8! assert range.size() == 4! assert range[2] == 7! assert range.contains(5)! ! ! !
  • 27. def range = 5..8! assert range.size() == 4! assert range[2] == 7! assert range.contains(5)! ! def range = 5..<8! assert range.size() == 3! assert ! range.contains(8)! ! ! !
  • 28. def range = 5..8! assert range.size() == 4! assert range[2] == 7! assert range.contains(5)! ! def range = 5..<8! assert range.size() == 3! assert ! range.contains(8)! ! assert range.from == 5! assert range.to == 7! ! !
  • 29. def range = ‘a’..’d’! assert range.size() == 4! assert range[2] == ‘c’! assert range.contains(‘a’)! assert ! range.contains(‘e’)! ! !
  • 30. for(i in 1..10) { ! println “${i}” ! }! ! (1..10).each { ! println “$it” ! }! ! switch(years){! case 1..10: rate = 1.015; break; ! case 11..25: rate = 0.905; break;! default: rate = 0.755; ! }!
  • 31. def map = [name:’Anton’, age:28, id:2]! assert map[’name’] == 'Anton’! assert map.id == 2! assert map instanceOf java.util.Map! ! ! !
  • 32. def map = [name:’Anton’, age:28, id:2]! assert map[’name’] == 'Anton’! assert map.id == 2! assert map instanceOf java.util.Map! ! def empty = [:]! empty.foo = 25! assert empty.foo == 25! ! !
  • 34. [1,2,3,4,5]*.plus(1)! [2,  3,  4,  5,  6]   [1,2,3,4,5].findAll {it > 3}! [4,  5,  6]  
  • 36. [5,2,1,3,4].sort()! [1,  2,  3,  4,  5]   [‘ccc’,‘a’,‘bb’].sort {it.size()}! [‘a’,  ‘bb’,  ‘ccc’]  
  • 37. ['test', 12, 20, true].grep(Boolean)! ! ['test', 'Groovy', 'Java'].grep(~/^G.*/)! ! ['a', 'b', 'c', 'd'].grep(['b', 'c'])! ! [1, 15, 16, 30, 12].grep(12..18)! ! [12.300, 109.20, 42.031].grep(42.031)! ! [10, 20, 30, 50, 100].grep({ it > 50 })!
  • 38. def  text  ="""          <cars>              <car  name='HSV  Maloo'  year='2006'>                  <country>Australia</country>              </car>              <car  name='P50'  year='1962'>                  <country>Isle  of  Man</country>              </car>              <car  name='Royale'  year='1931'>                  <country>France</country>              </car>          </cars>   [‘HSV  Maloo’,  ‘P50’]   """   def  records  =  new  XmlParser().parseText(text)     cars  =  records.car.grep  {  it.@year  >  '1960'  }   names  =  cars.collect  {it.@name}  
  • 39. import groovy.xml.MarkupBuilder! ! def builder = new MarkupBuilder()! ! builder.html {! head {! title ”Page Title”! }! <html>   body {!    <head>   p ”My text" !        <•tle>Page  Title</•tle>   }!    </head>   }!    <body>          <p>My  text</p>      </body>   </html>    
  • 40. import groovy.json.JsonBuilder! ! def builder = new JsonBuilder()! def root = builder.me {! name ”Anton”! lastName ”Arhipov”! age 13! }! println builder! {"me":{"name":"Anton","lastName":"Arhipov","age":13}}   println root! [me:[name:Anton,  lastName:Arhipov,  age:13]]  
  • 41. import groovy.util.AntBuilder! def ant = new AntBuilder()! ant.sequential {! echo("inside sequential")! myDir = "target/AntTest/"! mkdir(dir:myDir)! copy(todir:myDir) {! fileset(dir:"src/test") {! include(name:"**/*.groovy")! }! }! echo("done")! }!
  • 42. html {! head {! title "Hello"! }! body {! p "Hello"! }! }!
  • 43. html({! head({! title("Hello")! }),! body({! p("Hello")! })! })!
  • 45. Название  метода   html { }! Параметр   instanceof  Closure  
  • 47. html { title {} }!
  • 48. html { title { итд } }!
  • 49. invokeMethod! ! methodMissing!
  • 50. class Foo {! ! }! ! foo = new Foo()! ! foo.hello()! groovy.lang.MissingMethodExcep^on:  No  signature  of  method:   Foo.hello()  is  applicable  for  argument  types:  ()  values:  []   Possible  solu•ons:  sleep(long),  sleep(long,  groovy.lang.Closure),   each(groovy.lang.Closure),  split(groovy.lang.Closure),   getAt(java.lang.String),  wait()  
  • 51. class Foo {! def methodMissing(String name, args) {…}! }! ! foo = new Foo()! ! foo.hello()!
  • 52. def invokeMethod(String name, args){! def call = args[0]! println "<$name>"! if(call instanceof Closure){! call.delegate = this! call.call()! } else {! println call.toString()! }! println "</$name>" ! }!
  • 53. Integer.metaClass {! getEur = { -> delegate + "EUR" }! }! ! 10.eur! price:  10EUR