Upload
hiten-pratap-singh
View
1.502
Download
1
Embed Size (px)
DESCRIPTION
It contains all basic and introductory details about Grails framework like its history and pros, cons etc
Citation preview
Agenda
● What is Grails?
● Why Grails?
● History of Grails
● Technology stack of Grails
● Directory structure of Grails
● Main Components of Grails
● Pros and Cons of Grails
● WebSites using Grails
Agenda
● Future of Grails
● References
What is Grails?
● Grails is an open source web application framework
● uses the Groovy programming language
● following the "coding by convention" paradigm
● providing a stand-alone development environment and hiding much of the configuration detail
● Also following DRY(don't repeat yourself) paradigm
● Grails is highly inspired from Ruby on Rails web framework like DRY and COC principles.
Why Grails?
● According to its official websites-
– Grails is Robust– Grails is Dynamic– Grails is Rapid
● Most important reasion to use it is that it runs on JVM and leverages all plus points of JAVA
● Any Java developer can learn it very quickly rather than migrate to other framework for RAD development.
● Grails is agile and based on plugins means any functionality can be attach/detach to it very easily.
Why Grails?
● Grails is actually Spring and Hibernate plus trending concepts from Ruby on Rails like DRY and COC etc.
● It's very dynamic ecosystem
● Very active developer community
● Grails removes the need to add configuration in XML files
History of Grails
● Grails was previously known as 'Groovy on Rails
● Work began in July 2005, with the 0.1 release on March 29, 2006
● Graeme Rocher is project head and creator of Grails framework.
● Grails is made by G2One, later acquired by Spring Source.
● It developed due to need of RAD framework for JAVA programmer community like Ruby on Rails in Ruby programmer community.
Technology stack of Grails
Directory structure of Grails
%PROJECT_HOME%
+ grails-app + conf ---> location of configuration artifacts + hibernate ---> optional hibernate config + spring ---> optional spring config + controllers ---> location of controller artifacts + domain ---> location of domain classes + i18n ---> location of message bundles for i18n + services ---> location of services + taglib ---> location of tag libraries
Directory structure of Grails
+ util ---> location of special utility classes + views ---> location of views + layouts ---> location of layouts+ lib + scripts ---> scripts + src + groovy ---> optional; location for Groovy source files (of types other than those in grails-app/*) + java ---> optional; location for Java source files + test ---> generated test classes + web-app + WEB-INF
Main components of Grails
Actually as a MVC framework there are only three main component of Grails and they are-
● Model(domain)
● Controller
● View
But there are many other essential components of Grails which makes it different from others like-
● Services
Main components of Grails
● Taglib
● Plugins
● Templating
Pros and cons of using Grails
What are the advantages?
● It provides a rapid development cycle.
● The framework offers a range of plug-ins to make your development simple.
● You can see the changes by hitting the refresh button.
● Dynamic configuration feature. Therefore, you can change the configuration without server restart.
● The setup process is very simple. Therefore, you should be able to start building an app in an hour.
Pros and cons of using Grails
What are the disadvantages?
● Interpreted languages increase weight and that directly affects the run time.
● It works with GORM but not with any other ORMs.
● Developers generally declare variables with “def” which is equivalent to “object”. It’s very hard to maintain.
● You have to deal with runtime language.
WebSites Using Grails
Folowing websites are currently using Grails-
● Netflix Asgard - https://github.com/Netflix/asgard
● NOW TV - http://nowtv.com
● Vodafone Music - http://music.vodafone360.com/gb/en
● Sky TV Guide - http://tv.sky.com/
and many more.......
source: http://grails.org
Future of Grails
● Grails 3.0 will separate Grails from the traditional application server and extend Grails’ reach to allow for the development of lightweight, asynchronous applications.
● Grails’ persistence technology GORM has also been evolving beyond the traditional relational database, with implementations for NoSQL databases now available.
● GORM will continue to be an important technology for us as enterprise data fabrics evolve.
Source:http://www.cacoethes.co.uk/blog/groovyandgrails/where-next-for-grails
References
● http://grails.org
● http://grails.org/websites
● http://www.cacoethes.co.uk/blog/groovyandgrails/where-next-for-grails
● http://en.wikipedia.org/wiki/Grails_(framework)
Any questions?
Thank You.......