SlideShare a Scribd company logo
1 of 16
Grails
Get Familiar with it
Index
1. Introduction and Advantage
2. Features
3. Installation
4. Convention over Configuration
5. Running Application
6. Testing and Application
7. Deploying an Application
8. Generating an Application
9. Configuration
Introduction and Advantage
Grails is a full stack framework.
● An easy to use ORM layer built on Hibernate
● An expressive view technology called Groovy Server Page
● A controller layer built on Spring MVC
● An embedded tomcat container which is configured for on the fly
reloading
● Dependency Injection with the inbuilt Spring Container
● Support internationalization
● A transactional service layer built on Spring’s transaction abstraction.
Features
1. Easy to set-up and get started
2. DRY (Don’t repeat yourself)
3. Convention and Configuration
4. No painful XML
5. Scaffolding
6. Built-in REST api
7. Tag lib
8. Plugin based development
9. Tons of available plugins
10.Minimal server restart required while development
Installation
Before installing grails, make sure that Java SDK 1.4 or higher is installed on your machine.
Set JAVA_HOME environmental variable to point to the path where you have installed Java
1. Download the grails latest version from http://www.grails.org/Download
2. Extract it on the appropriate location…say C:grails
3. Create an environmental variable GRAILS_HOME which points to the path of installation of grails…i.e C:grails
4. In the PATH environment variable.. point it to the /bin directory of grails i.e %GRAILS_HOME%bin
In a nutshell, the environmental variables should be like..
JAVA_HOME = C:Program FilesJavajdk-1.5
GRAILS_HOME = C:grails
PATH = %GRAILS_HOME%bin;%JAVA_HOME%bin;
Check version of grails via grails --version
Convention over Configuration
Grails uses “convention over configuration” to configure itself.
This typically means that the name and location of files is used instead of
explicit configuration.
1. Conf :- Configuration Sources
2. Controllers :- Web Controllers
3. Domain :- Application Model
4. Views :- Server Pages
5. Taglib :- Tag Libraries
6. Src :- Supporting Sources
7. Test :- Unit and Integration Testing
● Creating an Application
○ grails create-app [app_name]
● Running an Application
○ grails run-app
○ grails -Dserver.port=8090 run-app
○ grails r-a
● Testing an Application
○ grails test-app
● Deploying an Application
○ grails war
● Generating an Application
○ grails generate-all [domain]
Configuration
Basic Configuration
Environments
DataSource
Externalized Configuration
Versioning
Dependency Resolution
Basic Configuration
For general configuration Grails provides two files:-
● grails-app/conf/BuildConfig.groovy
● grails-app/conf/Config.groovy
Both of them use Groovy’s ConfigSlurper syntax.
BuildConfig :- for settings that are used when running Grails command, such
as compile, run-app etc.
Config :- for settings that are used when your application is running.
Note:- Config.groovy is packaged with your application, but
BuildConfig.groovy is not.
foo.bar.hello=”hello”
Note:- the value is a Groovy string literal. The property value can valid Groovy
type, such as strings, integers
foo.bar.hello=’world’
foo.bar.good=”bye”
Both of using same base, the above syntax works but it’s quite verbose and
repetitive.
foo{
bar{
hello=’world’
good=”bye”
}
}
Implicit Variable for BuildConfig and Config
Variable Description
userHome Location of Home directory
grailsHome Location of directory where grails is installed.
appName Application Name as it appears in application.properties
appVersion Application Version as it appears in application.properties
Implicit Variable for BuildConfig only
Variable Description
grailsVersion The version of Grails used to build the project
grailsSettings An object containing various build related settings, such as baseDir
Implicit Variable for Config
Variable Description
grailsApplication The GrailsApplication class instance
Environments
1. Grails support the concepts of per environment configuration.
2. The Config, DataSource and BootStrap.groovy files in the grails-app/conf
directory can use per environment configuration.
3. They uses ConfigSlurper
4. Packaging and Running for Different Environments
a. grails [environment] [command_name]
i. grails test war
ii. grails -Dgrails.env=UAT run-app
5. We can detect the environment using the Environment class

More Related Content

What's hot

