Introduction to Grails: A Powerful Groovy-Based Web Application Framework

Slide Note
Embed
Share

Grails is a Groovy-based web application framework built on Spring Boot. It provides sensible defaults, opinionated APIs, and supports various databases. With features like convention-over-configuration and flexible profiles, Grails is easy to learn for Java developers. Plugins, file structures, example classes, and more aspects of Grails development process are covered in the content.


Uploaded on Oct 06, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. International Living Atlases Workshop Madrid 2018 Introduction to Grails Nick dos Remedios

  2. Grails https://grails.org/ A powerful Groovy-based web application framework for the JVM built on top of Spring Boot Convention-over-configuration, sensible defaults, opinionated APIs, and the Groovy language combine to make Grails easy to learn for Java developers MongoDB, Neo4j and more. View technologies for rendering HTML as well as JSON A controller layer built on Spring Boot A plugin system featuring hundreds of plugins. Flexible profiles to create applications with AngularJS, React and more. An interactive command line environment and build system based on Gradle An embedded Tomcat container which is configured for on the fly reloading This work is licensed under a Creative Commons Attribution 3.0 Australia License

  3. File Structure $ grails create-app au.org.ala.testApp This work is licensed under a Creative Commons Attribution 3.0 Australia License

  4. Example classes $ grails create-domain-class au.org.ala.testApp.User This work is licensed under a Creative Commons Attribution 3.0 Australia License

  5. Controller $ grails create-controller au.org.ala.testApp.user $ grails run-app $ Grails application running at http://localhost:8080 in environment: development This work is licensed under a Creative Commons Attribution 3.0 Australia License

  6. testApp running This work is licensed under a Creative Commons Attribution 3.0 Australia License

  7. Files you may need to edit build.gradle -- version, package, library dependencies grails-app/conf/application.[groovy|yml] -- configuration (defaults) grails-app/assets/[stylesheets|javascript|images] grails-app/i18n/messages.properties -- internationisation (translation) files grails-app/views/layouts -- header & footer (not needed for new version) grails-app/controllers/.../UrlMappings.groovy -- custom URLs This work is licensed under a Creative Commons Attribution 3.0 Australia License

  8. Plugins Plugins allow the client application to override/customise functionality and still allow changes to core changes to be maintained Break large app into smaller parts Common components Third party plugins Grails plugins and applications are mostly the same - minor differences in a few files but directory structure is the same Client app only needs to implement files that are different to the plugin, all other files are inherited May need to break large GSP files into smaller include files (e.g. _advanced.gsp) This work is licensed under a Creative Commons Attribution 3.0 Australia License

Related


More Related Content