InroToGrails.ppt

19
Inroduction to Grails Hiten Pratap Singh [email protected] http://github.com/hitenpratap

Transcript of InroToGrails.ppt

  • Inroduction to GrailsHiten Pratap [email protected]://github.com/hitenpratap

  • AgendaWhat is Grails?Why Grails?History of GrailsTechnology stack of GrailsDirectory structure of GrailsMain Components of GrailsPros and Cons of GrailsWebSites using Grails

  • AgendaFuture of GrailsReferences

  • What is Grails?Grails is an open source web application frameworkuses the Groovy programming language following the "coding by convention" paradigmproviding a stand-alone development environment and hiding much of the configuration detailAlso following DRY(don't repeat yourself) paradigmGrails is highly inspired from Ruby on Rails web framework like DRY and COC principles.

  • Why Grails?According to its official websites-Grails is RobustGrails is DynamicGrails is RapidMost important reasion to use it is that it runs on JVM and leverages all plus points of JAVAAny 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 ecosystemVery active developer communityGrails removes the need to add configuration in XML files

  • History of GrailsGrails was previously known as 'Groovy on RailsWork began in July 2005, with the 0.1 release on March 29, 2006Graeme 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 GrailsActually as a MVC framework there are only three main component of Grails and they are-Model(domain)ControllerViewBut there are many other essential components of Grails which makes it different from others like-Services

  • Main components of GrailsTaglibPluginsTemplating

  • Pros and cons of using GrailsWhat 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 GrailsWhat 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. Its very hard to maintain.You have to deal with runtime language.

  • WebSites Using GrailsFolowing websites are currently using Grails-Netflix Asgard - https://github.com/Netflix/asgardNOW TV - http://nowtv.comVodafone Music - http://music.vodafone360.com/gb/enSky TV Guide - http://tv.sky.com/

    and many more.......

    source: http://grails.org

  • Future of GrailsGrails 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

  • Referenceshttp://grails.orghttp://grails.org/websiteshttp://www.cacoethes.co.uk/blog/groovyandgrails/where-next-for-grailshttp://en.wikipedia.org/wiki/Grails_(framework)

  • Any questions?

  • Thank You.......