Grails

11
Grails Aditya Gaur

Transcript of Grails

GrailsAditya Gaur

Grails

• It is a web development framework

• Has groovy as the underlying language

• Built on Spring and Hibernate

Some Features

Scaffolding

• Based on the fields in in your domain class grails generates views and controllers

• It also handles UI for basic operations like:▫ Creation▫ Read▫ Update▫ Delete

• For applying scaffold we just need to give the following in the controller class

def scaffold = <Domain Class name>

Scaffolding (List View)

Scaffolding (Create View)

Scaffolding (update view)

Convention over Configuration

• Grails Follows convention over configuration philosophy▫ So we need to take care of the naming and the placement of

various files in the project

• So no need to write lot of XML files, thus faster web dev

GORM

• Grails Object Relational Mapping

• Helps in the process of getting Objects in and out from the database.

• We don’t need to care about writing SQL queries for db operations

• It uses hibernate under the hood

MVC architecture

• Grails application has the most commonly used Model-View-Controller Architecture

• It uses the spring MVC as underlying

framework

• When we create a grails application

using create-app, it makes a directory

structure in accordance with the MVC

Future Work

• Would try to compare Grails with other Java based web development frameworks such as Play, Spring MVC, struts etc.