Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Grails workshops
1. Introduction to
Łukasz Tenerowicz
lukasz.tenerowicz@gmail.com
lukasz.tenerowicz@itsilesia.com
2. Disadvantages of web apps in Java ?
● Hard configuration (e.g. XML soup )
● Large amounts of boilerplate code ( vs.
scripting languages like PHP, Python)
itsilesia.com e: info@itsilesia.com
3. Grails = No disadvantages of Java
● Convention over configuration - like in
RoR
● Groovy as a primary language
○ Short syntax
○ Easy!
○ Functional elements
● Configuration also in Groovy
itsilesia.com e: info@itsilesia.com
4. … + its advantages
● Lots of libraries
○ Spring ( DI, Transactions, Spring Security )
○ Hibernate
○ Quartz
○ Lots of APIs ( e.g. Amazon Web Services Java
SDK)
● Deployment via .war file
● ~20 years of JVM development
itsilesia.com e: info@itsilesia.com
5. About Grails
● version 1.0 in 2008
● Looks similar to Ruby on Rails
○ MVC
○ convention over configuration
○ console
● Based on Spring MVC, Hibernate
● Used in LinkedIn, Netflix, Sky TV,
Vodafone
itsilesia.com e: info@itsilesia.com
20. Databinding of a domain class
itsilesia.com e: info@itsilesia.com
21. Validation
● Domains and all classes with
@Validateable
● Occurs on obj.validate() or during
databinding
● If any constraints are violated, error
codes are added to obj.errors map
● Those errors can be rendered via i18n
codes
itsilesia.com e: info@itsilesia.com
22. Internationalisation - i18n
● Based on codes found in /grails-app/
i18n/messages.properties
● Tags : <g:message code=”com.some.code” />
● So yes, we can render errors too!
○ <g:message error=”${object.errors}” />
itsilesia.com e: info@itsilesia.com