GRAILS 3 - Step By Step
GRAILS 3 - Step By Step
Greenfield applications made right with Grails 3
About the Book
A practical book about Grails 3 full stack framework!
We try to describe here how a complete greenfield application can be implemented with Grails 3 in a fast way using profiles and plugins - and we do this in the sample application that accompanies this book. You can find news about this book on its presentation site located here: www.grailsthreebook.com. This book is not a replacement of the [Grails 3 Reference Documentation](http://docs.grails.org/latest) which is a complete description of [Grails 3](https://grails.org), made by the creators of the framework.
The source code used in this book is part of this sample application which is a free project hosted on GitHub on this location: https://github.com/colaru/mvp-application. If a source code fragment is included in this book, then it is taken from this project. We use BDD or other specification by example techniques for describing the sample application specification - the leaving documentation for the project can be found here: http://serenity.itjobsboard.eu. The application code is tested in a TDD style using automated unit, integration and functional tests.
The sample application is based on a multi project Gradle build so the application can be automatically built using Gradle - the build tool used by Grails 3. The web application is available here: https://www.itjobsboard.eu. The admin application is available online here: https://admin.itjobsboard.eu. The deployment is done automatically to AWS cloud in a Continuous Deployment style using Jenkins.
We use links to various external resources in this book (you will see them in the page’s footers), because this book is intended to be in electronic format from the beginning. The reader can use these links for consulting external references in an easy way.
The book has two parts.
First part - Grails 3 Essentials
An introduction to application development with Grails 3; we describe the main application that will be implemented in the second part of the book
**Chapter 1** is an introduction to the framework. You will find here some history of the framework and a lot of links to the Grails resources; it is presenting the classical three layered architecture for a web application provided by Grails 3
**Chapter 2** describes how to start your work with Grails 3 framework and how to install all the tools for a free working environment - free as much as possible because you have to pay some money for the best tools on the market
**Chapter 3** presents the project we want to implement as an example; it is presenting also the way we choose to work on implementing the sample application, based on BDD, TDD, CI and CD; it shows how the main application is split into multiple parts based on Grails 3 profiles
Second part - Practical example with Grails 3
A practical implementation of a greenfield application with Grails 3; the application is composed of multiple parts corresponding to various Grails 3 profiles
**Chapter 4** describes the implementation of the application admin portal that will be used in Intranet by the site administrators, based on a classical Grails 3 Web Profile
**Chapter 5** describes the implementation of the application site exposed to the Internet to the customers, that is based on Grails 3 Angular Profile
**Chapter 6** describes a REST web API exposed with Grails 3 Rest Profile and consumed by a mobile hybrid application created with Ionic 2 (can be published in Google Play, Apple Store, and Windows Store)
**Chapter 7** describes a Microservice developed with Grails 3 Rest API Profile
About the Contributors
Reviewer
Reviewer
Table of Contents
-
-
How this book is organized
- First part - Grails 3 Essentials
- Second part - Practical example with Grails 3
-
How this book is organized
-
PART 1 - Grails 3 Essentials
-
1. Introduction to Grails 3
-
1.1 Some history
- 1.1.1 Java history
- 1.1.2 Java EE history
- 1.1.3 Spring history
- 1.1.4 Groovy history
- 1.1.5 Grails history
-
1.2 Grails application architecture
- 1.2.1 A classical layered architecture
-
1.3 New technologies inside Grails 3
- 1.3.1 Spring Boot
- 1.3.2 Gradle
- 1.3.3 Gorm
- 1.3.4 LogBack
-
1.4 Modularity aspects of Grails
- 1.4.1 Plugins
- 1.4.2 Profiles
-
1.1 Some history
-
2. Set your free working environment
- 2.1 Install Java SDK
- 2.2 Install Grails 3
- 2.3 Start a muti-build Grails 3 project
- 2.4 IDE support for Grails 3
- 2.5 Add a plugin to the multi-build project
- 2.6 Sandbox for Groovy
- 2.7 Source control with Git
- 2.8 Deployment in AWS Cloud
- 2.9 Continuous Delivery with Jenkins
-
3. A greenfield project and a way of working
- 3.1 Structuring the project
- 3.2 A way of specifying application requirements
-
3.3 Main techniques used in the sample project
- 3.3.1 TDD
- 3.3.2 BDD
- 3.3.3 DDD
- 3.3.4 Clean Code
- 3.3.5 Lean Startup
-
3.4 A greenfield application specification
- 3.4.1 Admin application
- 3.4.2 Web application
- 3.4.3 Microservice
- 3.4.4 Features to be implemented
-
1. Introduction to Grails 3
-
PART 2 - Practical example with Grails 3
-
4. The Admin Portal - Web Profile
- 4.1 Specification for the admin portal
-
4.2 Security
- 4.2.1 Grails 3 security
- 4.2.2 Spring Security Core plugin
- 4.2.3 Advanced Grails security
- 4.2.4 Spring Security AppInfo plugin
-
4.3 Modeling the domain
- 4.3.1 Domain entities
- 4.3.2 Relationships between entities
- 4.3.3 Modeling with TDD
-
4.4 UI Scaffolding
- 4.4.1 Scaffolding plugin
- 4.4.2 Fields plugin
-
4.5 Persistence
- 4.5.1 Populate the database at bootstrap
- 4.5.2 Configuring data sources
- 4.5.3 Production database with AWS RDS
- 4.6 To do list
-
5. A Web Rich Client - Angular Profile
- 5.1 Specification for the web application
-
5.2 Server side
- 5.2.1 Domain module
- 5.2.2 The REST API
- 5.2.3 Security
-
5.3 Client side
- 5.3.1 Introduction in AngularJS framework
- 5.3.2 Scaffolding the client side
- 5.3.3 Introducing the new style
- 5.3.4 Asset pipeline plugin
-
5.4 Production ready
- 5.4.1 Buy and host your domain on Elastic Beanstalk
- 5.4.2 S3 alternative for hosting your client app
- 5.4.3 Add HTTPS support
- 5.4.4 SEO - Search Engine Optimization
- 5.4.5 Analytics
- 5.5 To do list
-
6. The Mobile Application - Rest API Profile
- 6.1 About this chapter content
-
6.2 Introduction to Ionic 2 and Hybrid Mobile Applications
- 6.2.1 Install Ionic 2
- 6.2.2 Generate client app
- 6.2.3 Angular 2
- 6.2.4 Cordova
- 6.2.5 Ionic Native
-
6.3 Rest API
- 6.3.1 From verbs to nouns
- 6.3.2 Swagger specification
- 6.3.3 REST Security on the server side
- 6.3.4 REST Security on the client side
-
6.4 To the app store
- 6.4.1 Google Play Store
- 6.4.2 Apple App Store
- 6.4.3 Windows App Store
- 6.5 To do list
-
7. Microservice - Rest API Profile
- 7.1 About this chapter content
- 7.2 Introduction to microservices
- 7.3 Scheduling a job with Quartz
- 7.4 Expose a REST service
- 7.5 Starting the microservice
- 7.6 Microservice security
- 7.7 To do list
- Bibliography
-
4. The Admin Portal - Web Profile
Other books by this author
Authors have earned$10,095,386writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Top Books
C++20
Rainer GrimmC++20 is the next big C++ standard after C++11. As C++11 did it, C++20 changes the way we program modern C++. This change is, in particular, due to the big four of C++20: ranges, coroutines, concepts, and modules.
The book is almost daily updated. These incremental updates ease my interaction with the proofreaders.
A Guide to Artificial Intelligence in Healthcare
Dr. Bertalan MeskoCan we stay human in the age of A.I.? To go even further, can we grow in humanity, can we shape a more humane, more equitable and sustainable healthcare? This e-book aims to prepare healthcare and medical professionals for the era of human-machine collaboration. Read our guide to understanding, anticipating and controlling artificial intelligence.
Atomic Kotlin
Bruce Eckel and Svetlana IsakovaFor both beginning and experienced programmers! From the author of the multi-award-winning Thinking in C++ and Thinking in Java together with a member of the Kotlin language team comes a book that breaks the concepts into small, easy-to-digest "atoms," along with exercises supported by hints and solutions directly inside IntelliJ IDEA!
C++ Best Practices
Jason TurnerLevel up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
Introducing EventStorming
Alberto BrandoliniThe deepest tutorial and explanation about EventStorming, straight from the inventor.
Ansible for DevOps
Jeff GeerlingAnsible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Everyday Rails - RSpecによるRailsテスト入門
Junichi Ito (伊藤淳一), AKIMOTO Toshiharu, 魚振江, and Aaron SumnerRSpecを使ってRailsアプリケーションに信頼性の高いテストを書く実践的なアドバイスを提供します。詳細で丁寧な説明は本書のオリジナルコンテンツです。また、説明には実際に動かせるサンプルアプリケーションも使用します。本書は2017年版にアップデートされ、RSpec 3.6やRails 5.1といった新しい環境に対応しています!さあ、自信をもってテストできるようになりましょう!
R Programming for Data Science
Roger D. PengThis book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
The Hundred-Page Machine Learning Book
Andriy BurkovEverything you really need to know in Machine Learning in a hundred pages.
Continuous Delivery Pipelines
Dave FarleyThis practical handbook provides a step-by-step guide for you to get the best continuous delivery pipeline for your software.
Top Bundles
- #1
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #2
All the Books of The Medical Futurist
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy, digital health investments and how technology giants such as Amazon... - #3
PowerShell
3 Books
Buy every PowerShell book from Adam Bertram at a 20% discount! - #4
Cisco CCNA 200-301 Complet
4 Books
Ce lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301. - #5
Software Architecture and Beautiful APIs
2 Books
There is no better way to learn how to design good APIs than to look at many existing examples, complementing the Software Architecture theory on API design. - #6
Linux Administration Complet
4 Books
Ce lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité... - #7
Learn Git, Bash, and Terraform the Hard Way
3 Books
Learn Git, Bash and Terraform using the Hard Way method.These technologies are essential tools in the DevOps armoury. These books walk you through their features and subtleties in a simple, gradual way that reinforces learning rather than baffling you with theory. - #8
9 Books-Bundle: Shut Up and Code!
9 Books
"Shut up and code." Laughter in the audience. The hacker had just plugged in his notebook and started sharing his screen to present his super-smart Python script. "Shut up and code" The letters written in a white literal coding font on black background was the hackers' home screen background mantra. At the time, I was a first-year computer... - #9
Mastering Containers
2 Books
Docker and Kubernetes are taking the world by storm! These books will get you up-to-speed fast! Docker Deep Dive is over 400 pages long, and covers all objectives on the Docker Certified Associate exam.The Kubernetes Book includes everything you need to get up and running with Kubernetes! - #10
CCDE Practical Studies (All labs)
3 Books
CCDE lab