Curso Groovy Foundation

  • Development

Curso Groovy Foundation

32 horas
Visão Geral

Curso Groovy Foundation: Groovy é uma linguagem orientada a objetos baseada na plataforma Java. Groovy 1.0 foi lançado em 2 de janeiro de 2007 com Groovy 2.4 como a versão principal atual. Groovy é distribuído por meio da Licença Apache v 2.0. Neste curso, explicaríamos todos os fundamentos do Groovy e como colocá-lo na prática. Você pode usar o Groovy em dois "modos" diferentes: Você pode compilar o Groovy para o Bytecode JVM como o Java. Isso significa que você só precisa empacotá-lo com a biblioteca groovy e ele pode funcionar na JVM como o Java pode. Você pode usar seu sistema de compilação. Além de usá-lo de forma compilada, você pode aplicá-lo como uma linguagem de script. Basta escrever seu código Groovy em um arquivo e executar esse arquivo chamando (assim que o Groovy estiver instalado).

Objetivo

Após realiar este Curso Groovy Foundation você será capaz de:

  • Entenda como as linguagens dinâmicas diferem de linguagens como Java ou C #
  • Estudo com fechamentos Groovy
  • Use estruturas de controle Groovy
  • Construir programas orientados a objetos no Groovy
  • Use construtores Groovy para reduzir a complexidade
  • Acesse bancos de dados usando Groovy
  • Processar arquivos XML em Groovy
  • Escreva testes de unidade em Groovy
  • Acesse classes Java do Groovy e vice-versa
  • Estabeleça um aplicativo de rede simples usando Grails.
Publico Alvo

todos os profissionais de software que desejam descobrir os fundamentos da programação Groovy.

Pre-Requisitos
Você deve receber alguma experiência prática em Java ou qualquer outra terminologia de programação orientada a objetos.
Nenhuma experiência Groovy é assumida.
Materiais
Inglês | Português
Conteúdo Programatico

Groovy Getting Started

  1. Download Groovy
  2. Setting up Groovy
  3. Installing Groovy
  4. groovyc — the Groovy compiler
  5. groovysh — the Groovy command -like shell
  6. groovyConsole — the Groovy Swing console
  7. IDE integration

Groovy Big Picture

  1. What is Groovy
  2. Groovy vs Java Features
  3. Why Groovy?
  4. Groovy language fundamentals
  5. Variables and Types
  6. Static and dynamic typing
  7. HelloWorld Groovy Program
  8. Compiling using groovy compiler
  9. Running Groovy Program

Groovy Language Spec

Syntax

  1. Comments
  2. Single line comment
  3. Multiline comment
  4. GroovyDoc comment
  5. Shebang line

Keywords

Identifiers

  1. Normal identifiers
  2. Quoted identifiers

Strings

  1. Single quoted string
  2. String concatenation

Triple single quoted string

  1. Escaping special characters
  2. Unicode escape sequence

Double quoted string

  1. String interpolation
  2. Special case of interpolating closure expressions
  3. Interoperability with Java
  4. GString and String hashCodes
  5. Triple double quoted string
  6. Slashy string
  7. Dollar slashy string
  8. String summary table
  9. Characters

Numbers

  1. o Integral literals
  2. Alternative non-base 10 representations
  3. Binary literal
  4. Octal literal
  5. Hexadecimal literal
  6. Decimal literals
  7. Underscore in literals
  8. Number type suffixes
  9. Math operations
  10. The case of the division operator
  11. The case of the power operator
  12. Booleans
  13. Lists
  14. Arrays
  15. Maps

Operators

  1. Arithmetic operators
  2. Normal arithmetic operators
  3. Unary operators
  4. Assignment arithmetic operators
  5. Relational operators
  6. Logical operators
  7. Precedence
  8. Short-circuiting
  9. Bitwise operators
  10. Conditional operators
  11. Not operator
  12. Ternary operator
  13. Elvis operator
  14. Object operators
  15. Safe navigation operator
  16. Direct field access operator
  17. Method pointer operator
  18. Regular expression operators
  19. Pattern operator
  20. Find operator
  21. Match operator
  22. Other operators
  23. Spread operator
  24. Spreading method arguments
  25. Spread list elements
  26. Spread map elements
  27. Range operator
  28. Spaceship operator
  29. Subscript operator
  30. Membership operator
  31. Identity operator
  32. Coercion operator
  33. Diamond operator
  34. Call operator
  35. Operator precedence
  36. Operator overloading

Program Structure

  1. Package names
  2. Imports
  3. Default imports
  4. Simple import
  5. Star import
  6. Static import
  7. Static import aliasing
  8. Static star import
  9. Import aliasing
  10. Scripts versus classes
  11. public static void main vs script
  12. Script class
  13. Methods
  14. Variables

Object Orient nation and Implementation in Groovy

  1. Types
  2. Primitive types
  3. Class
  4. Normal class
  5. Inner class

Anonymous inner class

  1. Abstract class
  2. Interface
  3. Constructors
  4. Positional argument constructor
  5. Named argument constructor

Methods

  1. Method definition
  2. Named arguments
  3. Default arguments
  4. Varargs
  5. Method selection algorithm
  6. Exception declaration

Fields and properties

  1. Fields
  2. Properties

Annotation

  1. Annotation definition
  2. Annotation placement
  3. Annotation member values
  4. Retention policy
  5. Closure annotation parameters
  6. Meta-annotations
  7. Declaring meta-annotations
  8. Behavior of meta-annotations
  9. Meta-annotation parameters
  10. Custom annotation processors
  11. Inheritance
  12. Generics