Howto Create & Run zf2skeleton Apps with PHP's Built-in Webserver
Howto Create & Run zf2skeleton Apps with PHP's Built-in WebserverHowto Create & Run zf2skeleton Apps with PHP's Built-in Webserver
Howto Create & Run zf2skeleton Apps with PHP's Built-in WebserverMaster Zend Framework
 
Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016Alvaro Sanchez-Mariscal
 
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With ContainersHanoi MagentoMeetup
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Fwdays
 
Why you can't ignore GitLab
Why you can't ignore GitLabWhy you can't ignore GitLab
Why you can't ignore GitLabPivorak MeetUp
 
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Lightning branches at RedMart (Js conf Asia 2014  Talk)Lightning branches at RedMart (Js conf Asia 2014  Talk)
Lightning branches at RedMart (Js conf Asia 2014 Talk)Ritesh Angural
 
RedMart Migrating from EC2 to VPC with Chef
RedMart Migrating from EC2 to VPC with ChefRedMart Migrating from EC2 to VPC with Chef
RedMart Migrating from EC2 to VPC with ChefRitesh Angural
 
Its easy! contributing to open source - Devnexus 2020
Its easy! contributing to open source - Devnexus 2020Its easy! contributing to open source - Devnexus 2020
Its easy! contributing to open source - Devnexus 2020César Hernández
 
Grails Internals Ggug Dec 2009
Grails Internals Ggug Dec 2009Grails Internals Ggug Dec 2009
Grails Internals Ggug Dec 2009Skills Matter
 
markedj: The best of markdown processor on JVM
markedj: The best of markdown processor on JVMmarkedj: The best of markdown processor on JVM
markedj: The best of markdown processor on JVMtakezoe
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requestsBartosz Kosarzycki
 
Introduction to .NET Core
Introduction to .NET CoreIntroduction to .NET Core
Introduction to .NET CoreMarco Parenzan
 
From Spring Framework 5.3 to 6.0
From Spring Framework 5.3 to 6.0From Spring Framework 5.3 to 6.0
From Spring Framework 5.3 to 6.0VMware Tanzu
 

What's hot (19)

Howto Create & Run zf2skeleton Apps with PHP's Built-in Webserver
Howto Create & Run zf2skeleton Apps with PHP's Built-in WebserverHowto Create & Run zf2skeleton Apps with PHP's Built-in Webserver
Howto Create & Run zf2skeleton Apps with PHP's Built-in Webserver
 
Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016
 
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
 
Gradle
GradleGradle
Gradle
 
Java FX Tools Aquarium Paris
Java FX Tools Aquarium ParisJava FX Tools Aquarium Paris
Java FX Tools Aquarium Paris
 
Spring GraphQL
Spring GraphQLSpring GraphQL
Spring GraphQL
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
Why you can't ignore GitLab
Why you can't ignore GitLabWhy you can't ignore GitLab
Why you can't ignore GitLab
 
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Lightning branches at RedMart (Js conf Asia 2014  Talk)Lightning branches at RedMart (Js conf Asia 2014  Talk)
Lightning branches at RedMart (Js conf Asia 2014 Talk)
 
RedMart Migrating from EC2 to VPC with Chef
RedMart Migrating from EC2 to VPC with ChefRedMart Migrating from EC2 to VPC with Chef
RedMart Migrating from EC2 to VPC with Chef
 
Its easy! contributing to open source - Devnexus 2020
Its easy! contributing to open source - Devnexus 2020Its easy! contributing to open source - Devnexus 2020
Its easy! contributing to open source - Devnexus 2020
 
Vue.js Use Cases
Vue.js Use CasesVue.js Use Cases
Vue.js Use Cases
 
Grails Internals Ggug Dec 2009
Grails Internals Ggug Dec 2009Grails Internals Ggug Dec 2009
Grails Internals Ggug Dec 2009
 
markedj: The best of markdown processor on JVM
markedj: The best of markdown processor on JVMmarkedj: The best of markdown processor on JVM
markedj: The best of markdown processor on JVM
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
 
Docker & azure
Docker & azureDocker & azure
Docker & azure
 
Introduction to .NET Core
Introduction to .NET CoreIntroduction to .NET Core
Introduction to .NET Core
 
From Spring Framework 5.3 to 6.0
From Spring Framework 5.3 to 6.0From Spring Framework 5.3 to 6.0
From Spring Framework 5.3 to 6.0
 
Android presentation - Gradle ++
Android presentation - Gradle ++Android presentation - Gradle ++
Android presentation - Gradle ++
 

