SlideShare a Scribd company logo
1 of 31
Download to read offline
SOFEA Applications with
   GWT and Grails

                    Matt Raible
              http://raibledesigns.com




 Images by Stuck in Customs - http://www.flickr.com/photos/stuckincustoms
INTRODUCTIONS

Are you developing web
applications?

Experience with RIA
Frameworks?

Experience with Grails?

What do you hope to get
out of this session?



                          © 2009, Raible Designs
Founder of AppFuse
                                Author of Spring Live and Pro JSP 2.0


 W H O I S M AT T R A I B L E ?


       Connoisseur of Web Frameworks




                     Father, Skier, Cyclist and Beer Connoisseur
Blogger on raibledesigns.com since 2002                 © 2009, Raible Designs
SESSION AGENDA

SOFEA, SOUI and Client Server 2.0

Ajax Frameworks Analysis

Why GWT?

Why Grails?

Conclusion

Q and A


                                    © 2009, Raible Designs
SOFEA & SOUI

SOFEA first introduced in Life above the Service Tier
on 10/12/2007.

  http://www.theserverside.com/news/thread.tss?
  thread_id=47213

SOUI introduced by Nolan Wright and Jeff Haynie in
early November 2007.

  http://www.infoq.com/news/2007/11/soui-
  death-of-mvc2

                                               © 2009, Raible Designs
SOFEA & SOUI

SOFEA Authors have since formed the Thin Server
Architecture Working Group.

  http://www.thinserverarchitecture.com

  Increasing productivity through simplicity

Nolan and Jeff started Appcelerator.

  http://www.appcelerator.org



                                               © 2009, Raible Designs
© 2009, Raible Designs
D AW N O F A N E W E R A
From web frameworks to services, clients and Ajax...
                                                       © 2009, Raible Designs
CHOOSING AN AJAX
       FRAMEWORK
1. Choose a short list of frameworks to prototype with.
2. Create an application prototype with each
   framework.
3. Document findings and create a matrix with
   important criteria.
4. Create presentation to summarize document.
5. Deliver document, presentation (with demos) and
   recommendation.

    http://raibledesigns.com/rd/entry/choosing_an_ajax_framework

                                                               © 2009, Raible Designs
CHOSEN FRAMEWORKS




               © 2009, Raible Designs
OUR RESULTS




http://raibledesigns.com/rd/entry/ajax_framework_analysis_results
                                                                    © 2009, Raible Designs
GWT FIRST IMPRESSION

Pros
       Write Java => Produces JavaScript
       Easy to learn and develop with standard Java tools
       Vibrant Community
       Zero Turnaround in Hosted Mode
Cons
       Hard to attach GWT on top of existing code
       Doesn’t support REST very well
       Operates within the confines of the browser
                                                    © 2009, Raible Designs
G W T, G X T A N D S M A RT G W T

                                    © 2009, Raible Designs
MAVEN GWT PLUGIN

Create project using archetype:
 mvn archetype:generate 
 -DarchetypeGroupId=org.codehaus.mojo 
 -DarchetypeArtifactId=gwt-maven-plugin 
 -DarchetypeVersion=1.1 
 -DgroupId=com.yourcompany 
 -DartifactId=gwt-project -Dversion=1.0-SNAPSHOT -B



Fix for GWT 1.7+ with http://jira.codehaus.org/
browse/MGWT-134


                                                 © 2009, Raible Designs
SAME ORIGIN POLICY

Modern browsers have a Same Origin Policy

JavaScript has to interact with the same domain




                                                  © 2009, Raible Designs
PROXY SERVLET




http://raibledesigns.com/rd/entry/how_to_do_cross_domain#proxyServlet




                                                                        © 2009, Raible Designs
MODULARIZING CODE

GWT Libraries (JARs) for common functionality

Builder Helper Plugin allows shared source

Hosted mode can still run on JAR libraries
http://raibledesigns.com/rd/entry/running_hosted_mode_in_gwt




                                                               © 2009, Raible Designs
TESTING GWT

GWTTestCase

  http://raibledesigns.com/rd/entry/testing_gwt_applications

  Code Coverage via EclEmma and IntelliJ IDEA

JUnit and EasyMock

  Works great with MVP
  http://raibledesigns.com/rd/entry/building_gwt_applications_with_mvp




                                                             © 2009, Raible Designs
PACKAGING AND
           SELENIUM
Package as one or two WARs using the
UrlRewriteFilter to manipulate service URIs
  http://raibledesigns.com/rd/entry/packaging_a_sofea_application_for


Use Cargo and Selenium to test the UI

  Make sure to set IDs on elements!

  Can still test GWT libraries with this setup
  http://raibledesigns.com/rd/entry/testing_gwt_libraries_with_selenium


                                                                © 2009, Raible Designs