Traits

  1. Methods
  2. Public methods
  3. Abstract methods
  4. Private methods
  5. The meaning of this
  6. Interfaces
  7. Properties
  8. Fields
  9. Private fields
  10. Public fields
  11. Composition of behaviors
  12. Overriding default methods
  13. Extending traits
  14. Simple inheritance
  15. Multiple inheritance
  16. Duck typing and traits
  17. Dynamic code
  18. Dynamic methods in a trait
  19. Multiple inheritance conflicts
  20. Default conflict resolution
  21. User conflict resolution
  22. Runtime implementation of traits
  23. Implementing a trait at runtime
  24. Implementing multiple traits at once
  25. Chaining behavior
  26. Semantics of super inside a trait
  27. Advanced features
  28. SAM type coercion
  29. Differences with Java 8 default methods
  30. Differences with mixins
  31. Static methods, properties and fields
  32. Inheritance of state gotchas
  33. Self types
  34. Type constraints on traits
  35. The @SelfType annotation
  36. Limitations
  37. Compatibility with AST transformations
  38. Prefix and postfix operations

Closures

Syntax

  1. Defining a closure
  2. Closures as an object
  3. Calling a closure

Parameters

  1. Normal parameters
  2. Implicit parameter
  3. Varargs

Delegation strategy

  1. Groovy closures vs lambda expressions
  2. Owner, delegate and this
  3. The meaning of this
  4. Owner of a closure
  5. Delegate of a closure
  6. Delegation strategy
  7. Closures in GStrings
  8. Closure coercion
  9. Functional programming
  10. Currying
  11. Left currying
  12. Right currying
  13. Index based currying
  14. Memoization
  15. Composition
  16. Trampoline
  17. Method pointers

Semantics

  1. Statements
  2. Variable definition
  3. Variable assignment
  4. Multiple assignment
  5. Overflow and Underflow
  6. Object destructuring with multiple assignment
  7. Control structures
  8. Conditional structures
  9. if / else
  10. switch / case
  11. Exception handling
  12. try / catch / finally
  13. Multi-catch
  14. Power assertion
  15. Labeled statements

Expressions

  1. GPath expressions
  2. Object navigation
  3. Expression Deconstruction
  4. GPath for XML navigation

Promotion and coercion

  1. Number promotion
  2. Closure to type coercion
  3. Assigning a closure to a SAM type
  4. Calling a method accepting a SAM type with a closure
  5. Closure to arbitrary type coercion
  6. Map to type coercion
  7. String to enum coercion
  8. Custom type coercion
  9. Class literals vs variables and the as operator

Optionality

  1. Optional parentheses
  2. Optional semicolons
  3. Optional return keyword
  4. Optional public keyword

The Groovy Truth

  1. Boolean expressions
  2. Collections and Arrays
  3. Matchers
  4. Iterators and Enumerations
  5. Maps
  6. Strings
  7. Numbers
  8. Object References
  9. Customizing the truth with asBoolean() methods

Typing

  1. Optional typing
  2. Static type checking
  3. The @TypeChecked annotation

Activating type checking at compile time

  1. Skipping sections
  2. Type checking assignments
  3. List and map constructors
  4. Method resolution
  5. Type inference

Principles

  1. Variables vs fields in type inference
  2. Collection literal type inference
  3. Least upper bound
  4. instanceof inference
  5. Flow typing
  6. Advanced type inference
  7. Closures and type inference
  8. Return type inference
  9. Parameter type inference
  10. Explicit closure parameters
  11. Parameters inferred from single-abstract method types
  12. The @ClosureParams annotation
  13. @DelegatesTo
  14. Static compilation
  15. Dynamic vs static
  16. The @CompileStatic annotation
  17. Key benefits

Type checking extensions

  1. Writing a type checking extension
  2. Towards a smarter type checker
  3. The extensions attribute
  4. A DSL for type checking
  5. Type checking extensions API
  6. AST
  7. Events
  8. Working with extensions
  9. Support classes
  10. Class nodes
  11. Helping the type checker
  12. Throwing an error
  13. isXXXExpression
  14. Virtual methods
  15. Scoping
  16. Other useful methods
  17. Advanced type checking extensions
  18. Precompiled type checking extensions
  19. Using @Grab in a type checking extension
  20. Sharing or packaging type checking extensions
  21. Global type checking extensions
  22. Type checking extensions and @CompileStatic
  23. Mixed mode compilation
  24. Transforming the AST in an extension

Runtime and compile-time metaprogramming

  1. Runtime metaprogramming
  2. Compile-time metaprogramming
  3. The Grape dependency manager
  4. Unit Testing in Groovy

DSL-Domain Specific languages

  1. Command Chains
  2. Operator Overloading
  3. Script base classes
  4. Adding Properties to Numbers
  5. @DelegatesTo
  6. Compilation customizers
  7. Custom type checking extensions
  8. Builders

Exception handling try / catch / finally

  1. Multi-catch
  2. Power assertion
  3. Labeled statements
  4. Expressions
  5. GPath expressions
  6. Object navigation
  7. Expression Deconstruction
  8. GPath for XML navigation
  9. Promotion and coercion
  10. Number promotion
  11. Closure to type coercion
  12. Assigning a closure to a SAM type
  13. Calling a method accepting a SAM type with a closure
TENHO INTERESSE

Cursos Relacionados

Curso Python Programação Advanced

32 horas

Curso SAP ABAP S4hana Developer Foundation

32 horas

Curso Full Stack and React Essentials

32 Horas

Curso Node.js for JavaScript Developers

24 horas

Curso Elasticsearch for Developers

16H

Curso Elastic Stack Foundation

24 horas

Curso Apache Spark™ Foundation

8 Horas