Similar to Grails

SAP Inside Track Singapore 2014
SAP Inside Track Singapore 2014SAP Inside Track Singapore 2014
SAP Inside Track Singapore 2014mharkus
 
Magic with groovy & grails
Magic with groovy & grailsMagic with groovy & grails
Magic with groovy & grailsGeorge Platon
 
Grails 101
Grails 101Grails 101
Grails 101Lim Kin
 
Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Diego Zuluaga
 
AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXJWORKS powered by Ordina
 
Avoid the Vendor Lock-in Trap (with App Deployment)
Avoid the Vendor Lock-in Trap (with App Deployment)Avoid the Vendor Lock-in Trap (with App Deployment)
Avoid the Vendor Lock-in Trap (with App Deployment)Peter Bittner
 
intoduction to Grails Framework
intoduction to Grails Frameworkintoduction to Grails Framework
intoduction to Grails FrameworkHarshdeep Kaur
 
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...Igalia
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesKonstantin Rybas
 
Aikau testing tech talk live 83 20150204
Aikau testing tech talk live 83 20150204Aikau testing tech talk live 83 20150204
Aikau testing tech talk live 83 20150204David Webster
 
Config BuildConfig
Config BuildConfigConfig BuildConfig
Config BuildConfigVijay Shukla
 
Command central 9.7: Features Overview
Command central 9.7: Features OverviewCommand central 9.7: Features Overview
Command central 9.7: Features OverviewSoftware AG
 
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)VMware Tanzu
 
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...IBM Systems UKI
 
Config/BuildConfig
Config/BuildConfigConfig/BuildConfig
Config/BuildConfigVijay Shukla
 
AngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue SolutionsAngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue SolutionsRapidValue
 

Similar to Grails (20)

SAP Inside Track Singapore 2014
SAP Inside Track Singapore 2014SAP Inside Track Singapore 2014
SAP Inside Track Singapore 2014
 
Magic with groovy & grails
Magic with groovy & grailsMagic with groovy & grails
Magic with groovy & grails
 
Grails Spring Boot
Grails Spring BootGrails Spring Boot
Grails Spring Boot
 
Grails 101
Grails 101Grails 101
Grails 101
 
Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0
 
AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UX
 
Spring boot
Spring bootSpring boot
Spring boot
 
Avoid the Vendor Lock-in Trap (with App Deployment)
Avoid the Vendor Lock-in Trap (with App Deployment)Avoid the Vendor Lock-in Trap (with App Deployment)
Avoid the Vendor Lock-in Trap (with App Deployment)
 
intoduction to Grails Framework
intoduction to Grails Frameworkintoduction to Grails Framework
intoduction to Grails Framework
 
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release Notes
 
Aikau testing tech talk live 83 20150204
Aikau testing tech talk live 83 20150204Aikau testing tech talk live 83 20150204
Aikau testing tech talk live 83 20150204
 
Config BuildConfig
Config BuildConfigConfig BuildConfig
Config BuildConfig
 
Command central 9.7: Features Overview
Command central 9.7: Features OverviewCommand central 9.7: Features Overview
Command central 9.7: Features Overview
 
Android Platform Debugging & Development
Android Platform Debugging & Development Android Platform Debugging & Development
Android Platform Debugging & Development
 
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
 
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...
 
Config/BuildConfig
Config/BuildConfigConfig/BuildConfig
Config/BuildConfig
 
Config BuildConfig
Config BuildConfigConfig BuildConfig
Config BuildConfig
 
AngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue SolutionsAngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue Solutions
 

More from Vijay Shukla (18)

Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4
 
Preview of Groovy 3
Preview of Groovy 3Preview of Groovy 3
Preview of Groovy 3
 
Jython
JythonJython
Jython
 
Groovy closures
Groovy closuresGroovy closures
Groovy closures
 
Groovy
GroovyGroovy
Groovy
 
Grails services
Grails servicesGrails services
Grails services
 
Grails plugin
Grails pluginGrails plugin
Grails plugin
 
Grails domain
Grails domainGrails domain
Grails domain
 
Grails custom tag lib
Grails custom tag libGrails custom tag lib
Grails custom tag lib
 
Gorm
GormGorm
Gorm
 
Controller
ControllerController
Controller
 
Command object
Command objectCommand object
Command object
 
