Bug Tracker Application - biTracker

Posted by Anantha Narayanan On 3:52 PM

This application can be used to track issues/bugs which might be arising in development. The features include: User defined resource names  User defined browser names (in case of browser based application for checking compatibility)  User defined pages/program units  User defined environments (like uat/development etc)  User defined severity status  Issues/bugs are searchable using searchable plugin  This application is intented to be a starting place wherein MS-Excel sheets can be replaced and the bugs/issues could be saved to Oracle database. The configuration...

What is SCAFFOLD?

Posted by Anantha Narayanan On 10:48 PM

Scaffold in normal English means "scaf·fold·ing/ˈskafəldiNG/Noun: A temporary structure on the outside of a building, made of wooden planks and metal poles, used by workers while building, repairing, or... The materials used in such a structure." In Grails and some more "Model-View-Controller (MVC for short)" frameworks this term is used to describe the automatic "Create-Read-Update-Delete" database functions that are constructed and executed at run time. For example if you have defined a domain class in Grails, the table can be created by the framework. More, Grails also allows you to...

Automatic Scaffold Controller

Posted by Anantha Narayanan On 10:39 PM

By default if you are creating a controller using the following command: grails create-controller org.example.DomainClass Suppose your controller is based on an existing DomainClass, you might want to jump start using scaffolding. You might be opening the controller file and commenting the code which Grails has created for you. class DomainClassController {   def index = { } } You might be adding the magic keyword that allows scaffolding later. class DomainClassController {   //def index = { }   def scaffold = true } If you have many number of controllers to be created...

Welcome Grails 2

Posted by Anantha Narayanan On 1:01 AM

It was only recently that Grails 2 was released. Being using an ubuntu Linux distro, it is very easy to upgrade Grails and I did. The first thing I tried was to execute an already existing application (using Grails 1.3.7) and it gave me an error: | NOTE: Your application currently expects grails version [1.3.7], this target will upgrade it to Grails 2.0.0 I issued the command grails upgrade WARNING: This target will upgrade an older Grails application to 2.0.0.   Are you sure you want to continue? [y,n] I gave a proceed signal and Grails upgraded my application after downloading...

Difference between nullable and blank

Posted by Anantha Narayanan On 12:10 AM

What is the difference between nullable and blank constraints in Grails domain class?  Consider the following constraint defined within a domain class: Package nulltest Class Test1{  String someValue  static constraints = {    someValue blank:true  } } Grails while compling and running the application creates the fiels someValue to allow blank value. You will get the following error if you have a controller action for this domain: Property [someValue] of class [class nulltest.Test1] cannot be null This property blank is only applicable for a String field....

How to switch off Version

Posted by Anantha Narayanan On 8:57 PM

If you have ever created domain classes and let Grails create the tables, you must have noted that by default there are two columns created. ID and Version. Why do I have ID and VERSION?  ID Column is used for creating primary key for the table. VERSION column is used for identifying the version of the record whenever an update is happening to the table. I will not discuss about the ID column here, but VERSION column requires more elaboration. Grails uses Optimistic locking technique, wherein a row is only locked in the database when the user saves the data after modification. In a using...

Login Application

Posted by Anantha Narayanan On 7:40 PM

Create an application C:\GRAILS_APPLICATONS>grails create-app login-test Now create a controller for the user to show login buttons, or once logged in we need to show some message. C:\GRAILS_APPLICATONS\LOGIN-TEST>grails create-controller useraccount Once the controller is created, create a gsp file index.gsp within C:GRAILS_APPLICATION\login-test\grails-app\views\useraccount. Call it index.gsp. We want this controller because by default the controller will have a def index = { } in its body. To use this we are creating the gsp with same name. You are always free to modify the def index...

Groovy and Grails Tutorial

Posted by Anantha Narayanan On 6:35 PM

A simple tutorial by Harshad Oak. Groovy Basics Scripting / Agile / Dynamic ...Language • Syntax very close to Java • Meant for Java developers. • A powerful high level language for the Java "platform" • Groovy code Compiles to Java bytecode. • You can get productive quickly Powered by Upload PDFDownload document to...

Why Grails

Posted by Anantha Narayanan On 8:08 PM

Grails is an open source framework for web development that runs on the J2EE platform. It is mainly built on Groovy, a language which can be thought of as an extension to Java. Combines principles such as "convention over configuration" (Convention Over Configuration) and "Do not repeat yourself" (Do not Repeat Yourself) together with a series of open source frameworks like Hibernate, Spring and SiteMesh. Grails aims to be a highly productive...

Hello World Application

Posted by Anantha Narayanan On 10:03 PM

Now heading straight to create a fresh application we will create a “Hello World” printing application. Grails creates a main folder and numerous sub-folders for each application. It is easy to create a parent folder which holds all my applications (we will be creating more than one applications in our tutorials). Create a folder c:\grails_applications and use command prompt from now on. Navigate to c:\grails_applications folder in command prompt. Now we are ready to create our first application. Type grails create-app helloworld in command prompt. C:\GRAILS_APPLICATONS>grails create-app...

Installing Grails

Posted by Anantha Narayanan On 10:01 PM

Grails is an open source web application framework. It is based on Java and Groovy. (Groovy is a language for Java platform.) To learn more about Groovy click here. Before downloading Grails, you will need Java 5.0 or greater. Download and install Java before installing Grails. Once java is installed set environment variable JAVA_HOME to the path where java is installed. Now it is time to download Grails, do it from here. http://www.grails.org/Download. As of this writing the latest stable release is 1.3 (release: 1.3.7). We will use this version in our examples. We will download any database...

Recommended Post Slide Out For Blogger