<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Free practice test , mock test, driving test, interview questions &#187; grails tutorial</title>
	<atom:link href="http://www.skill-guru.com/blog/tag/grails-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.skill-guru.com/blog</link>
	<description>Find free mock and practice test, create and sell tests</description>
	<lastBuildDate>Thu, 29 Jul 2010 14:16:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Grails tutorial &#8211; How to create and run First Application in Grails</title>
		<link>http://www.skill-guru.com/blog/2009/07/23/start-grailing-how-to-create-and-run-first-application/</link>
		<comments>http://www.skill-guru.com/blog/2009/07/23/start-grailing-how-to-create-and-run-first-application/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 20:16:52 +0000</pubDate>
		<dc:creator>sadhna</dc:creator>
				<category><![CDATA[Programming / tutorials]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[grails tutorial]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=159</guid>
		<description><![CDATA[I am hoping you would have gone through Introducing Grails and then the Part 1 of this post Setting Up Grails .
Now I am covering the details of developing and running the application
1. Go to command prompt and your grails home directory.
2. Create the application. 

The create-app command creates the full project, with a template [...]]]></description>
			<content:encoded><![CDATA[<p>I am hoping you would have gone through<a href="http://www.skill-guru.com/blog/2009/06/26/grails-a-breath-of-fresh-air-for-java-people/"> Introducing Grails </a>and then the Part 1 of this post <a href="http://www.skill-guru.com/blog/2009/07/08/setting-up-grails-%E2%80%A6/" target="_self">Setting Up Grails</a> .</p>
<p>Now I am covering the details of developing and running the application</p>
<p><strong>1. </strong><strong>Go to command prompt and your grails home directory.</strong><br />
<strong>2. </strong><strong>Create</strong><strong> the application</strong>.<strong> </strong></p>
<ul>
<li>The create-app command creates the full project, with a template with placeholders for the different components of your application such as configuration, MVC, library, and much more.</li>
<li>&gt; grails create-app   (it will ask for a application name say – first_app)</li>
<li>Will create basic  view layout as main.gsp page<span id="more-159"></span></li>
</ul>
<p><strong>3. </strong><strong>Add the Business Logic and Model( Domain Classes)</strong></p>
<ul>
<li>The domain class is the core of the business application; it contains the state and behavior of your application.</li>
<li>&gt; cd first_app</li>
<li>&gt; grails create-domain-class  (enter name say – first;you need to use the same name for the class and the table you want to map your object on.)</li>
<li>The domain class is located in the following location:./first_app/grails-app/domain/First.groovy</li>
</ul>
<p>class First{ // A blank class will be created on create-domain<br />
/*can add vars you don&#8217;t need to worry about creating the getters and setters*/<br />
String name<br />
Date birthdate<br />
}</p>
<p><strong>4. </strong><strong>Create the different screens from the domain class</strong>.</p>
<ul>
<li>&gt; grails generate-all (For creating all screens-enter domain class name – first)</li>
<li>This command creates the different Views and Controllers; you can take a look to the directories: ./grails-app/controllers &amp;. /grails-app/views</li>
</ul>
<p>class FirstController {//will create &lt;domainname&gt;Controller<br />
// with some default closures<br />
def list = {…}<br />
&#8230;<br />
}<br />
<code>FirstController</code> also gets lots of new and useful dynamic methods whose names are handily self-explanatory:</p>
<ul>
<li><code>save()</code> <em>saves</em> the data to the table in the HSQLDB database.</li>
<li><code>delete()</code> <em>deletes</em> the data from the <code>table</code>.</li>
<li><code>list()</code> returns a list.</li>
<li><code>get()</code> returns a single record</li>
<li>create()</li>
<li>update().</li>
</ul>
<p>Also generates the 4 view gsp pages to render the output on screen.</p>
<h4>5.      Run the Application</h4>
<p>Grails provides a way to run the application in standalone mode (run-app). This command starts a Web container (based on Jetty) with the application deployed.</p>
<p>&gt; grails run-app  and go to <a href="http://localhost:8080/first_app/">http://localhost:8080/first_app/</a> to see it running.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2009/07/23/start-grailing-how-to-create-and-run-first-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up Grails</title>
		<link>http://www.skill-guru.com/blog/2009/07/08/setting-up-grails-%e2%80%a6/</link>
		<comments>http://www.skill-guru.com/blog/2009/07/08/setting-up-grails-%e2%80%a6/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 14:38:52 +0000</pubDate>
		<dc:creator>sadhna</dc:creator>
				<category><![CDATA[Programming / tutorials]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[grails tutorial]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=111</guid>
		<description><![CDATA[In case you have  missed it , here is the first post Introduction to Grails
Before creating the first grails application we need to first  install &#38; set up grails environment –

Go to http://www.grails.org/Download ,      Download and unzip grails.
Create a GRAILS_HOME environment variable.
Add $GRAILS_HOME/bin to the PATH.

Pre-requisite -  Jdk 1.4 or [...]]]></description>
			<content:encoded><![CDATA[<p>In case you have  missed it , here is the first post <a href="http://www.skill-guru.com/blog/2009/06/26/grails-a-breath-of-fresh-air-for-java-people/">Introduction to Grails</a></p>
<p>Before creating the first grails application we need to first  install &amp; set up grails environment –</p>
<ol>
<li>Go to <a href="http://www.grails.org/Download">http://www.grails.org/Download</a> ,      Download and unzip grails.</li>
<li>Create a <code>GRAILS_HOME</code> environment variable.</li>
<li>Add $GRAILS_HOME/bin to the <code>PATH</code>.</li>
</ol>
<p>Pre-requisite -  Jdk 1.4 or above.</p>
<p>Cool thing about Grails is you don’t need to install server or database for running test apps. web server is <strong>‘jetty’ server</strong> comes with grails so you do not need to install separately. But if you want to use any other server like tomcat , jboss   ..,you can.</p>
<p>Grails also comes with HSQLDB, a pure-Java database. Using another database, such as mysql or Oracle Database is just changing the dbdriver in DataSource.groovy ,thanks to Hibernate and GORM.</p>
<p>Enjoy setting your machine for start Grailing.</p>
<p>Update:  In this post, <a href="http://www.skill-guru.com/blog/2009/07/23/start-grailing-how-to-create-and-run-first-application/" target="_self">how to create and run First Application</a>s . I am covering the next steps for starting development</p>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2009/07/08/setting-up-grails-%e2%80%a6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
