Use Cases of #Grails in #WebApplications

Post on 10-May-2015

1,334 views 1 download

Tags:

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

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

Sunil Prakash IntetiXebia

Netherlands | USA | India | France | UK

SOFTWARE DEVELOPMENT DONE RIGHT

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

• Sunil Prakash Inteti• Senior consultant,

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

US, Europe, Australia

Enterprise web applicationsEnterprise web applications

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

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

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

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

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

QuartzQuartz

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

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

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

grails install-plugin backbonejs

• 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

Performance numbersPerformance numbers

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

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

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

Contact us @

Xebia Indiainfoindia@xebia.com

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

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