MVC VS. MVP
http://raibledesigns.com/rd/entry/gxt_s_mvc_framework




http://code.google.com/events/io/2009/sessions/
GoogleWebToolkitBestPractices.html




                                                        © 2009, Raible Designs
MVP RESOURCES

MVP Example from Hive Development

 http://blog.hivedevelopment.co.uk/2009/08/
 google-web-toolkit-gwt-mvp-example.html

 GWT Presenter

 Google GIN

 GWT Log


                                          © 2009, Raible Designs
OVERLAY TYPES

Easy, efficient JSON
  http://googlewebtoolkit.blogspot.com/2008/08/getting-to-really-
  know-gwt-part-2.html




                                                               © 2009, Raible Designs
OVERLAY TYPES




http://raibledesigns.com/rd/entry/json_parsing_with_javascript_overlay

                                                                 © 2009, Raible Designs
GWT SUMMARY

Widgets are awesome and lead to über productivity

More time spent with testing and infrastructure than
development (a good thing!)

Works great with JSON

Debugging, IDE and Refactoring support are major
advantages over raw JavaScript



                                               © 2009, Raible Designs
WHY GRAILS?

Existing backend in
Spring and Hibernate

Fast to develop with

REST support built-in

Architect Decision




                        © 2009, Raible Designs
REST

http://www.infoq.com/
articles/rest-introduction




     API
                             © 2009, Raible Designs
GRAILS PLUGINS

Stuck on version 1.0.4

Test

Quartz

Ivy

Searchable




                         © 2009, Raible Designs
GRAILS + MEMCACHED


Installing and using memcached

  http://www.ibm.com/developerworks/java/
  library/j-memcached1/index.html

Integration memcached into Grails

  http://www.ibm.com/developerworks/java/
  library/j-memcached2.html

                                        © 2009, Raible Designs
GRAILS SUMMARY

Grails 1.0.4 JSON Parser fails for deep object graphs

Very productive, mostly because of Groovy

Changing services requires restart, not so with
controllers

But ... Smart programmers use Python because
Python is good. Python is good, because smart
programmers use it.       -- http://en.wikipedia.org/wiki/Tautology




                                                                      © 2009, Raible Designs
CONCLUSION
Last Monday, 1.5MM unique visitors, 2MM visits, 10MM pageviews
                                                                 © 2009, Raible Designs
QUESTIONS?

Contact Information

  http://raibledesigns.com
  http://twitter.com/mraible

Download Presentation

  http://raibledesigns.com/rd/page/publications




                                            © 2009, Raible Designs

More Related Content

More from Matt Raible

Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022Matt Raible
 
Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022Matt Raible
 
Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022Matt Raible
 
Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022Matt Raible
 
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Matt Raible
 
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022Matt Raible
 
Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022Matt Raible
 
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...Matt Raible
 
Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021Matt Raible
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Matt Raible
 
Web App Security for Java Developers - PWX 2021
Web App Security for Java Developers - PWX 2021Web App Security for Java Developers - PWX 2021
Web App Security for Java Developers - PWX 2021Matt Raible
 
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...Matt Raible
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...Matt Raible
 
Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021Matt Raible
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Matt Raible
 
Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021Matt Raible
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...Matt Raible
 
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Matt Raible
 
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021Matt Raible
 
JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020Matt Raible
 

More from Matt Raible (20)

Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
 
Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022
 
Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022
 
Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022
 
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022
 
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
 
Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022
 
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
 
Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021
 
Web App Security for Java Developers - PWX 2021
Web App Security for Java Developers - PWX 2021Web App Security for Java Developers - PWX 2021
Web App Security for Java Developers - PWX 2021
 
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
 
Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
 
Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
 
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
 
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
 
JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020
 

Recently uploaded

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 