Boot strap.groovy
Boot strap.groovyBoot strap.groovy
Boot strap.groovy
 
Vertx
VertxVertx
Vertx
 
Custom plugin
Custom pluginCustom plugin
Custom plugin
 
Spring security
Spring securitySpring security
Spring security
 
REST
RESTREST
REST
 
GORM
GORMGORM
GORM
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 

Grails

  • 2. Index 1. Introduction and Advantage 2. Features 3. Installation 4. Convention over Configuration 5. Running Application 6. Testing and Application 7. Deploying an Application 8. Generating an Application 9. Configuration
  • 3. Introduction and Advantage Grails is a full stack framework. ● An easy to use ORM layer built on Hibernate ● An expressive view technology called Groovy Server Page ● A controller layer built on Spring MVC ● An embedded tomcat container which is configured for on the fly reloading ● Dependency Injection with the inbuilt Spring Container ● Support internationalization ● A transactional service layer built on Spring’s transaction abstraction.
  • 4. Features 1. Easy to set-up and get started 2. DRY (Don’t repeat yourself) 3. Convention and Configuration 4. No painful XML 5. Scaffolding 6. Built-in REST api 7. Tag lib 8. Plugin based development 9. Tons of available plugins 10.Minimal server restart required while development
  • 5. Installation Before installing grails, make sure that Java SDK 1.4 or higher is installed on your machine. Set JAVA_HOME environmental variable to point to the path where you have installed Java 1. Download the grails latest version from http://www.grails.org/Download 2. Extract it on the appropriate location…say C:grails 3. Create an environmental variable GRAILS_HOME which points to the path of installation of grails…i.e C:grails 4. In the PATH environment variable.. point it to the /bin directory of grails i.e %GRAILS_HOME%bin In a nutshell, the environmental variables should be like.. JAVA_HOME = C:Program FilesJavajdk-1.5 GRAILS_HOME = C:grails PATH = %GRAILS_HOME%bin;%JAVA_HOME%bin; Check version of grails via grails --version
  • 6. Convention over Configuration Grails uses “convention over configuration” to configure itself. This typically means that the name and location of files is used instead of explicit configuration. 1. Conf :- Configuration Sources 2. Controllers :- Web Controllers 3. Domain :- Application Model 4. Views :- Server Pages 5. Taglib :- Tag Libraries 6. Src :- Supporting Sources 7. Test :- Unit and Integration Testing
  • 7.
  • 8. ● Creating an Application ○ grails create-app [app_name] ● Running an Application ○ grails run-app ○ grails -Dserver.port=8090 run-app ○ grails r-a ● Testing an Application ○ grails test-app ● Deploying an Application ○ grails war ● Generating an Application ○ grails generate-all [domain]
  • 10. Basic Configuration For general configuration Grails provides two files:- ● grails-app/conf/BuildConfig.groovy ● grails-app/conf/Config.groovy Both of them use Groovy’s ConfigSlurper syntax. BuildConfig :- for settings that are used when running Grails command, such as compile, run-app etc. Config :- for settings that are used when your application is running. Note:- Config.groovy is packaged with your application, but BuildConfig.groovy is not.
  • 11. foo.bar.hello=”hello” Note:- the value is a Groovy string literal. The property value can valid Groovy type, such as strings, integers foo.bar.hello=’world’ foo.bar.good=”bye” Both of using same base, the above syntax works but it’s quite verbose and repetitive. foo{ bar{ hello=’world’ good=”bye” } }
  • 12.
  • 13. Implicit Variable for BuildConfig and Config Variable Description userHome Location of Home directory grailsHome Location of directory where grails is installed. appName Application Name as it appears in application.properties appVersion Application Version as it appears in application.properties
  • 14. Implicit Variable for BuildConfig only Variable Description grailsVersion The version of Grails used to build the project grailsSettings An object containing various build related settings, such as baseDir
  • 15. Implicit Variable for Config Variable Description grailsApplication The GrailsApplication class instance
  • 16. Environments 1. Grails support the concepts of per environment configuration. 2. The Config, DataSource and BootStrap.groovy files in the grails-app/conf directory can use per environment configuration. 3. They uses ConfigSlurper 4. Packaging and Running for Different Environments a. grails [environment] [command_name] i. grails test war ii. grails -Dgrails.env=UAT run-app 5. We can detect the environment using the Environment class