Unit Testing
GrailsUnitTestCase and GroovyTestCase both extend JUnit 3.x TestCase.MVC Unit Test case will extend GrailsUNitTest case and delegate the test case control to ControllerUnitTestCase and TagLibUnitTestCase
Tag: Grails
Grails Services
Services
Grails Service uses to separate your business logic from the other layer or component. Services are named in the format SomeNameService.groovy and placed in the directory /grails-app/services/. Services can make use of dependency injection features, and you can easily call these services from within controllers. Continue reading “Grails Services”
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 “Grails Scaffolding Controllers and Views”
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
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 “Grails Understanding”
Groovy Exception handling
Exception handling
Groovy lets the programmer decide to catch the exception or not. In the following example, the developer tries to open and read the contents of a file. He does not need to surround the method with a try and catch block, when he knows that the file exists. Continue reading “Groovy Exception handling”
Grails – GORM Tutorial
Grails is known as domain driven language that means we can build application using bottom to top approach which is more nearer to object oriented programming. GORM (Grail Object Relational Mapping) uses intern Hibernate to map the domain with table which gives life to Domain modeling. If we combined everything just only based on domain we could build the whole web application. Scaffolding can bring domain design directly to visible state to business users with extra involvement Continue reading “Grails – GORM Tutorial”