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
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.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.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
- 4. The Admin Portal - Web Profile
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.
El Manual del ManagerKeyvan Akbary, Félix López, and Álvaro Salazar
¿Has deseado alguna vez el haber tenido una buena introducción al rol del Engineering Manager? En este libro aprenderás lo necesario para ejercer el rol de una manera efectiva: Expectativas y Responsabilidades del Rol, 1-1s, Ayudar a Crecer, Objetivos, Planes de Carrera, Cultura, Feedback, Contratación, Cultura de Producto y mucho más.
Functional Design and ArchitectureAlexander Granin
Software Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
Ansible for KubernetesJeff Geerling
Ansible is a powerful infrastructure automation tool. Kubernetes is a powerful application deployment platform. Learn how to use these tools to automate massively-scalable, highly-available infrastructure.
Ansible for DevOpsJeff Geerling
Ansible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Practical FP in Scala: A hands-on approachGabriel Volpe
A practical book aimed for those familiar with functional programming in Scala who are yet not confident about architecting an application from scratch.
Together, we will develop a purely functional application using the best libraries in the Cats ecosystem, while learning about design patterns and best practices.
Tame your Work FlowSteve Tendon and Daniel Doiron
Do you need a high performance enterprise governance approach improving management, execution and delivery while dealing with multiple projects/products, events, stakeholders and teams? Giving you better bottom line results, faster time to market, less work, better predictability, happier employees, and delighted clients? Then learn about TameFlow!
C++ Best PracticesJason Turner
Level up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
Cloud StrategyGregor Hohpe
“Strategy is the difference between making a wish and making it come true.” A successful migration to the cloud shouldn’t be driven by wishes, but guided by a sound strategy, frameworks, and decision models. This book tells you how—without becoming superficial nor getting lost in technology and product details.
Machine Learning EngineeringAndriy Burkov
"If you intend to use machine learning to solve business problems at scale, I'm delighted you got your hands on this book."
—Cassie Kozyrkov, Chief Decision Scientist at Google
"Foundational work about the reality of building machine learning models in production."
—Karolis Urbonas, Head of Machine Learning and Science at Amazon
Composing SoftwareEric Elliott
All software design is composition: the act of breaking complex problems down into smaller problems and composing those solutions. Most developers have a limited understanding of compositional techniques. It's time for that to change.
11 BooksThe Quality Software Bundle is for managers, would-be managers, and any of us who find themselves being managed and confused. This comprehensive bundle covers the entire span of software development approaches, from hacking through waterfall, cascade, prototyping, Iterative enhancement, reusable code, off-the-shelf, to Agile teams. The bundle...
The Node.js Bundle
3 BooksThis bundle combines three bestselling Leanpub Node.js books into a package that gives you everything you need to get started with developing Node.js applications at an unbeatable price.
The Tester's Library
8 BooksThe Tester's Library consists of eight five-star books that every software tester should read and re-read. As bound books, this collection would cost over $200. Even as e-books, their price would exceed $80, but in this bundle, their cost is only $49.99. Here are the books, and why they should be in your library: Perfect Software and Other...
11 BooksIn this bundle, you will find 10 different agile books. They are about different aspects of being agile. - finding a job - doing coding dojo's - Retrospectives - Personal kanban - a non-typical coaching book and even a book that gives you an insight in the lives of some agile people.
WTFlop 6M + HU - Beta Bundle
Marionette.js A to Z
Complete Scala Bundle
3 BooksScala is a general-purpose programming language and it's getting extremely popular these days. Some say that learning Scala could be a challenging task. My experience, however, suggests that this is actually a myth that has very little to do with reality. With the right approach, learning Scala can be easy, fun and rewarding.The first book from...
Build A Better Backbone App
3 BooksThe best way to learn new development skills is through experience, but that takes time you don't have.Get the best of both worlds with this bundle: you'll learn how to produce modern web applications by learning from experienced developers like Derick Bailey and David Sulc. BackboneJS is one of the favorite tools on the web today, but it...
People Skills—Soft but Difficult
7 BooksPerhaps you've been told that "lack of people skills" has been holding you back. No wonder: you may have had hundreds of hours of technical training, but little or no "people skills" guidance.You've heard it said that people skills are "soft," whereas technical skills are "hard." For you, though, technical skills are "easy," but people skills...
SurviveJS - Webpack + React
2 BooksGet both SurviveJS - Webpack and SurviveJS - React for a single price!