Grails Scaffolding Controllers and Views

 

Controllers and views round out the “Big Three” in Grails applications. The Model/View/Controller (MVC) pattern is undoubtedly familiar to most web developers. By enforcing a clean separation of concerns among these three elements, your efforts are paid back in terms of maximum flexibility and reuse. Continue reading

Advertisements

Grails Environment Setup

 

Need to follow below steps for Grails environment setup

  • Install JDK1.5 or higher from oracle
  • Point the JAVA_HOME environment variable at your JDK installation.
  • Download the latest release of Grails from http://grails.org/Download.
  • Unzip Grails
  • Create a GRAILS_HOME environment variable
  • Add GRAILS_HOME/bin to the PATH

Continue reading

Grails Understanding

Grails

Grails is a web framework based on Groovy and Java which can be deployed into existing Java web servers, e.g. Tomcat or Jetty. Its scaffolding capabilities let you create a new project within a few minutes. Grails is based on the “convention over configuration” idea which allows the application to auto-wires itself based on naming schemes (instead of using configuration files, e.gl XML files). Continue reading

Groovy Environment Setup

Groovy Development Environment

Groovy requires Java, so you need to have a version available (while groovy 1.6 supports JDK 1.4 or greater, for groovy 1.7 onwards, minimum JDK 1.5 is needed)

Download the Groovy installer or binaries from the downloads page (http://groovy.codehaus.org/Download) and follow the installation instruction

Download binary

  • Set GROOVY_HOME
  • Add GROOVY_HOME/bin to your PATH
  • Set JAVA_HOME

Groovy Architecture

Architecture

Groovy uses a Java-like syntax which is dynamically compiled to Java byte code therefore Groovy can seamlessly work together with Java code and Java libraries. Groovy with Java make Groovy very powerful. When an application needs functionality that can’t be achieved with the existing Groovy libraries, the developer can still write Java code to achieve the goal and vice versa Java code can be converted to Groovy

Architecture Figure 1: Groovy on Java Platform

 Groovy is like a super version of Java. It can leverage Java’s enterprise capabilities but also has cool productivity features like action, builders and dynamic typing.