This document outlines an agenda for a Grails beginners workshop. It includes installing Grails, an introduction to Grails, creating a sample conference application, and exercises. The sample application allows attendees to register for talks and rate them. Domain classes are created for Attendee, Talk, and Rating with relationships. Services are introduced to move logic from controllers. Taglibs, assets, styling with Bootstrap, and layouts are also covered.
This document discusses how Groovy fits into various roles in cloud computing. It begins with an introduction to the author and their background in cloud and DevOps tooling. It then outlines how Groovy can be used for microservices with Ratpack, immutable infrastructure, packaging with Gradle, automating builds with Jenkins, managing cloud infrastructure with Spinnaker, automating server tasks with Groovy scripts and SSH, and more. The document also advertises an upcoming talk covering these topics in more detail.
The document discusses various aspects of developing Grails plugins, including creating and installing plugins, understanding a plugin's structure, providing basic artifacts like controllers and views, accessing the application's artifacts from within a plugin, hooking into runtime configuration, adding dynamic methods, participating in auto reload events, and understanding plugin load order.
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...Daniel Oh
The document discusses DevOps and the use of containers and Docker for building and deploying applications. It describes how traditionally infrastructure and applications were separate domains managed by different teams, but with DevOps these are combined. Docker allows building each component of an application as a separate containerized microservice that can be linked and deployed together. The document provides examples of using Docker commands to build and run containers for different tiers of an application and linking them together. It promotes trying OpenShift as a hosted container application platform for implementing DevOps.
GitHub Integration for Orangescrum Cloud Released!Orangescrum
Orangescrum now integrates with GitHub, allowing users to create, collaborate on, and manage GitHub issues directly from Orangescrum or GitHub. This integration syncs task title, description, comments, and status between the two platforms. Users can choose between one-way or two-way sync and syncing is done automatically. The integration allows users to manage GitHub issues in one place, keep tasks and issues up to date in real-time, and improve collaboration.
Deploy With Codefresh to Kubernetes in 3 stepsJenny Passi
This document provides a 3-step process for deploying an application to Kubernetes using Codefresh and Google Kubernetes Engine (GKE).
Step 1 is to add the Kubernetes cluster to Codefresh.
Step 2 is to deploy containers, demonstrated using a demo chat application with both public and private services deployed to the cluster.
Step 3 is to automate deployments by adding a deployment step to the Codefresh pipeline.
This document summarizes different approaches for using the Go programming language to build Android applications. It discusses building a pure Go app using the NativeActivity class, integrating Go as a library using bindings, and spawning separate Go processes from an Android app using inter-process communication. Code examples are provided for each approach. While Go support for Android is still unstable, these techniques allow Go to be used for simple Android projects as an alternative to Java.
The document discusses how to create a Progressive Web App (PWA) using Kotlin. It provides steps to create a project, add HTML and Kotlin files, and configure the build process. It also explains key components of PWAs, including adding a manifest, implementing a service worker for offline functionality, and enabling push notifications. The document stresses the importance of testing PWAs using tools like Lighthouse and getting user feedback.
Here are 3 sentences summarizing the key points from the document:
The document provides 7 tips for developing OSGi applications with Eclipse and Tycho including adopting a modular structure with bundles and features, generating version qualifiers with Git, using target platforms for dependency management, leveraging Maven repositories for modular builds and aggregation, avoiding overuse of the Maven parent POM, and setting up build chains that include unit testing. It encourages learning about Maven concepts and adopting best practices for project structure when building OSGi applications.
This document discusses creating a jQuery plugin for enhancing file inputs with unit testing using Jasmine. It covers creating the plugin, adding styling and custom buttons, maintaining chainability, setting up the Jasmine framework for testing, writing fixture and expectation tests, and organizing the final code structure. The document also provides resources for learning more about authoring jQuery plugins and the Jasmine testing framework.
[WroclawJUG] Continuous Delivery in OSS using ShipkitMarcinStachniuk
Shipkit is a framework that helps automate continuous delivery of open source software projects. It allows developers to easily manage releases by automatically bumping versions, generating release notes, creating tags, and publishing releases when code is merged to master. Shipkit integrates with Travis CI to run release tasks like tests and publication. It aims to reduce the manual work of releases so developers can focus on coding.
React is a UI library developed at Facebook to facilitate the creation of interactive, stateful & reusable UI components. It is used at Facebook in production, and Instagram.com is written entirely in React.
The document discusses the benefits of using Gradle over other build tools like Eclipse, Ant, and Maven. Gradle combines features from Ant like flexibility with Maven's lifecycle and ease of use. It uses Groovy for its build scripts and supports plugins, dependencies, and conventions over configuration similar to Maven. Gradle allows building multiple projects with dependencies and supports composite builds that include other complete builds. The document provides examples of using Gradle with Java, web, and multi-project builds.
Do you know how Continuous Delivery of Java Open Source libraries looks? How big is your release overhead? Do you update release notes and include contributors manually? How do you handle versioning? Do you use semantic versioning?
During this workshop, you will learn how to set up Continuous Delivery for your library. You’ll never have to manually release new versions again. We will use the following tools: GitHub, TravisCI, Bintray, Maven Central. We will glue everything using Shipkit.org - a project born from Mockito (and still used there). You’ll additionally learn SerVer.
This workshop is mostly for Java open source and Gradle plugins developers. We will use a library prepared especially for this training, so no worries if you don’t have your own open source project (yet).
Prerequisites: GitHub account, Java & Gradle basics.
The document summarizes Ratpack, an open source web framework for the JVM. It provides an overview of Ratpack's features such as its non-blocking architecture, support for templates, microservices, HTTP client, metrics, and more. It describes Ratpack's execution model using promises to provide deterministic processing for asynchronous code. The document also covers Ratpack's use of registries for dependency injection and blocking support.
The document summarizes recent efforts and the roadmap for Gradle, an open-source build automation tool. It discusses highlights since Gradle 2.0 such as sharing configuration files across builds and parallel compilation support. It also covers upcoming features like a shared build cache and further native build support. A demo is presented on BuildShip, a new Eclipse plugin for Gradle, as well as ongoing work to optimize configuration time and dependency management.
The document discusses using Golang for mobile application development. It provides an example of building a pure Golang Android app without Java by compiling Golang code to a shared object library and using the NativeActivity. It also provides an example of using Golang as a library in a Java Android app by generating bindings between Golang and Java code. Additionally, it proposes an approach for running a standalone Golang process on Android by cross-compiling Golang code to ARM/Linux and executing it from an Android app.
Using The EGit Eclipse Plugin With Git Hubguest4bce3214
The document is a tutorial on using the EGit Eclipse plugin to connect Eclipse projects to GitHub repositories. It describes how to install EGit, import existing projects from GitHub, upload Eclipse projects to GitHub, and perform Git operations like committing and pushing changes from within Eclipse.
Google在2013開始導入Gradle工具作為新的Android build system,Gradle的使用正是實踐DevOps的良好利器,除了方便進行automated building外, Gradle更幫助我們消弭不同開發環境/工具間的差異問題,如同infarsture as code之於web application/service的重要性,build script as code就是幫助Android App快速發佈版本並維持品質穩定的關鍵最後一哩路。
此次主題將探討如何利用gradle進行精實良好的系統開發配置管理,建立一條下達開發者本地端上通產品發佈系統的透明化產品開發流水線。你是否常常一個App剛發佈不久,下一個idea已經生成,舊程式需要繼續維護同時又要添加新功能,你的開發方法是否能讓多方產品流水線順暢運行而且並行不悖?妥善利用Gradle並深入理解Build by convention的內涵是最好的選擇。
The document discusses deploying dockerized applications on Kubernetes. It begins with an overview of different deployment methods from manual to fully automated using containers and orchestrators like Docker and Kubernetes. It then focuses on how Docplanner uses Docker and Kubernetes in practice, including creating Dockerfiles, building docker images in a CI/CD pipeline, and deploying to Kubernetes with configurations like deployments, services, ingress, secrets and volumes. The presentation ends with discussing developer workflows and questions.
Griffon: Re-imaging Desktop Java TechnologyJames Williams
Griffon is a desktop framework for Java Swing leveraging the dynamic language Groovy and values convention over configuration.
Presented at Devoxx 2008
A presentation for the Vancouver Island Java User's Group showcasing how Groovy and the Griffon application framework can ease the pain of coding Swing applications.
These are the slides for a talk/workshop delivered to the Cloud Native Wales user group (@CloudNativeWal) on 2019-01-10.
In these slides, we go over some principles of gitops and a hands on session to apply these to manage a microservice.
You can find out more about GitOps online https://www.weave.works/technologies/gitops/
This document discusses why Gradle is a useful build tool. It provides automation, repeatability, and efficiency for software builds. Gradle models builds as a directed acyclic graph (DAG) of tasks, allowing any build process to be represented. It handles common conventions but also allows custom tasks when needed. Gradle aims to fully automate builds, make them repeatable across environments, and only re-execute tasks when necessary to improve efficiency.
Gitlab ci e kubernetes, build test and deploy your projects like a prosparkfabrik
This document discusses using GitLab CI and Kubernetes together for continuous integration, delivery, and deployment. It provides an overview of Kubernetes and GitLab, describes how to set up a GitLab runner using the Kubernetes executor, and provides an example YAML configuration. It also covers continuous deployment workflows, running GitLab on Kubernetes, and some tips and tricks as well as techniques for troubleshooting Kubernetes and GitLab CI/CD pipelines.
Javascript can be used to develop applications and interfaces for the GNOME desktop environment. GNOME 3 introduced the GNOME Shell, which uses Javascript and the GObject Introspection system to interface GNOME libraries. GObject Introspection extracts metadata from C libraries to make them accessible from Javascript via bindings. This allows Javascript programs to import and use functionality from GNOME libraries. There are two engines for running GNOME Javascript code: GJS, which uses Mozilla's Spidermonkey, and Seed, which uses Apple's JavascriptCore. Both provide access to GNOME libraries but have some differences. Tools and documentation are still works in progress areas as GNOME Javascript continues to evolve.
Introduction to Gradle in 45min as done at JBCN 2016. Covers the basics of Gradle for people familiar with other build tools. Includes building Java, Scala, Groovy & Kotlin projects
Docman - The swiss army knife for Drupal multisite docroot management and dep...Aleksey Tkachenko
Docman is a tool for managing multisite Drupal installations across repositories and environments. It uses a configuration system and Git-based workflows to build and deploy Drupal sites. Docman addresses issues with multisite development like code separation, standards enforcement, and deployment automation. It is focused on cloud hosting and supports continuous integration/delivery. Docman provides commands to initialize projects, build environments, and bump versions across repositories.
Flutter vs Java Graphical User Interface Frameworks - textToma Velev
Flutter and Java are compared for GUI development. Both support common layouts like rows, columns and flex boxes. Flutter has material widgets that mimic Android and iOS while Java has Swing/AWT for desktop. Both support common components like text fields, radio buttons, sliders. Key differences are Flutter targets mobile/web while Java targets desktop primarily. Flutter uses widgets for reactive UIs while Java uses MVC/MVP frameworks.
This document provides an overview of how to configure various aspects of a Gradle build, including:
1. Configuring an Eclipse project from the build file using the eclipse plugin
2. Configuring a Jenkins job from the build file using the Gradle Jenkins plugin
3. Configuring the release process using the gradle-release plugin
It also discusses best practices for publishing Gradle plugins and storing secure information in Gradle builds.
Building Instruqt, a scalable learning platformInstruqt
On February 15th I gave a talk on how we built Instruqt. We use Kubernetes, Terraform and Google Cloud, and in my talk I explain the benefits of using these tools and services correctly.
This document provides an overview of version control and Git workflows. It discusses how Git and GitHub are commonly used for version control and code collaboration. Various Git workflows like feature branching and release blocking are presented along with use cases. The document also demonstrates GitHub features like branches, flows, and code reviews which help developers collaborate through the GitHub platform.
The Duck Teaches Learn to debug from the masters. Local to production- kill ...ShaiAlmog1
The document outlines an agenda for a workshop on debugging techniques. The workshop covers installing tools, flow and breakpoints debugging, watching variables, Kubernetes debugging, and developer observability. Key techniques discussed include tracepoints, memory debugging, exception breakpoints, object marking, and logs, snapshots, and metrics for observability. The goal is to teach practical debugging skills that can be applied at scale in production environments like Kubernetes.
Gerrit Code Review: how to script a plugin with Scala and GroovyLuca Milanesio
This document discusses scripting plugins for Gerrit code review. It describes how plugins can now be written in Groovy or Scala by creating a simple class file and placing it in the plugins directory. This allows defining new SSH commands or REST APIs with just a few lines of code. The document outlines several examples including creating branches, listing projects, and validating commit messages. It announces plans to further develop scripting plugin support at the next Gerrit hackathon with the goal of merging it into the core Gerrit codebase.
The document discusses the benefits of using Gradle over other build tools like Maven and Ant. It states that Gradle makes the impossible possible, the possible easy, and the easy elegant. It then provides examples of Gradle's compelling features like convention over configuration, dependency management, flexibility, extensibility, integration with other tools, and the ability to perform tasks like compilation, testing, deployment in a build pipeline. The document aims to convince readers to use Gradle for their builds by highlighting its advantages.
ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 VueJS cod...Gavin Pickin
For a long time, some frontend Javascript frameworks have helped you with one or two styles of Apps, but Quasar is an amazing new VueJS framework that allows you to build Single Page Apps (SPA), Server-side Rendered Apps (SSR), Progressive Web Apps (PWA), Mobile Apps (Android and IOS) through Cordova as well as Multi-platform Desktop Apps using Electron. With the Quasar CLI, you can quickly start a project, and have a single code base that can output multiple formats, as needed. Come to this session and find out how.
Presented at Into the Box 2019
Javaone - Gradle: Harder, Better, Stronger, Faster Andres Almiray
This document discusses Gradle, an open-source build automation tool for multi-language software development. It provides an overview of what Gradle is, why developers use it, and how to get started with basic Gradle builds. Key points include that Gradle uses conventions over configuration, supports multiple programming languages and build scenarios, and provides features like caching and daemonization for faster, more reproducible builds.
Gradle is an open-source build automation tool focused on flexibility, build reproducibility and performance. Over the years, this tool has evolved and introduced new concepts and features around dependency management, publication and other aspects on build and release of artifacts for the Java platform.
Keeping up to date with all these features across several projects can be challenging. How do you make sure that all your projects can be upgraded to the latest version of Gradle? What if you have thousands of projects and hundreds of engineers? How can you abstract common tasks for them and make sure that new releases work as expected?
At Netflix, we built Nebula, a collection of Gradle plugins that helps engineers remove boilerplate in Gradle build files, and makes building software the Netflix way easy. This reduces the cognitive load on developers, allowing them to focus on writing code.
In this talk, I’ll share with you our philosophy on how to build JVM artifacts and the pieces that help us boost the productivity of engineers at Netflix. I’ll talk about:
- What is Nebula
- What are the common problems we face and try to solve
- How we distribute it to every JVM engineer
- How we ensure that Nebula/Gradle changes do not break builds so we can ship new features with confidence at Netflix
YouTube SEO Mastery ......................islamiato717
### Introduction
#### The Importance of YouTube SEO
In the digital age, video content has emerged as a dominant force, capturing the attention of billions of people worldwide. YouTube, the second largest search engine after Google, plays a crucial role in this landscape. With over 2 billion logged-in monthly users and more than a billion hours of video watched each day, YouTube is a platform of immense potential for content creators, businesses, and influencers alike.
However, simply uploading videos isn't enough to harness this potential. To stand out amidst the vast sea of content, your videos must be discoverable. This is where YouTube SEO (Search Engine Optimization) comes into play. YouTube SEO is the practice of optimizing your videos, playlists, and channel to rank higher in YouTube's search results, thereby increasing visibility and attracting more viewers.
Understanding and implementing YouTube SEO is not just about getting more views; it's about reaching the right audience. By ensuring your content appears in relevant searches, you can connect with viewers who are genuinely interested in your message, products, or services. This targeted approach can lead to higher engagement, more subscribers, and ultimately, greater success on the platform.
#### Why SEO Matters for YouTube
Search Engine Optimization (SEO) has long been a critical component of online success, predominantly associated with websites and Google searches. However, its principles are equally vital for video content. YouTube’s algorithm considers various factors when ranking videos, including relevance, engagement, watch time, and click-through rate (CTR). By understanding and leveraging these factors, you can improve your video's position in search results and recommended lists.
High-ranking videos are more likely to be seen, clicked on, and watched. This visibility not only boosts your immediate views but also contributes to long-term growth. As your channel gains traction, the algorithm rewards you with more exposure, creating a positive feedback loop that can propel you to new heights.
#### The Impact of High-Ranking Videos on Business and Personal Brands
For businesses, a well-executed YouTube SEO strategy can drive traffic to your website, increase product awareness, and enhance customer engagement. Video content allows you to showcase products, provide tutorials, and share customer testimonials in a compelling and easily digestible format. High-ranking videos can lead to higher conversion rates and ultimately, more sales.
For personal brands and influencers, visibility on YouTube translates to greater influence and authority within your niche. It opens up opportunities for sponsorships, collaborations, and monetization. As you build a loyal audience, you can leverage this platform to expand your reach and establish yourself as a thought leader.
#### Overview of YouTube SEO
This book is designed to be a comprehensive guide to mastering YouTube SEO. We will
Discover BoxLang, the innovative JVM programming language developed by Ortus Solutions. Designed to harness the power of the Java Virtual Machine, BoxLang offers a modern approach to application development with robust performance and scalability. Join us as we explore the capabilities of BoxLang, its syntax, and how it enhances productivity in software development.
Explore the latest in ColdBox Debugger v4.2.0, featuring the Hyper Collector for HTTP/S request tracking, Lucee SQL Collector for query profiling, and Heap Dump Support for memory leak debugging. Enhancements like the revamped Request Dock and improved SQL/JSON formatting streamline debugging for optimal ColdBox application performance and stability. Ideal for developers familiar with ColdBox, this session focuses on leveraging advanced debugging tools to enhance development efficiency.
Non-Functional Testing Guide_ Exploring Its Types, Importance and Tools.pdfkalichargn70th171
Are you looking for ways to ensure your software development projects are successful? Non-functional testing is an essential part of the process, helping to guarantee that applications and systems meet the necessary non-functional requirements such as availability, scalability, security, and usability.
What is OCR Technology and How to Extract Text from Any Image for FreeTwisterTools
Discover the fascinating world of Optical Character Recognition (OCR) technology with our comprehensive presentation. Learn how OCR converts various types of documents, such as scanned paper documents, PDFs, or images captured by a digital camera, into editable and searchable data. Dive into the history, modern applications, and future trends of OCR technology. Get step-by-step instructions on how to extract text from any image online for free using a simple tool, along with best practices for OCR image preparation. Ideal for professionals, students, and tech enthusiasts looking to harness the power of OCR.
Sami provided a beginner-friendly introduction to Amazon Web Services (AWS), covering essential terms, products, and services for cloud deployment. Participants explored AWS' latest Gen AI offerings, making it accessible for those starting their cloud journey or integrating AI into coding practices.
Lots of bloggers are using Google AdSense now. It’s getting really popular. With AdSense, bloggers can make money by showing ads on their websites. Read this important article written by the experienced designers of the best website designing company in Delhi –
A captivating AI chatbot PowerPoint presentation is made with a striking backdrop in order to attract a wider audience. Select this template featuring several AI chatbot visuals to boost audience engagement and spontaneity. With the aid of this multi-colored template, you may make a compelling presentation and get extra bonuses. To easily elucidate your ideas, choose a typeface with vibrant colors. You can include your data regarding utilizing the chatbot methodology to the remaining half of the template.
In this session, we discussed the critical need for comprehensive backups across all aspects of our industry—from code and databases to webservers, file servers, and network configurations. Emphasizing the importance of proactive measures, attendees were urged to ensure their backup systems were tested through restoration processes. The session underscored the risk of discovering backup issues only during crises, highlighting the necessity of verifying backup integrity through restoration tests.
Major Outages in Major Enterprises Payara ConferenceTier1 app
In this session, we will be discussing major outages that happened in major enterprises. We will analyse the actual thread dumps, heap dumps, GC logs, and other artifacts captured at the time of the problem. After this session, troubleshooting CPU spikes, OutOfMemoryError, response time degradations, network connectivity issues, and application unresponsiveness may not stump you.
Drona Infotech is one of the best Mobile App Development Company in Noida. Elevate your business with our professional app development services. Let us help you create user-friendly and high-performing mobile applications.
Visit Us For: https://www.dronainfotech.com/mobile-application-development/
3. JACOB AAE MIKKELSEN
Senior Engineer at Lego
Microservice based architechture on JVM
Previously 4 years at Gennemtænkt IT
Consultant on Groovy and Grails
External Associate Professor - University of Southern
Denmark
@JacobAae
Blogs The Grails Diary
5. USB WITH MATERIAL
On the USB Sick passed around, the following materials are
available
These slides
Git repository with Grails application
Grails
IntelliJ editor
Bootstrap files
6. MAC & LINUX
Use Gvm tool
curl s get.gvmtool.net | bash
Restart terminal
gvm install grails 3.0.1
7. WINDOWS
Option 1: Use GVM Tool in Cygwin
Option 2: Use Posh-GVM in Powershell
( )https://github.com/flofreud/posh-gvm
Option 3 Download Grails, and setup GRAILS_HOME
(
)
http://grails.asia/grails-tutorial-for-beginners-setup-your-
windows-development-environment/
8. GRAILS INTRO
Grails is a full stack framework
-
Embrace the Don’t Repeat Yourself (DRY) principle
-
Encourages proper testing
-
Use the Groovy language and extensive use of Domain
Specific Languages (DSLs)
9. INCLUDED WITH GRAILS
Object Relational Mapping (ORM) layer → Hibernate
Expressive view technology → Groovy Server Pages (GSP)
Controller layer → Spring MVC
Interactive command line env and build system → Gradle
Embedded Tomcat container with on the fly reloading
Dependency injection → Spring container
i18n → Spring’s core MessageSource concept
Transactional service layer → Spring’s transaction
abstraction
10. LATEST VERSION: 3.0.1
Groovy 2.4
Spring 4.1 and Spring Boot 1.2
Gradle Build System
Application Profiles
Redesigned API based on Traits
Filters → Interceptors
Main class → Easy to run from any IDE
11. APPLICATION SCENARIO
Lets make a small conference application that can
keep track at what talks and workshops you have
attended
let attendees rate and supply feedback
12. MODEL
We need 3 domain classes in this small application
Attendee
Talk
Rating
16. FUNCTIONALITY
Attendees must be able to register which talks he
attended
An attendee must be able to rate a talk from 1-5 and
submit a comment too
A list of comments and an average grade must be
available when vieving a talk
17. STEP 1: CREATING THE APPLICATION
To create a new Grails Application, run the grails
create-appcommand in a terminal
grails createapp eugr8confgrailsdemo
Lets go through the tree view of whats generated
You don’t have to do the above step, if you clone this
repo - then it is all done :)
git clone https://github.com/JacobAae/eugr8confgrailsdemo.git
25. STEP 2: FIRST DOMAIN CLASS
Lets create the first domin class with controller and views:
Attendee
26. CREATING THE DOMAIN CLASS
In interactive mode
createdomainclass eu.gr8conf.grailsdemo.Attendee
Resulting in
| Created grails-app/domain/eu/gr8conf/grailsdemo/Attendee.groovy
| Created src/test/groovy/eu/gr8conf/grailsdemo/AttendeeSpec.groovy
28. PROPERTIES AND CONSTRAINTS
Edit the Attendee class to contain
String name
String email
String nationality
Date dateCreated
Date lastUpdated
static constraints = {
name blank: false
email blank: false, unique: true, email: true
nationality nullable: true
}
30. TESTING
Here is an example of a test for constraints that are violated
@Unroll
void "Test invalid properties for attendee: #comment"() {
when:
Attendee attendee = new Attendee(name: name,
email: email, nationality: nationality)
then:
!attendee.validate()
where:
name | email | nationality | comment
'' | 'jacob@gr8conf.org' | 'Danish' | 'Blank name'
}
INFO: Lets add positive and more negative tests for the
constraints.
31. CONTROLLER AND VIEWS
In interactive mode
generateall eu.gr8conf.grailsdemo.Attendee
And run the app again - and click the controller
36. CONTROLLERS
A controller handles requests and creates or prepares the
response
Business logic placed elsewhere (services)
Placed in controller folder and ends in Controller
Methods → actions
Databinding
37. VIEWS AND TEMPLATES
Made with Groovy Server Pages (GSP)
Extensive suite of tags
formatting
looping
input fields
38. CONTROLLERS AND VIEWS
Problem: Lets make a new Display Attendee page, where we
can see talks attended better.
What to do:
Make a displayaction in the AttendeeController
Add a display.gspview
add link to the new display or replace the show action
We could also rewrite the show action :)
42. EXERCISES
Make a link for each talk to go to an add rating page
Implement the add rating functionality
43. STEP 4: SERVICES
The default code leaves too much logic in the controller, this
should be in a service, that also should handle transactions
etc.
Lets try to cleanup the attendee controller and place some
of the logic in a service
46. USING SERVICES - AUTOINJECTION
In the AttendeeController, where we will use the service, all
we need to do, is add this line
AttendeeService attendeeService
Then it will be autoinjected because Grails recognices the
name
48. HELPER CLASSES
In src/main/groovyyou can place helper classes, or
non-Grails-artefacts
class Result {
def item
Status status
}
enum Status {
OK,
NOT_FOUND,
HAS_ERRORS
}
49. SERVICE METHOD
The service method could look like
Result saveAttendee(Attendee attendee) {
if (attendee == null) {
transactionStatus.setRollbackOnly()
return new Result(status: Status.NOT_FOUND)
}
if (attendee.hasErrors()) {
transactionStatus.setRollbackOnly()
return new Result(status: Status.HAS_ERRORS, item: attendee)
}
attendee.save flush:true
return new Result(status: Status.OK, item: attendee)
}
65. FIXING ICONS
In bootstrap.css, update the path to Glyphicons font
(line 267++)
views/attendee/display.gsp
@fontface {
fontfamily: 'Glyphicons Halflings';
src: url('../assets/fonts/glyphiconshalflingsregular.eot');
src: url('../assets/fonts/glyphiconshalflingsregular.eot?#iefix') for
}