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/
3. Beyond Java Java= Language + Classes +JVM JEE = Robust spec to support server-driven apps The good: OO, popular, tons of frameworks, enterprise ready (queues, transactions, web-services) The Bad: Verbose, long turn-around, mix and match your own framework
4. Beyond Java Java code > compiled into bytecode > JVM The JVM supports other languages: Groovy Scala JRuby Jython But WHY? : Because not every problem should be solved by a general purpose language
5. Groovy Cool language, compiles into bytecode Similar to Java, a lot of additions and improvements: Language level support for collections Closures and Builders Dynamic typing Concise syntax Groovy2Java, Java2Groovy integration
6. Demo Let’s take a Java class and show how it’s done in Groovy
7. Closures A piece of code that can be passes around and executed (sort of an Anonymous class with a method)
13. Duck Typing Sacrifice certainty for laziness, WTF? Some application really need strict typing, other doesn’t Frameworks generate a lot of code for you on runtime Faster code changes Good testing really helps You already doing it: HTML, CSS, SQL, JSP
16. Introducing Grails Grails=Groovy + Spring + Hibernate + Sitemesh A framework for developing web-apps with pleasure Open-Source, supported by Spring-Source Convention over configuration Model-driven Short turnaround Good developer-testing support A lot more…
17. Demo Create an empty application Develop a domain classes Generate a trivial CRUD : dynamic, then static
19. Controllers Each closure maps to a request name Render templates, GSP, XML, JSON Automatic variables: param, session, flash Support Spring Webflow Dependency Injection support (for services)
20. Views GSPs, taglibs, Templates HTML centric Built in Tags for: Forms and error handling , AJAX, Pagination, uploads Pluggable Ajax support: Prototype, YUI, others Plugins: Grails-UI, Flex, GWT, Open Lazzlo, Portlet integration
21. Services Help re-use code, scope transaction, expose web-services Different Scopes: singleton, session, prototype, request, conversation, flow Dependency Injection support Plugins: JMS integration, Quartz Jobs, Xfire/Spring web-services, etc…
24. Groovy, Grails in the wild Groovy: As a scripting tool for developers For testing plain java code For developing swing code (special DSL) For coding grails application Grails: Prototypes and back-office applications Grails Frontend with Java backend Grails frontend and backend
25. Community and support Open-Source, use for free Commercial training and support by spring Grails user newsgroup on Nabble: 40-80 messages a day IDEs: Eclipse, Intellij, Netbeans, TextMate Books:Groovy in action, Grails in Action, Definitive Guide to Grails, Getting started with Grails, Groovy & Grails Recepies, more… Sites:grails.org, aboutgroovy.com, grailspodcast.com, grailstutorials.com
26. Who use Grails? Linkedin.com Sky.com twitcaps.com blerp.com twitsms.co.uk Ganttzilla.com Lot’s of community, e-commerce and twitter oriented sites
27. Summary Grails is ideal for small and medium size application Grails ~= Rails capabilities + JVM + All existing Java frameworks 0 Setup development environment Fun to use