Building SOFEA Applications with GWT and Grails

  • 1. SOFEA Applications with GWT and Grails Matt Raible http://raibledesigns.com Images by Stuck in Customs - http://www.flickr.com/photos/stuckincustoms
  • 2. INTRODUCTIONS Are you developing web applications? Experience with RIA Frameworks? Experience with Grails? What do you hope to get out of this session? © 2009, Raible Designs
  • 3. Founder of AppFuse Author of Spring Live and Pro JSP 2.0 W H O I S M AT T R A I B L E ? Connoisseur of Web Frameworks Father, Skier, Cyclist and Beer Connoisseur Blogger on raibledesigns.com since 2002 © 2009, Raible Designs
  • 4. SESSION AGENDA SOFEA, SOUI and Client Server 2.0 Ajax Frameworks Analysis Why GWT? Why Grails? Conclusion Q and A © 2009, Raible Designs
  • 5. SOFEA & SOUI SOFEA first introduced in Life above the Service Tier on 10/12/2007. http://www.theserverside.com/news/thread.tss? thread_id=47213 SOUI introduced by Nolan Wright and Jeff Haynie in early November 2007. http://www.infoq.com/news/2007/11/soui- death-of-mvc2 © 2009, Raible Designs
  • 6. SOFEA & SOUI SOFEA Authors have since formed the Thin Server Architecture Working Group. http://www.thinserverarchitecture.com Increasing productivity through simplicity Nolan and Jeff started Appcelerator. http://www.appcelerator.org © 2009, Raible Designs
  • 7. © 2009, Raible Designs
  • 8. D AW N O F A N E W E R A From web frameworks to services, clients and Ajax... © 2009, Raible Designs
  • 9. CHOOSING AN AJAX FRAMEWORK 1. Choose a short list of frameworks to prototype with. 2. Create an application prototype with each framework. 3. Document findings and create a matrix with important criteria. 4. Create presentation to summarize document. 5. Deliver document, presentation (with demos) and recommendation. http://raibledesigns.com/rd/entry/choosing_an_ajax_framework © 2009, Raible Designs
  • 10. CHOSEN FRAMEWORKS © 2009, Raible Designs
  • 12. GWT FIRST IMPRESSION Pros Write Java => Produces JavaScript Easy to learn and develop with standard Java tools Vibrant Community Zero Turnaround in Hosted Mode Cons Hard to attach GWT on top of existing code Doesn’t support REST very well Operates within the confines of the browser © 2009, Raible Designs
  • 13. G W T, G X T A N D S M A RT G W T © 2009, Raible Designs
  • 14. MAVEN GWT PLUGIN Create project using archetype: mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=1.1 -DgroupId=com.yourcompany -DartifactId=gwt-project -Dversion=1.0-SNAPSHOT -B Fix for GWT 1.7+ with http://jira.codehaus.org/ browse/MGWT-134 © 2009, Raible Designs
  • 15. SAME ORIGIN POLICY Modern browsers have a Same Origin Policy JavaScript has to interact with the same domain © 2009, Raible Designs
  • 17. MODULARIZING CODE GWT Libraries (JARs) for common functionality Builder Helper Plugin allows shared source Hosted mode can still run on JAR libraries http://raibledesigns.com/rd/entry/running_hosted_mode_in_gwt © 2009, Raible Designs
  • 18. TESTING GWT GWTTestCase http://raibledesigns.com/rd/entry/testing_gwt_applications Code Coverage via EclEmma and IntelliJ IDEA JUnit and EasyMock Works great with MVP http://raibledesigns.com/rd/entry/building_gwt_applications_with_mvp © 2009, Raible Designs
  • 19. PACKAGING AND SELENIUM Package as one or two WARs using the UrlRewriteFilter to manipulate service URIs http://raibledesigns.com/rd/entry/packaging_a_sofea_application_for Use Cargo and Selenium to test the UI Make sure to set IDs on elements! Can still test GWT libraries with this setup http://raibledesigns.com/rd/entry/testing_gwt_libraries_with_selenium © 2009, Raible Designs
  • 21. MVP RESOURCES MVP Example from Hive Development http://blog.hivedevelopment.co.uk/2009/08/ google-web-toolkit-gwt-mvp-example.html GWT Presenter Google GIN GWT Log © 2009, Raible Designs
  • 22. OVERLAY TYPES Easy, efficient JSON http://googlewebtoolkit.blogspot.com/2008/08/getting-to-really- know-gwt-part-2.html © 2009, Raible Designs
  • 24. GWT SUMMARY Widgets are awesome and lead to über productivity More time spent with testing and infrastructure than development (a good thing!) Works great with JSON Debugging, IDE and Refactoring support are major advantages over raw JavaScript © 2009, Raible Designs
  • 25. WHY GRAILS? Existing backend in Spring and Hibernate Fast to develop with REST support built-in Architect Decision © 2009, Raible Designs
  • 27. GRAILS PLUGINS Stuck on version 1.0.4 Test Quartz Ivy Searchable © 2009, Raible Designs
  • 28. GRAILS + MEMCACHED Installing and using memcached http://www.ibm.com/developerworks/java/ library/j-memcached1/index.html Integration memcached into Grails http://www.ibm.com/developerworks/java/ library/j-memcached2.html © 2009, Raible Designs
  • 29. GRAILS SUMMARY Grails 1.0.4 JSON Parser fails for deep object graphs Very productive, mostly because of Groovy Changing services requires restart, not so with controllers But ... Smart programmers use Python because Python is good. Python is good, because smart programmers use it. -- http://en.wikipedia.org/wiki/Tautology © 2009, Raible Designs
  • 30. CONCLUSION Last Monday, 1.5MM unique visitors, 2MM visits, 10MM pageviews © 2009, Raible Designs
  • 31. QUESTIONS? Contact Information http://raibledesigns.com http://twitter.com/mraible Download Presentation http://raibledesigns.com/rd/page/publications © 2009, Raible Designs