Your SlideShare is downloading. ×
0
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Alphageeks IL #2 Groovy & Grails
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Alphageeks IL #2 Groovy & Grails

1,127

Published on

Second Alphageeks IL meetup: …

Second Alphageeks IL meetup:
Yuval Goldstein talks on Groovy & Grails and the shift from static typing to dynamic typing.

Check us out for more events:
http://alphageeks.blogli.co.il/

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,127
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
54
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Groovy & Grails(also) the future of Java Web Development<br />Yuval Goldstein, <br />yuvalgo@gmail.com,<br />@yuvalgo<br />
  • 2. Groovy, Grails, Agenda<br />Beyond Java<br />What’s groovy?<br />What’s grails?<br />How people use them?<br />
  • 3. Beyond Java<br />Java= Language + Classes +JVM<br />JEE = Robust spec to support server-driven apps<br />The good: OO, popular, tons of frameworks, enterprise ready (queues, transactions, web-services)<br />The Bad: Verbose, long turn-around, mix and match your own framework<br />
  • 4. Beyond Java<br />Java code &gt; compiled into bytecode &gt; JVM<br />The JVM supports other languages:<br />Groovy<br />Scala<br />JRuby<br />Jython<br />But WHY? : Because not every problem should be solved by a general purpose language<br />
  • 5. Groovy<br />Cool language, compiles into bytecode<br />Similar to Java, a lot of additions and improvements:<br />Language level support for collections<br />Closures and Builders<br />Dynamic typing<br />Concise syntax<br />Groovy2Java, Java2Groovy integration<br />
  • 6. Demo<br />Let’s take a Java class and show how it’s done in Groovy<br />
  • 7. Closures<br />A piece of code that can be passes around and executed (sort of an Anonymous class with a method)<br />
  • 8. More Closures<br />
  • 9. Demo<br />Let’s see some Collections and Closures working together<br />
  • 10. Groovy typing<br />Types can be specified and enforced<br />Types can unspecified and deducted (Duck Typing)<br />
  • 11. Duck Typing<br />Behavior of objects is determines by their own methods and members rather than by declarations<br />
  • 12. Duck Season? - Demo<br />Let’s see how duck typing works<br />
  • 13. Duck Typing<br />Sacrifice certainty for laziness, WTF?<br />Some application really need strict typing, other doesn’t<br />Frameworks generate a lot of code for you on runtime<br />Faster code changes<br />Good testing really helps<br />You already doing it:<br />HTML, CSS, SQL, JSP<br />
  • 14. Expando Classes<br />
  • 15. String Matching<br />
  • 16. Introducing Grails<br />Grails=Groovy + Spring + Hibernate + Sitemesh<br />A framework for developing web-apps with pleasure<br />Open-Source, supported by Spring-Source<br />Convention over configuration<br />Model-driven <br />Short turnaround<br />Good developer-testing support<br />A lot more…<br />
  • 17. Demo<br />Create an empty application<br />Develop a domain classes<br />Generate a trivial CRUD : dynamic, then static<br />
  • 18. Domain Objects and GORM<br />GORM: Hibernate DSL<br />1:1, 1:N, M:N, Object hierarchies, Versioning, Cascade, Fetch<br />Objects are DAOs<br />Automatic Query Syntax:<br />Object.save()<br />Object.get(id)<br />Object.findAll()<br />
  • 19. Controllers<br />Each closure maps to a request name<br />Render templates, GSP, XML, JSON<br />Automatic variables: param, session, flash<br />Support Spring Webflow<br />Dependency Injection support (for services)<br />
  • 20. Views<br />GSPs, taglibs, Templates<br />HTML centric<br />Built in Tags for: Forms and error handling , AJAX, Pagination, uploads<br />Pluggable Ajax support: Prototype, YUI, others<br />Plugins: Grails-UI, Flex, GWT, Open Lazzlo, Portlet integration<br />
  • 21. Services<br />Help re-use code, scope transaction, expose web-services<br />Different Scopes: singleton, session, prototype, request, conversation, flow<br />Dependency Injection support<br />Plugins: JMS integration, Quartz Jobs, Xfire/Spring web-services, etc…<br />
  • 22. Testing support<br />Built-in Unit and Integration testing<br />Good mockup support<br />Can’t do without it<br />
  • 23. (Only some) Plugins<br />GrailsUI<br />Acegi Security<br />Twitter<br />Flex<br />Quartz<br />Searchable<br />
  • 24. Groovy, Grails in the wild<br />Groovy:<br />As a scripting tool for developers<br />For testing plain java code<br />For developing swing code (special DSL)<br />For coding grails application<br />Grails:<br />Prototypes and back-office applications<br />Grails Frontend with Java backend<br />Grails frontend and backend<br />
  • 25. Community and support<br />Open-Source, use for free<br />Commercial training and support by spring<br />Grails user newsgroup on Nabble: 40-80 messages a day<br />IDEs: Eclipse, Intellij, Netbeans, TextMate<br />Books:Groovy in action, Grails in Action, Definitive Guide to Grails, Getting started with Grails, Groovy & Grails Recepies, more…<br />Sites:grails.org, aboutgroovy.com, grailspodcast.com, grailstutorials.com<br />
  • 26. Who use Grails?<br />Linkedin.com<br />Sky.com<br />twitcaps.com<br />blerp.com<br />twitsms.co.uk<br />Ganttzilla.com<br />Lot’s of community, e-commerce and twitter oriented sites<br />
  • 27. Summary<br />Grails is ideal for small and medium size application <br />Grails ~= Rails capabilities + JVM + All existing Java frameworks<br />0 Setup development environment<br />Fun to use<br />
  • 28. Thanks !<br />

×