Use Cases of #Grails in #WebApplications

28
Use Cases of Use Cases of Grails in Grails in Web Applications Web Applications Sunil Prakash Inteti Xebia

description

Use Cases of #Grails in Web Applications - Type of applications most appropriate to be developed in Grails - Type of applications where Grails may not be the best choice - Experiences with Grails during several web application development projects

Transcript of Use Cases of #Grails in #WebApplications

Page 1: Use Cases of #Grails in #WebApplications

Use Cases of Grails inUse Cases of Grails in Web Applications Web Applications

Sunil Prakash IntetiXebia

Page 2: Use Cases of #Grails in #WebApplications

Netherlands | USA | India | France | UK

SOFTWARE DEVELOPMENT DONE RIGHT

Page 3: Use Cases of #Grails in #WebApplications

AgendaAgenda• About me• Expectation out of the session • Grails Introduction• Why Grails• Common use cases - Grails plugins• Issues using Grails• Who is using Grails

Page 4: Use Cases of #Grails in #WebApplications

• Sunil Prakash Inteti• Senior consultant,

Xebia IT Architechts• 28 years• Bible• Worked with clients in

US, Europe, Australia

Page 5: Use Cases of #Grails in #WebApplications
Page 6: Use Cases of #Grails in #WebApplications

Enterprise web applicationsEnterprise web applications

Page 7: Use Cases of #Grails in #WebApplications

Grails IntroductionGrails Introduction• Web Development framework inspired by Ruby

on Railso Convention over Configurationo DRY – Do Not Repeat Yourselfo More focused on domain objects than Rails

• Underlying Libraries:o Hibernate o Spring o SiteMesh o Quartzo J2EE / Servlet

Page 8: Use Cases of #Grails in #WebApplications

Why Grails ?Why Grails ?• JVM based• Groovy’s fast learning curve• Based on Spring, Hibernate, sitemesh• Productive

o Lot of CRUD fucntionality scaffoldingo GORMo Agile development, fast prototypingo Environment specific properties

Page 9: Use Cases of #Grails in #WebApplications
Page 10: Use Cases of #Grails in #WebApplications

PluginsPlugins• A core concept in Grails

– Unit of Functionality– Unit of Reusability– Unit of Integration

• Creating a plugin is almost identical to creating an application

• Over 700 Plugins in all sorts of areas– Central Repository– http://grails.org/plugin/home

Page 11: Use Cases of #Grails in #WebApplications
Page 12: Use Cases of #Grails in #WebApplications

class MyJob { static triggers = { cron name: 'myTrigger', cronExpression: "0 0 6 * * ?" } def group = "MyGroup" def group = "MyGroup"

def execute(){ print "Job run!" }}

QuartzQuartz

Page 13: Use Cases of #Grails in #WebApplications

More plugins..More plugins..• Spring security

o Authentication and Authorization

• Mail plugino mailService which has the send mail methodo Injected into all the controllers

• Jquery• Test Code Coverage Plugin

o Coberturao grails test-app-cobertura

• Grails REST Plugin• Joda time

Page 14: Use Cases of #Grails in #WebApplications

• Simple Captcha Plugin• Grails AWS Plugin• Solr plugin• Twitter plugin• Cloud Foundry Integration

Page 15: Use Cases of #Grails in #WebApplications
Page 16: Use Cases of #Grails in #WebApplications
Page 17: Use Cases of #Grails in #WebApplications

Mobile apps Mobile apps • Exposing rest services is easy in Grails

// Automatic marshalling of XML and JSONimport grails.converters.*…render Book.list(params) as JSONrender Book.get(params.id) as XML

Page 18: Use Cases of #Grails in #WebApplications
Page 19: Use Cases of #Grails in #WebApplications

grails install-plugin backbonejs

Page 20: Use Cases of #Grails in #WebApplications
Page 21: Use Cases of #Grails in #WebApplications

• Performance intensive core backend systems

• Unnecessary objects created in groovy. This triggers garbage

collection frequently.

• Garbage collection generally makes applications slower which

is not convenient.

• Need to give more memory to Permgen space than a java

application

Issues with GrailsIssues with Grails

Page 22: Use Cases of #Grails in #WebApplications

Performance numbersPerformance numbers

METHOD JAVA [NS] GRAILS[NS] FACTORPojos 117.914 856.337 7.26Quicksort 68.728 330.159 4.80

Page 23: Use Cases of #Grails in #WebApplications

AtlassianBig Lots – core siteCollabNet – web interface to SVN serverDell - EnstratiusDisneyeHarmonyEMC Epic GamesEricssonESPNFidelity InvestmentsIEEELinkedIn – Recruiter applicationLiveNation – TicketWebLive GamerLucasfilm

Nissan – Leaf siteNokiaQualcommSymantecT-Mobile – internal appsLyrisMoneyGramMTV (and Viacom by extension)Netflix – Asgard, their Amazon EC2 cloud management app, now open sourced.Volkswagen - UK siteWalmart – MP3 streaming site (now defunct)The Washington PostWired.comSky – (UK) TV listings, movies, and showbiz sitesVodafone Music – (UK) core site

Companies using GrailsCompanies using Grails

Page 24: Use Cases of #Grails in #WebApplications
Page 25: Use Cases of #Grails in #WebApplications
Page 26: Use Cases of #Grails in #WebApplications
Page 27: Use Cases of #Grails in #WebApplications

Enterprise Web Apps

Technologies

-Scala (Language), Akka, Spray, Lift, Play , HTML5, CSS3, Backbone.js, AngularJS

Rich Internet ApplicationsRich Internet Applications

Custom Application DevelopmentCustom Application Development

Highly Scalable ApplicationsHighly Scalable Applications

Back End IntegrationBack End Integration

Middleware DevelopmentMiddleware Development

Application Design and DevelopmentApplication Design and Development

Page 28: Use Cases of #Grails in #WebApplications

Contact us @

Xebia [email protected]

Websiteswww.xebia.inwww.xebia.comwww.xebia.fr

Thought LeadershipHtto://xebee.xebia.inhttp://blog.xebia.comhttp://podcast.xebia.com