Várjuk 2025-ben is tanfolyamainkon és vizsgáinkon!

Groovy and Grails Training

GaG-HV
8 nap
737 590 Ft + ÁFA
tanfolyamkezdési időpontok:
Jelentkezem!
oktatók:

A tanfolyamról

Grails is an extremely productive, open-source web application framework, based on the Groovy programming language. A dynamic language, Groovy offers attributes similar to programming languages like Ruby, Python, Perl, and Smalltalk. It is based on the OOPs (Object Oriented Programming) concept and is perfect for developing web applications that run consistently on the Java Virtual Machine (JVM). Groovy and Grails is one of the most widely accepted web frameworks as it allows you to write codes easily and combine new Java modules to the existing ones.

This course will take you from the basics of Groovy installation, features and functions and object oriented programming, to more advanced topics like metaprogramming and using builders to build custom languages. You will learn about Grails right from the basics of setting up the environment to building innovative, enterprise-ready web, software, and mobile applications application solutions using Groovy and Grails.

What You Will Learn

  • Installation and introduction
    Install Groovy using sdkman. Learn about the tools that come with the Groovy installation.
  • Variables & Operators
    Define Groovy variables.Understand dynamic/static typing support for variables, play with operators.
  • Functions
    Learn how to define functions in the Groovy way! Implicit/explicit returns, closures and much more
  • Branching & Looping
    Learn to make branches in the code using selection statements. Also learn to write loops in Groovy.
  • Object oriented programming
    Learn object oriented constructs & how Groovy achieves pure object orientation in language design.
  • Composition and inheritance
    Understand the use of other object oriented concepts like composition, inheritance.
  • Collections
    Learn to use groovy collection data types like lists and maps.
  • Exception handling
    Learn the use of exceptions to alter the flow of a Groovy program, build your own custom exceptions
  • Metaprogramming
    Learn Groovy goodness like meta object protocol, meta class; that add dynamacity to Groovy
  • Builders
    Build custom domain specific languages using builders available in the Groovy programming language
  • Introduction and installation
    Learn to set up the Grails environment along with a high level tour of the technology
  • Model layer
    Learn the Grails solution to object relational mapping (GORM), model relationships, querying etc
  • Controllers
    Learn this Grails component that orchestrates the entire request-response flow.
  • Common web concerns
    Learn common web concerns like redirect, chaining, data binding; that the controller has to offer
  • View layer
    Learn the all powerful groovy server pages (GSP) templating language, and understand JSON views
  • Service layer
    Learn to write complex business logic in this Grails component.
  • Profiles
    Why have profiles in your Grails project. Practically use REST profile for making rest web services.
  • Other common web concerns
    Learn to upload files in grails, cookies, session management, server side validation and much more.
  • Testing
    Write unit, integration and functional tests for the various components in a grails application

Who should attend

  • Candidates who want to automate day to day programming using the Groovy language
  • Java developers looking out for a JVM language that expresses more with less code
  • Those looking to use Groovy to build dynamic database driven web apps & api backends

Using groovy as the programming language for day to day software tasks, use grails to build dynamic database driven web applications

We provide the course in English.

Tematika

Curriculum

1 Installation and introduction to groovy

  • Installing sdkman
  • Installing groovy development kit using sdkman
  • Understanding the various tools like groovyc, groovy shell and groovy console
  • Writing very basic commands on the groovy shell
  • How groovy compares to other JVM languages like Java

2 Variables & Operators

  • Defining variables using the ‘def’ keyword
  • Dynamic typing
  • Explicitly defining data types for a variable
  • Arithmetic, relational, logical operators
  • Elvis and spaceship operators in groovy

3 Functions

  • Defining functions in groovy
  • Function with implicit and explicit returns
  • Default arguments in functions
  • Closures
  • Functional programming in groovy
  • Functions that take groovy map as argument

4 Branching & Looping

  • ‘if’ , ‘if-else if-else’ selection statements for branching
  • The groovy ‘switch’ statement to achieve branching
  • Looping using ‘while’ and ‘for’
  • ‘break’ and ‘continue’ statements

5 Object oriented programming

  • Classes and objects
  • Difference between instance variables and static variables.
  • Instance and static functions
  • Constructors
  • Groovy bean class
  • On demand encapsulation of object attributes in groovy
  • Operator overloading in groovy classes
  • Composition
  • Inheritance
  • Abstract classes
  • Interfaces
  • Traits
  • Organizing groovy code in packages
  • Default packages imported in groovy code

6 Collections

  • Using the List data type of groovy
  • Functional programming on list data structure using groovy closures
  • Meta programming on list data structure
  • Map data structure in groovy and various operations on a map

7 Exception handling

  • Flow of a program in the event of an exception thrown in the program
  • Exception handling using try-catch
  • Defining custom exceptions and throwing them
  • The finally block
  • How groovy exception handling is different from java exception handling

8 Metaprogramming

  • Meta Object protocol (MOP)
  • MetaClass
  • Adding dynamic methods to build in groovy classes at run time
  • Adding dynamic methods in custom groovy classes at run time

9 Builders

  • Introduction to the builder pattern
  • Designing domain specific language (DSL) to initialize objects in groovy
  • JSON builder
  • Object graph builder
  • Other builders available in the groovy programming language

10 Introduction and installation of grails

  • Install grails 3.x latest version using sdkman
  • Create your first grails project and open it in an IDE of your choice that has grails support
  • Understanding the dependency management and build system
  • Tour of the grails documentation

11 Model layer

  • Introduction to ORM
  • Grails ORM models and how to define them
  • Connecting grails project to a MYSQL database
  • ‘constraints’ closure
  • ‘mapping’ closure
  • GORM model relationships - one to one, one to many, many to many
  • GORM saving, updating, deleting entities
  • Querying for GORM entities using dynamic finders, createCriteria and detached where
  • Handling model schema changes using database migration plugin

12 Controllers

  • Defining a grails controller
  • Defining actions in a controller
  • Mapping of urls to controllers and actions in the controller
  • Sending model from action to views
  • Redirecting to views
  • Storing flash messages
  • Implicit request object
  • Data binding of incoming request data - To parameters in the action function, command objects
  • Handling file uploads

13 View layer

  • Introduction to groovy server pages (GSP)
  • GSP ‘if’, ‘else’, ‘elseif’ branching tags
  • GSP looping using the ‘each’ tag
  • Layouting gsp pages
  • GSP form tags
  • Static resource management tags
  • Link tags
  • GSP tags for displaying the model errors
  • Using GSP tags as method calls
  • Internationalization support

14 Service layer

  • Writing business logic in service component of grails
  • Introduction to the Dependency injection (DI)
  • Injecting service components in other service components and controller components
  • Transaction support in grails services

15 Profiles

  • Purpose behind profiles
  • Introduction to web services and REST
  • REST profile in grails
  • Introducing other built in profiles in grails

16 Other common web concerns

  • Declaring constraints in model classes
  • Validation on the constraints
  • Sharing constraints between multiple classes
  • Cookies
  • Http Sessions
  • Creating interceptors
  • Building CRUD interfaces using scaffolding in grails

17 Testing

  • Introduction to the testing framework and test support in grails
  • Writing unit tests for grails services
  • Writing integration tests for complex business scenarios
  • Introduction to functional testing

Kinek ajánljuk

Előfeltételek

Prerequisites

  • Exposure to any other programming language preferably Java, would be an added advantage.
  • A little knowledge about databases and SQL would help.

Kapcsolódó tanfolyamok



Ajánlja másoknak is!