Table of Contents |
---|
test page for Grails projects
Key Points
- Grails scaffolding and GORM is IBM i DFU on steroids - any database, any Java runtime environment
- Where it fits, Grails is the fastest way to build Web apps or microservices using the right templates
- Grails generated apps provide a good starting point to understand how Web and REST microservices are built
- Grails generates Spring Boot applications and REST services
- Grails can build traditional MVC web apps or REST microservices using templates and generators
- Grails can generate simple front-ends for REST microservices - Angular, React, Web
- Grails profiles define which options an application or service will use
- Grails uses Groovy - a Java superset and a dynamic JVM language
- Grails v4x will use Groovy v3x when available in 2020
- Groovy v3x will support latest Java versions ( Lamba expressions, modules etc )
- I should look at running Grails REST service in Docker container similar to a Spring Boot REST service
- Tracking Grails releases in Github ( milestones etc ) https://github.com/grails/grails-core/releases
References
...
https://github.com/grails/grails-core/releases/tag/v4.1.0.M2
http://docs.grails.org/4.1.0.M1/guide/introduction.html#whatsNew
...
Table of Contents |
---|
test page for Grails projects
Key Points
- Grails scaffolding and GORM is IBM i DFU on steroids - any database, any Java runtime environment
- Where it fits, Grails is the fastest way to build Web apps or microservices using the right templates
- Grails generated apps provide a good starting point to understand how Web and REST microservices are built
- Grails generates Spring Boot applications and REST services
- Grails can build traditional MVC web apps or REST microservices using templates and generators
- Grails can generate simple front-ends for REST microservices - Angular, React, Web
- Grails profiles define which options an application or service will use
- Grails uses Groovy - a Java superset and a dynamic JVM language
- Grails v4x will use Groovy v3x when available in 2020
- Groovy v3x will support latest Java versions ( Lamba expressions, modules etc )
- I should look at running Grails REST service in Docker container similar to a Spring Boot REST service
- Tracking Grails releases in Github ( milestones etc ) https://github.com/grails/grails-core/releases
References
...
export MYSQL_JDBC=/Users/jimmason/_dev/lib/mysql-connector-java-5.1.34.jar
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
export GRAILS_HOME=/Users/jimmason/_dev/grails4
export PATH=$PATH:$GRAILS_HOME:$GRAILS_HOME/bin
export CLASSPATH=$MYSQL_JDBC:$CLASSPATH
echo $PATH
Grails 3x requires JDK8 not JDK11
verify JDK is JDK8 NOT JDK11 ( the default system JDK I set )
grails --version && groovy --version
Project References
...
export MYSQL_JDBC=/Users/jimmason/_dev/lib/mysql-connector-java-5.1.34.jar
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
export GRAILS_HOME=/Users/jimmason/_dev/grails4
export PATH=$PATH:$GRAILS_HOME:$GRAILS_HOME/bin
export CLASSPATH=$MYSQL_JDBC:$CLASSPATH
echo $PATH
Grails 3x requires JDK8 not JDK11
verify JDK is JDK8 NOT JDK11 ( the default system JDK I set )
grails --version && groovy --version
Project References
Key Concepts
Grails 6.1.2 Guide
Grails 6.2.2 Documentation on Books and Authors Controllers - Quickstart Guide
Implement business logic in service classes with Controller classes only managing request flow
Services can have defined scopes
Domain classes as REST resources
Transactional annotations for transaction behavior required
n this example listBooks
uses a read-only transaction, updateBook
uses a default read-write transaction, and deleteBook
is not transactional (probably not a good idea given its name).
https://docs.grails.org/6.1.2/guide/services.html
Multi-tenancy can be single database with discriminator column ( eg accountId ) or multi-database
https://guides.grails.org/discriminator-per-tenant/guide/index.html
https://guides.grails.org/database-per-tenant/guide/index.html
Build a Spring Boot application with Grails
Grails builds on Spring concepts
Scaffolding Views from Book class
Deploy as war or jar file
Grails Training
grails v4x books - authors 4 days
http://docs.grails.org/latest/
...