![Page 1: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/1.jpg)
![Page 2: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/2.jpg)
Grails + Mongo
A new super hero in the block, powered by the power of Cloud.
![Page 3: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/3.jpg)
Groovy
• Dynamic language for the JVM • Java of the future • Integrates with all existing Java libraries • Compiles straight to Java byte code
![Page 4: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/4.jpg)
Grails
• Web application framework for the JVM • Takes advantage of Groovy • Fast, dynamic and robust
![Page 5: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/5.jpg)
Mongo
• Scalable • High performance • No SQL
![Page 6: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/6.jpg)
The Cloud
• Openshift | Cloudfoundry • Scale your applications quickly • Infrastructure?? What is that, huh?
![Page 7: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/7.jpg)
By your powers combined…
• Build a grails application on the cloud, backed by Mongo easily
• Power of Groovy and Grails • NoSQL capabilities of Mongo • The power of Cloud
![Page 8: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/8.jpg)
More on Groovy…
• Reduce the amount of code you write • Easy and efficient ways to use
Collections framework and Iterators • Efficient String management functions
![Page 9: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/9.jpg)
Let’s get our hands dirty…
• Reducing boiler plate code • Collections • String manipulations
![Page 10: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/10.jpg)
Hungry for more?
• The dynamic Groovy • Don’t forget the Closures • Some uber cool operators
![Page 11: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/11.jpg)
What does Grails bring in?
• Scaffolding • Easier and elegant controllers • Domain classes and GORM • Don’t forget the GSPs…
![Page 12: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/12.jpg)
Seeing is believing
• Scaffolding test run • GORM showcase
![Page 13: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/13.jpg)
Plugins of Grails
• Cornerstone of Grails • Enhance the capabilities • Community driven – That means YOU!!!
![Page 14: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/14.jpg)
The humongous Mongo..
![Page 15: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/15.jpg)
And in Cloud bind them…
![Page 16: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/16.jpg)
The application.
• Blog application to blog about something
• Users can create a blog entry • Full text search on all blogs
![Page 17: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/17.jpg)
What have we done..
• Simple Grails app • Dynamic scaffolding • Full text search – Searchable plugin • Backed by Mongo – MongoDB plugin • Running on the cloud, thanks to
Openshift and Cloudfoundry
![Page 18: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/18.jpg)
Plugins we used
• MongoDB plugin – Integration with Mongo
• Searchable plugin – Lucene based full text search
• CloudFoundry plugin for Grails – Push your app directly to the cloud. J – Not available for OpenShift
![Page 19: Grails + Mongo - JBoss · PDF fileGrails + Mongo A new super hero in the block, powered by the power of Cloud](https://reader031.vdocuments.us/reader031/viewer/2022030407/5a83e7b37f8b9a9d308f1e93/html5/thumbnails/19.jpg)
Pushing it to the Cloud!
• Support for Grails in Cloudfoundry J • No direct support for in OpenShift L
– WAR upload • MongoDB gear available in both the
ecosystems