The document discusses modularizing a Grails application using private plugins. It covers Grails plugin development basics like creating a new plugin, the plugin descriptor file, excluded files, running and packaging a plugin. It also discusses application architecture with private plugins, including moving common functionality into plugins to avoid forking code.
The document discusses plugins in Grails. It covers what a plugin is, the directory structure of plugins, common types of plugins, and implementation details like using the GrailsApplication object, configuring Spring, adding dynamic methods, and reloading on changes. The document is intended to teach plugin developers best practices for creating plugins in Grails.
This document summarizes a presentation about building mobile web apps with Grails. It introduces Grails, a web framework that can help with resource handling, caching, and deploying apps to the cloud. It also discusses jQuery Mobile, a library that can be used to build responsive web apps. The presentation recommends using the jQuery Mobile Client Scaffolding and PhoneGap Build plugins with Grails to generate HTML5 apps and native packages.
SpringOne 2021
Session Title: A Tour of the Modern Java Platform
Speakers: Bruce Eckel, President at Mindview LLC; James Ward, Developer Relations Engineer at Google Cloud
Jakarta EE is an open source Java platform that provides a wide range of APIs for building enterprise applications. It is made up of specifications covering areas like web services, security, and object-relational mapping. The document discusses the history and evolution of Jakarta EE, its relationship to other technologies like Spring and MicroProfile, and its importance for businesses, careers, and the Java ecosystem. It also outlines proposals for future versions like Jakarta EE 10 that aim to improve areas like security, messaging, and NoSQL support.
The document discusses adopting Grails for web application development. It summarizes several episodes or lessons learned:
1. GORM constraints were ignored when domain classes were loaded by a shared classloader rather than the Grails classloader. The constraints had to be extracted to a shared library.
2. Using BlazeDS for Flex communication caused data objects to lose field values after round trips. DTOs and mapping tools like Dozer were needed.
3. Web services should treat the UI as another automation client to avoid duplicating XML flows. Domain data can be mapped to XML in GSPs without DTOs.
4. When domain classes were no longer stored in the database, meta-
The document discusses various JVM web frameworks including Play, Ratpack, Spring Boot, and Rails. It provides code examples for templating, databases, servers, and other aspects of each framework. It compares the strengths and weaknesses of frameworks like Play, Ratpack, and Spring Boot. It emphasizes that modern JVM web development uses languages like Scala, Groovy, JRuby and Clojure rather than traditional Java web apps with WAR files. The document encourages the audience to pick a framework like Play, Ratpack or Rails and provides the basic commands to create a new project in each.
Play vs Grails Smackdown - Devoxx France 2013Matt Raible
Play and Grails are Java web frameworks that aim to enhance developer experience. The author developed the same application using both frameworks to compare their features. Some key differences included:
- Database configuration and schema generation were simpler in Grails using GORM, while Play used EBean and evolutions.
- URL mapping was defined in a Groovy file in Grails, and a routes file in Play.
- Grails used Groovy Server Pages for views with tags, while Play used Scala templates.
- Both supported features like validation, jobs, feeds, and email, but implementations differed, such as using plugins in Grails and direct APIs in Play.
- Testing was supported through plugins
The document summarizes the experience of a Grails startup called Secret Escapes over its first year, including:
- Secret Escapes is a members-only travel site founded in late 2010 that has grown to over 1 million users.
- The initial Grails application included a CMS and storefront across two servers, with a focus on deployability, basic functionality, and third party integration.
- After launching, they continued expanding features like booking options and integrating services like Facebook and Google Analytics.
- They improved development processes around testing, deployment, and team collaboration over the first year.
Sebastien Thomas, System Architect at Coyote Amerique, gave a presentation on operator frameworks. His talk covered how Operator SDK can be used to create Kubernetes Operators with Go.
This presentation was held at the Spring One 2GX 2015 conference in Washington DC.
The presentation explains how to migrate an existing Grails 2 application to the new Spring Boot and Gradle based Grails 3. It covers migrating plugins, applications and features gotchas as well as best praciteces.
The conference presentation also included an extensive live coding section in which I migrated an existing application to Grails 3.
This document provides an overview of Ratpack, an open-source web framework for Java and Groovy applications. It summarizes Ratpack's key features including its non-blocking and high performance architecture using Netty, support for Groovy and Java, integration with build tools like Gradle, and handler-based routing model. The document also discusses how Ratpack handles asynchronous operations, blocking operations, and real-time capabilities like server-sent events.
Dropwizard is a Java framework that provides tools for building RESTful web services. It bundles several popular Java libraries - like Jersey for JAX-RS, Jetty as an embedded HTTP server, Jackson for JSON processing, Metrics for monitoring, and Hibernate Validator - into an easy to use package. Dropwizard makes it simple to build robust, production-ready REST APIs without needing a separate application server. The framework also makes it easy to integrate with Spring for dependency injection. Overall, Dropwizard provides a best-of-breed toolkit for building RESTful services in Java.
CDI portable extensions are one of greatest features of Java EE allowing the platform to be extended in a clean and portable way. But allowing extension is just part of the story. CDI opens the door to a whole new eco-system for Java EE, but it’s not the role of the specification to create these extensions.
Apache DeltaSpike is the project that leads this brand new eco-system by providing useful extension modules for CDI applications as well as tools to ease the creation of new ones.
In this session, we’ll start by presenting the DeltaSpike toolbox and show how it helps you to develop for CDI. Then we’ll describe the major extensions included in DeltaSpike, including 'configuration', 'scheduling' and 'data'.
Spring Boot on Amazon Web Services with Spring Cloud AWSVMware Tanzu
SpringOne 2021
Session Title: Spring Boot on Amazon Web Services with Spring Cloud AWS
Speakers: Maciej Walkowiak, Software Consultant at Independent; Matej Nedic, Software engineer at Ingemark
Gradle is a general-purpose build automation tool. It combines the power and flexibility of Ant with the dependency management and conventions of Maven into a more effective way to build. Its powered by Groovy DSL. Presentation discusses what and why Gradle with demo for java, groovy, web, multi-project and grails projects.
High Performance Microservices with Ratpack and Spring BootDaniel Woods
This document provides an overview of using Ratpack and Spring Boot to build high performance microservices. It discusses Ratpack's asynchronous and non-blocking execution model which uses promises to deterministically process asynchronous calls. It describes how Ratpack uses registries for dependency injection which can integrate with Spring Boot. It presents an example microservice application and includes performance numbers from testing on cloud infrastructure showing how much burst traffic can be sustained.
Apache Lucene is the de-facto standard open source library for Java developers to implement full-text-search capabilities.
While it’s thriving in its field, it is rarely mentioned in the scope of Java EE development.
In this talk we will see for which features many developers love Lucene, make some concrete examples of common problems it elegantly solves, and see some best practices about using it in a Java EE stack.
Finally we'll see how some popular OSS projects such as Hibernate ORM (JPA provider), WildFly (Java EE runtime) and Infinispan (in-memory datagrid, JCache implementor) actually provide great Lucene integration capabilities.
An Operator is an application that encodes the domain knowledge of the application and extends the Kubernetes API through custom resources. They enable users to create, configure, and manage their applications. Operators have been around for a while now, and that has allowed for patterns and best practices to be developed.
In this talk, Lili will explain what operators are in the context of Kubernetes and present the different tools out there to create and maintain operators over time. She will end by demoing the building of an operator from scratch, and also using the helper tools available out there.
Cloud Foundry is an open platform as a service that allows developers to deploy and scale applications in seconds without locking themselves into a single cloud. It provides choice of development frameworks, deployment clouds, and application services. Cloud Foundry uses BOSH for release engineering, deployment, and lifecycle management of large, distributed cloud services across multiple infrastructure providers.
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012Patrick Chanezon
Cloud Foundry is an open platform as a service that allows developers to deploy and scale applications in seconds without locking themselves into a single cloud. It provides developer agility by allowing them to focus on writing applications without worrying about middleware and infrastructure. Cloud Foundry also offers portability without requiring code changes to deploy applications across private and public clouds. The open source project is community-driven and offers choices in frameworks, services, and deployment targets.
Introducing the Cloud4all/GPII Architecture presentation by Antranig Basman & Colin Clark at ICCHP - International Conference on Computers Helping People with Special Needs in Linz, Austria.
Gradle is a flexible, general-purpose build automation tool that improves upon existing build tools like Ant, Maven, and Ivy. It uses Groovy as its configuration language, allowing builds to be written more clearly and concisely compared to XML formats. Gradle aims to provide the flexibility of Ant, the dependency management and conventions of Maven, and the speed of Git. It handles tasks, dependencies, plugins, and multiproject builds. Gradle configurations map closely to Maven scopes and it has good support for plugins, testing, caching, and integration with tools like Ant and Maven.
This document discusses lessons learned from building JavaScript applications. It finds that client-side JavaScript is very challenging due to the need to support multiple browsers. It recommends using a framework like Backbone.js and keeping business logic in common code. Multi-platform HTML and CSS are also difficult due to varying browser support for CSS3 and media queries. The document notes that app stores present challenges different than websites, like inability to deploy hotfixes. It finds Node.js very capable but callbacks can be tricky. Overall it emphasizes planning for variations in browsers and platforms.
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
Platform Engineering for the Modern Oracle WorldSimon Haslam
DevOps has become the de facto approach for custom software delivery. Yet, if automation is claimed to be the answer to all ills, why do many organisations struggle to implement it well? This session reflects on experiences from the last decade or so of provisioning projects, highlighting lessons (and one or two regrets!) and considers how organisations building custom software should focus their Oracle platform engineering efforts to deliver better software to users, faster.
The document discusses adopting the Grails web application framework. It describes several episodes that a company experienced in using Grails in production applications. Episode 1 discusses how GORM constraints were ignored when domain classes were shared between applications. Episode 2 describes issues mapping domain objects to Flex classes. Episode 3 provides recommendations for designing web services for both user interfaces and automation. Episode 4 discusses enhancing meta-classes when domain classes were no longer stored in the database. Episode 5 offers suggestions for improving developer support. Episode 6 shows how to leverage functionality across applications by extracting shared services into plugins. The summary provides best practices including clearly communicating benefits, maintaining coding guidelines, and staying close to Grails strengths.
CloudFoundry and MongoDb, a marriage made in heavenPatrick Chanezon
This talk will provide an overview of the PaaS (Platform as a Service) landscape, and will describe the Cloud Foundry open source PaaS, with its multi-framework, multi-service, multi-cloud model. Cloud Foundry allows developers to provision apps in Java/Spring, Ruby/Rails, Ruby/Sinatra, Javascript/Node, and leverage services like MySQL, MongoDB, Reddis, Postgres and RabbitMQ. It can be used as a public PaaS on CloudFoundry.com and other service providers (ActiveState, AppFog), to create your own private cloud, or on your laptop using the Micro Cloud Foundry VM. Micro Cloud Foundry is a very easy way for developers to start working on their application using their framework of choice and MongoDB, without the need to setup a development environment, and your app is one command line away (vmc push) from deployment to cloudfoundry.com.
Use Cases of #Grails in Web Applications
- Type of applications most appropriate to be developed in Grails
- Type of applications where Grails may not be the best choice
- Experiences with Grails during several web application development projects
Enhancing Spring MVC Web Applications Progressively with Spring JavaScriptJeremy Grelle
This document discusses using Spring JavaScript to integrate Ajax toolkits like Dojo into Spring web applications. It provides an overview of Ajax and different Ajax approaches. Spring JavaScript makes it simple to enhance DOM nodes with new behaviors and styles. It supports rendering page fragments and built-in response types. Advanced techniques include custom response handling, modular JavaScript code, and consuming RESTful services that return JSON.
This document discusses starting Android development from scratch in 2017. It recommends using Kotlin as the language and considering Architecture Components like LiveData and ViewModel. It also discusses options for network layers like GraphQL, gRPC, and REST. The document then covers persistence and caching strategies. It emphasizes treating continuous integration as code using tools like Jenkins Job DSL and Pipelines.
Scala is widely used at Treasure Data for data analytics workflows, management of the Presto query engine, and open-source libraries. Some key uses of Scala include analyzing query logs to optimize Presto performance, developing Prestobase using Scala macros and libraries like Airframe, and integrating Spark with Treasure Data. Treasure Data engineers have also created several open-source Scala libraries, such as wvlet-log for logging and Airframe for dependency injection, and sbt plugins to facilitate packaging, testing, and deployment.
The document discusses the history of IntelliJ IDEA from 2000 to 2013. Some key points include:
- IntelliJ IDEA started as a plugin for JBuilder in 2000 and is now a product line of 8 IDEs, a compiler, and code browser.
- Over the years it has expanded its supported languages like JavaScript, Python, Ruby, and Groovy. New IDEs were also introduced like Android Studio, AppCode, PyCharm, and PhpStorm.
- The development practices focus on continuous integration, releasing early previews, addressing issues quickly, and relying more on automated acceptance tests than unit tests.
- The development model emphasizes flexibility over planning, with developers responsible for
These are my slides from the November BayNode Talk Night. I spoke about our experience moving our NodeJS architecture to Docker and CoreOS as well as some tips/tricks we've learned along the way.
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...Codemotion
Isaac Newton, the father of modern software engineering, called it “Standing on the shoulders of giants”. Modern development is exciting as it gets easier and easier, partly because of the wealth of resources available at our fingertips. One category of these resources are libraries, SDKs, and frameworks. This talk will be a guide into the considerations that go into building a library for both iOS/Swift and Java/Android. We will be taking cues from both my personal experience, as well as from studying how the leaders in the field do it.
Microcontainers and Tools for Hardcore Container DebuggingOracle Developers
The document discusses microcontainers and tools for debugging containers. It begins with introductions of the presenters and an agenda. It then provides information on what containers are, how they work, and common issues. Microcontainers are introduced as a way to reduce image size and security risks. The document demonstrates how to build microcontainers and debug containers using open source tools from Oracle. It concludes with links to more information and a question/answer section.
The document discusses the Naked Objects pattern and how it can be implemented using the Grails web framework. Some key points:
1. The Naked Objects pattern encapsulates business logic in domain objects and generates the user interface automatically from the domain object definitions.
2. Grails is a web framework built on Spring that uses the Naked Objects pattern. It allows developers to focus on business logic rather than integration work.
3. In Grails, domain classes define entities and relationships, and scaffolds generate basic CRUD views and controllers automatically from these definitions.
Gavin Hogan presented on using Grails, a rapid web application development framework built on Groovy and Spring. Some key points:
- Grails leverages Groovy and Spring to provide convention over configuration and generate Spring beans and wiring automatically.
- Object-relational mapping is handled through GORM, which is built on Hibernate. Dynamic finders and validation are also included.
- Views use Groovy Server Pages (GSP) which are similar to JSP. Taglibs allow reusable view components to be created.
- Plugins extend functionality and can package entire aspects like security. The plugin ecosystem contains solutions for many common needs.
Transcript: Details of description part II: Describing images in practice - T...BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and slides: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxSynapseIndia
Your comprehensive guide to RPA in healthcare for 2024. Explore the benefits, use cases, and emerging trends of robotic process automation. Understand the challenges and prepare for the future of healthcare automation
Best Programming Language for Civil EngineersAwais Yaseen
The integration of programming into civil engineering is transforming the industry. We can design complex infrastructure projects and analyse large datasets. Imagine revolutionizing the way we build our cities and infrastructure, all by the power of coding. Programming skills are no longer just a bonus—they’re a game changer in this era.
Technology is revolutionizing civil engineering by integrating advanced tools and techniques. Programming allows for the automation of repetitive tasks, enhancing the accuracy of designs, simulations, and analyses. With the advent of artificial intelligence and machine learning, engineers can now predict structural behaviors under various conditions, optimize material usage, and improve project planning.
7 Most Powerful Solar Storms in the History of Earth.pdfEnterprise Wired
Solar Storms (Geo Magnetic Storms) are the motion of accelerated charged particles in the solar environment with high velocities due to the coronal mass ejection (CME).
Kief Morris rethinks the infrastructure code delivery lifecycle, advocating for a shift towards composable infrastructure systems. We should shift to designing around deployable components rather than code modules, use more useful levels of abstraction, and drive design and deployment from applications rather than bottom-up, monolithic architecture and delivery.
YOUR RELIABLE WEB DESIGN & DEVELOPMENT TEAM — FOR LASTING SUCCESS
WPRiders is a web development company specialized in WordPress and WooCommerce websites and plugins for customers around the world. The company is headquartered in Bucharest, Romania, but our team members are located all over the world. Our customers are primarily from the US and Western Europe, but we have clients from Australia, Canada and other areas as well.
Some facts about WPRiders and why we are one of the best firms around:
More than 700 five-star reviews! You can check them here.
1500 WordPress projects delivered.
We respond 80% faster than other firms! Data provided by Freshdesk.
We’ve been in business since 2015.
We are located in 7 countries and have 22 team members.
With so many projects delivered, our team knows what works and what doesn’t when it comes to WordPress and WooCommerce.
Our team members are:
- highly experienced developers (employees & contractors with 5 -10+ years of experience),
- great designers with an eye for UX/UI with 10+ years of experience
- project managers with development background who speak both tech and non-tech
- QA specialists
- Conversion Rate Optimisation - CRO experts
They are all working together to provide you with the best possible service. We are passionate about WordPress, and we love creating custom solutions that help our clients achieve their goals.
At WPRiders, we are committed to building long-term relationships with our clients. We believe in accountability, in doing the right thing, as well as in transparency and open communication. You can read more about WPRiders on the About us page.
Mitigating the Impact of State Management in Cloud Stream Processing SystemsScyllaDB
Stream processing is a crucial component of modern data infrastructure, but constructing an efficient and scalable stream processing system can be challenging. Decoupling compute and storage architecture has emerged as an effective solution to these challenges, but it can introduce high latency issues, especially when dealing with complex continuous queries that necessitate managing extra-large internal states.
In this talk, we focus on addressing the high latency issues associated with S3 storage in stream processing systems that employ a decoupled compute and storage architecture. We delve into the root causes of latency in this context and explore various techniques to minimize the impact of S3 latency on stream processing performance. Our proposed approach is to implement a tiered storage mechanism that leverages a blend of high-performance and low-cost storage tiers to reduce data movement between the compute and storage layers while maintaining efficient processing.
Throughout the talk, we will present experimental results that demonstrate the effectiveness of our approach in mitigating the impact of S3 latency on stream processing. By the end of the talk, attendees will have gained insights into how to optimize their stream processing systems for reduced latency and improved cost-efficiency.
An invited talk given by Mark Billinghurst on Research Directions for Cross Reality Interfaces. This was given on July 2nd 2024 as part of the 2024 Summer School on Cross Reality in Hagenberg, Austria (July 1st - 7th)
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Bert Blevins
Today’s digitally connected world presents a wide range of security challenges for enterprises. Insider security threats are particularly noteworthy because they have the potential to cause significant harm. Unlike external threats, insider risks originate from within the company, making them more subtle and challenging to identify. This blog aims to provide a comprehensive understanding of insider security threats, including their types, examples, effects, and mitigation techniques.
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...Toru Tamaki
Jindong Gu, Zhen Han, Shuo Chen, Ahmad Beirami, Bailan He, Gengyuan Zhang, Ruotong Liao, Yao Qin, Volker Tresp, Philip Torr "A Systematic Survey of Prompt Engineering on Vision-Language Foundation Models" arXiv2023
https://arxiv.org/abs/2307.12980
Are you interested in dipping your toes in the cloud native observability waters, but as an engineer you are not sure where to get started with tracing problems through your microservices and application landscapes on Kubernetes? Then this is the session for you, where we take you on your first steps in an active open-source project that offers a buffet of languages, challenges, and opportunities for getting started with telemetry data.
The project is called openTelemetry, but before diving into the specifics, we’ll start with de-mystifying key concepts and terms such as observability, telemetry, instrumentation, cardinality, percentile to lay a foundation. After understanding the nuts and bolts of observability and distributed traces, we’ll explore the openTelemetry community; its Special Interest Groups (SIGs), repositories, and how to become not only an end-user, but possibly a contributor.We will wrap up with an overview of the components in this project, such as the Collector, the OpenTelemetry protocol (OTLP), its APIs, and its SDKs.
Attendees will leave with an understanding of key observability concepts, become grounded in distributed tracing terminology, be aware of the components of openTelemetry, and know how to take their first steps to an open-source contribution!
Key Takeaways: Open source, vendor neutral instrumentation is an exciting new reality as the industry standardizes on openTelemetry for observability. OpenTelemetry is on a mission to enable effective observability by making high-quality, portable telemetry ubiquitous. The world of observability and monitoring today has a steep learning curve and in order to achieve ubiquity, the project would benefit from growing our contributor community.
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Chris Swan
Have you noticed the OpenSSF Scorecard badges on the official Dart and Flutter repos? It's Google's way of showing that they care about security. Practices such as pinning dependencies, branch protection, required reviews, continuous integration tests etc. are measured to provide a score and accompanying badge.
You can do the same for your projects, and this presentation will show you how, with an emphasis on the unique challenges that come up when working with Dart and Flutter.
The session will provide a walkthrough of the steps involved in securing a first repository, and then what it takes to repeat that process across an organization with multiple repos. It will also look at the ongoing maintenance involved once scorecards have been implemented, and how aspects of that maintenance can be better automated to minimize toil.
Blockchain technology is transforming industries and reshaping the way we conduct business, manage data, and secure transactions. Whether you're new to blockchain or looking to deepen your knowledge, our guidebook, "Blockchain for Dummies", is your ultimate resource.
UiPath Community Day Kraków: Devs4Devs ConferenceUiPathCommunity
We are honored to launch and host this event for our UiPath Polish Community, with the help of our partners - Proservartner!
We certainly hope we have managed to spike your interest in the subjects to be presented and the incredible networking opportunities at hand, too!
Check out our proposed agenda below 👇👇
08:30 ☕ Welcome coffee (30')
09:00 Opening note/ Intro to UiPath Community (10')
Cristina Vidu, Global Manager, Marketing Community @UiPath
Dawid Kot, Digital Transformation Lead @Proservartner
09:10 Cloud migration - Proservartner & DOVISTA case study (30')
Marcin Drozdowski, Automation CoE Manager @DOVISTA
Pawel Kamiński, RPA developer @DOVISTA
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
09:40 From bottlenecks to breakthroughs: Citizen Development in action (25')
Pawel Poplawski, Director, Improvement and Automation @McCormick & Company
Michał Cieślak, Senior Manager, Automation Programs @McCormick & Company
10:05 Next-level bots: API integration in UiPath Studio (30')
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
10:35 ☕ Coffee Break (15')
10:50 Document Understanding with my RPA Companion (45')
Ewa Gruszka, Enterprise Sales Specialist, AI & ML @UiPath
11:35 Power up your Robots: GenAI and GPT in REFramework (45')
Krzysztof Karaszewski, Global RPA Product Manager
12:20 🍕 Lunch Break (1hr)
13:20 From Concept to Quality: UiPath Test Suite for AI-powered Knowledge Bots (30')
Kamil Miśko, UiPath MVP, Senior RPA Developer @Zurich Insurance
13:50 Communications Mining - focus on AI capabilities (30')
Thomasz Wierzbicki, Business Analyst @Office Samurai
14:20 Polish MVP panel: Insights on MVP award achievements and career profiling
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012
1. Modularizing Your
Grails Application
with Private Plugins
Ken Liu
IEEE
SpringOne 2GX 2012
17 Oct 2012
Wednesday, October 17, 12
2. About Me
• Web development with Java since
JDK 1.0.2 (applets, anyone?)
• Groovy/Grails since 2009
• Lead developer for IEEE Spectrum
• Always been a closet fan of dynamic
languages (starting with Perl)
Wednesday, October 17, 12
3. About IEEE
• Institute of Electrical and Electronics
Engineers
• Widely known for standards - 802.11
• World’s largest technology
professional association - 400,000
engineers in 160 countries
• Publishes nearly a third of the world’s
technical literature in EE/CS
Wednesday, October 17, 12
4. About IEEE Spectrum
• Flagship publication of IEEE
• General interest technology magazine
with focus on EE topics
• 2012 National Magazine Award winner
Wednesday, October 17, 12
5. IEEE Spectrum website
• http://spectrum.ieee.org
• ~1.5M PV/mo
• Frequent referrals from HN, Reddit, /.
• 100% Groovy/Grails since 2009 -
both front-end and CMS
• Akamai/Weblogic/Oracle stack
• Award-winning coverage of ROBOTS!
Wednesday, October 17, 12
6. Agenda
• Grails plugins overview
• Grails plugin development basics
• Application architecture with private
plugins
• Lessons learned
Wednesday, October 17, 12
7. To fork or not to fork?
• “We need a new website...”
• “You must use the standard corporate
Enterprise CMS system.”
• “Can’t you guys just make a copy of
the existing code and tweak it?”
• DANGER!
Wednesday, October 17, 12
8. From “big ball of mud” to
plugin architecture
Where do we go from here?
Front End Domain classes CMS
Controllers/Views/ (e.g Article, Controllers/
Services BlogPost) Views/Services
(e.g. article, blog pages)
Utility classes
UrlMappings Spectrum Taglib (src/**)
Quartz Jobs Front End & CMS
(e.g. sitemap Test classes
images, CSS, JS
generation)
Wednesday, October 17, 12
9. Agenda
• Grails plugins overview
• Grails plugin development basics
• Application architecture with private
plugins
• Lessons learned
Wednesday, October 17, 12
10. Plugin systems and
component models
• Plugin systems are now commonplace
• Firefox, Eclipse, Jenkins, JEdit
• Package managers, OSGi, Ruby on
Rails Engines
• Component-oriented software?
• Coarse-grained high-level reuse,
separation of concerns
Wednesday, October 17, 12
11. Grails plugins in a
nutshell
• Tightly integrated into Grails system
• Can implement common functionality
in plugins that is overridden by
application
• Can create new Artifact types
• Interact with Spring context
• Integrated with build system
Wednesday, October 17, 12
12. Grails plugins in a
nutshell
• Central public plugin repository
• Version management
• Dependency management
Wednesday, October 17, 12
13. Grails - plugins inside
• Many parts of Grails
itself are built as plugins
• Some default plugins can
even be swapped out
• Tomcat -> Jetty
• GORM/Hibernate ->
Redis GORM
Wednesday, October 17, 12
14. Public Grails plugins
• 850 public plugins in the central
plugins repository
• Search on plugin portal
http://grails.org/plugins/
• Quickly bootstrap new applications
• Spend some time now
save some time later
• Follow @grailsplugins for updates
Wednesday, October 17, 12
15. Selected Grails plugins
Spring Security - user authentication
Cache - caching using annotations
Quartz - job scheduling (like cron)
DB Migration - controlled schema changes
Mail - send email with JavaMail
Resources - web performance optimization
Console - in-app interactive console
CodeNarc - static code analysis
Spock - enable Spock unit testing framework
Wednesday, October 17, 12
16. What can go into a
plugin?
• Really, anything
• Standard Grails artifacts: GSPs,
Controllers, Services, i18n, TagLibs -
just like in app
• Define custom Grails artifact types:
see Quartz plugin “Jobs”
• Plugins can depend on other plugins
Wednesday, October 17, 12
17. Agenda
• Grails plugins overview
• Grails plugin development basics
• Application architecture with private
plugins
• Lessons learned
Wednesday, October 17, 12
18. Creating a new plugin
grails create-plugin myplugin
Wednesday, October 17, 12
19. Creating a new plugin
Same structure
as a Grails
application, but
with an extra
plugin
descriptor file
Wednesday, October 17, 12
20. Plugin Descriptor
class MypluginGrailsPlugin {
// the plugin version
def version = "0.1"
// the version or versions of Grails the plugin is designed for
def grailsVersion = "2.1 > *"
// the other plugins this plugin depends on
def dependsOn = [:]
def doWithDynamicMethods = { ctx ->
// TODO Implement registering dynamic methods to classes (optional)
}
def doWithApplicationContext = { applicationContext ->
// TODO Implement post initialization spring config (optional)
}
Wednesday, October 17, 12
21. Excluded plugin files
/grails-app/conf/BootStrap.groovy
/grails-app/conf/BuildConfig.groovy
/grails-app/conf/Config.groovy
Grails excludes /grails-app/conf/DataSource.groovy
certain files (and any other *DataSource.groovy)
/grails-app/conf/UrlMappings.groovy
from packaging /grails-app/conf/spring/resources.groovy
/web-app/WEB-INF/**
/web-app/plugins/**
/test/**
Wednesday, October 17, 12
22. Running a plugin
• A plugin is a Grails app!
• grails run-app from plugin dir
• excluded files loaded during run-app
• useful for testing
(test-app works too)
Wednesday, October 17, 12
23. Packaging a plugin
• grails package-plugin
• creates a zip file that can be installed
& distributed
Wednesday, October 17, 12
24. Installing a plugin
from local directory:
grails install-plugin /path/to/grails-example-0.1.zip
from URL:
grails install-plugin http://myserver.com/plugins/grails-
example-0.1.zip
in BuildConfig.groovy (“in-place” plugin):
// Uncomment this only for local development - do not check in!
grails.plugin.location.'spectrum-core' = '../spectrum-core'
Wednesday, October 17, 12
25. Plugin Development
• Easy: create Controllers, Services,
Views, Taglibs, etc.
• Specify resource paths <g:resource>
• Can alter Spring context
• Hook into build system, reload events
Wednesday, October 17, 12
26. Agenda
• Grails plugins overview
• Grails plugin development basics
• Application architecture with private
plugins
• Lessons learned
Wednesday, October 17, 12
27. Public vs. Private plugins
Public plugins
• Highly cohesive
• Maximize reuse
• Sometimes provide “horizontal slices” -
e.g. Spring security core
• Most don’t depend on other plugins
Wednesday, October 17, 12
28. Public vs. Private plugins
Private Plugins
• Proprietary code
• Application or domain-specific
• Code reuse within an organization
• Can be coarse-grained, heavyweight
• Private forks of public plugins
• Enable interesting options for
application architecture
Wednesday, October 17, 12
29. From “big ball of mud” to
plugin architecture
• Grails applications tend to become
unmanageable over time
• Convention-based directory trees
(e.g. /grails-app/views )
• Rapid development/scaffolding
• Need “separation of concerns”
Wednesday, October 17, 12
30. From “big ball of mud” to
plugin architecture
Spectrum application before refactoring
Front End Domain classes CMS
Controllers/Views/ (e.g Article, Controllers/
Services BlogPost) Views/Services
(e.g. article, blog pages)
Utility classes
UrlMappings Spectrum Taglib (src/**)
Quartz Jobs Front End & CMS
(e.g. sitemap Test classes
images, CSS, JS
generation)
Wednesday, October 17, 12
31. Reusable domain model
DB
• Reuse a set of
Domain classes
between applications
• Different applications,
same DB instance
Domain Model Domain Model
• Hibernate not
plugin plugin
included in plugins by API endpoint Primary web
application application
default
• Consider Hibernate Domain Model
plugin
caching issues
Reporting
application
Wednesday, October 17, 12
32. Refactored with plugin
Spectrum Application Spectrum Core Plugin
Front End Core Domain Utility classes
Controllers/Views classes (src/**)
Front End CMS
Common Front
UrlMappings Controllers/
End Controllers
Views/Services
Front End Taglib
Core Services CMS test classes
Test classes CoreUrlMappings CMS Taglib
Front End CMS
Quartz Jobs
images, CSS, JS images, CSS, JS
Depends on other plugins: spring-security-core,
quartz, searchable, ckeditor, and others
Wednesday, October 17, 12
33. Different web sites,
common backend code
spectrum-core
Plugin
Spectrum The Institute
website website
10.4+ 3.0
Wednesday, October 17, 12
34. Same Controller,
different Views
FrontendArticleController#show()
Spectrum application The Institute application
show.gsp show.gsp
Wednesday, October 17, 12
35. Same Controller,
different Views
• Define common Controller in plugin
• View resolution: application first, then
plugin
• Can specify plugin using
<g:render plugin=”myplugin”>
• The promise of MVC fulfilled!
Wednesday, October 17, 12
36. Plugin UrlMappings
• UrlMappings.groovy excluded from plugin
build
• *UrlMappings.groovy merged into
application mappings
• Application can override plugin mappings
• Enables “mini application” in plugin
• Can’t remove unwanted mappings, only
override
Wednesday, October 17, 12
37. Config.groovy
• Config.groovy is excluded from plugin
• Might want to fix certain config
properties - won’t need them in
application Config
• Manually merge config in
doWithSpring
• application.config.merge(new
ConfigSlurper().parse(application.classLoader.loadClass('MyPluginConfig
')))
Wednesday, October 17, 12
38. Extending plugin
domain model
Content class
Domain model plugin Domain classes in
plugins can be
extended in
application
Webinar extends Content
Application
Wednesday, October 17, 12
39. Publishing private plugins
• Publish to internal corporate Maven
repo - e.g. Artifactory or Nexus
• Release plugin - installed by default
• Old-style svn-based repos supported,
but not recommended for Grails 2
• Customize plugin metadata with
internal Maven groupId
• Publish from Jenkins
Wednesday, October 17, 12
40. Declaring private plugin
dependencies
BuildConfig.groovy
(Maven/Ivy dependencies)
repositories {
grailsPlugins()
/* other default repos here */
/* point to internal corporate Maven repo */
mavenRepo 'http://mvn.ieee.org/nexus/content/repositories/spectrum/'
}
plugins {
/* other plugin dependencies here */
compile 'org.ieee.spectrum.plugins:spectrum-core:2.0-SNAPSHOT'
}
Wednesday, October 17, 12
41. Day-to-day development
• Use “in-place” plugin (exploded plugin) in
your local dev workspace
(BuildConfig.groovy)
• Private plugins tend to be updated along
with application features
• Beware of potential breaking changes
(in other applications)
• Define deprecation strategy and use
@deprecated javadoc
Wednesday, October 17, 12
42. Refactoring to plugin
• Determine candidates for refactoring
• Create new empty plugin & plugin descriptor
• Move Grails artifacts (e.g. Controllers,
Services, Views, etc.) into new plugin
• Move dependent files from /src
• Move related test files into new plugin
• Remove hard coded paths to resources
• Run your functional test suite
Wednesday, October 17, 12
43. Refactoring to plugin
• Start small - don’t create a whole
bunch of plugins from the outset
• Consider migrating version history
Wednesday, October 17, 12
44. Super-project with plugins
One application with several in-place plugins
/myapplication
/grails-app
...
/pluginA
/grails-app
/pluginB
/pluginC
In BuildConfig.groovy:
grails.plugin.location.pluginA = 'pluginA' // path to plugin
grails.plugin.location.pluginB = 'pluginB'
grails.plugin.location.pluginC = 'pluginC'
Wednesday, October 17, 12
45. Public website,
private back end
Public Private
Internet intranet
Deploy public
Core
Core
application
application
plugin
and private
plugin
Business-
versions of
Public-facing
application facing application with
application
shared code
DB
Wednesday, October 17, 12
46. Vertical slices / mini
Grails applications
• Plugins can be self contained
• UrlMappings + Controllers + Domains +
Views + Services = Grails application
• Remove views -> “white label” application
• Embed a small application within another
application
• Vertically slice your application into plugins
Wednesday, October 17, 12
47. Plugins as a platform
Data Capture Data Cleaning Data Validation
plugin plugin plugin
Super-plugin to
combine plugin
Clinical Data Management dependencies into
Platform plugin a platform or
domain-specific
framework
Clinical data
Clinical data review
management server
application
application
Wednesday, October 17, 12
48. Sensitive code protection
DB
Split application
into separate
Data Ingestion Data Analysis parts to isolate
plugin
plugin
“secret sauce” key algorithms
from external
vendor
Shell application Full application
(external team)
Wednesday, October 17, 12
49. Agenda
• Grails plugins overview
• Grails plugin development basics
• Application architecture with private
plugins
• Lessons learned
Wednesday, October 17, 12
50. Domain/Schema
management
• Changes to domain model need to be
carefully managed
• Avoid dbCreate=update
• Adopt DDL file naming convention:
spectrum-core-2.1.sql
spectrum-core-2.2.sql
• Bootstrap-triggered migrations
• DB Migrations plugin (Liquibase)
Wednesday, October 17, 12
51. Config.groovy changes
over time
• Easy to add a new entry to
Config.groovy and then forget about it
• Group together plugin config
properties into a closure
• Don’t forget about external config files
and differences in various
environments
Wednesday, October 17, 12
52. Maven/Ivy/build issues
• Maven/Ivy hell > JAR hell
• SNAPSHOT resolution error-prone
• See JIRA for bugs related to plugins
• Avoid creating many small plugins
• Strange problems? Look at your build.
Wednesday, October 17, 12
53. Plugin versioning and
branching
• Define version numbering strategy
• Be prepared to branch/merge
• Be sure to update plugin versions and
tag your code consistently
• Just use Git - merging & cherry-
picking are sweet
Wednesday, October 17, 12
54. Code Rigidity
• Inflexibility to change/afferent
coupling
• Avoid breaking changes (duh)
• Solution: automate your tests, catch
breaking changes early
Wednesday, October 17, 12
55. Continuous Integration
• Use Jenkins to trigger builds of
applications that depend on your
private plugin
• Run Plugin test suite with plugin build
• Publish snapshots to Maven repo from
Jenkins
Wednesday, October 17, 12
56. Plugin namespace
conflicts
• Plugin artifacts all share same
namespace with each other
• Potential for class name collisions,
especially with “conventions”
• Planned enhancement for Grails 2.2
Wednesday, October 17, 12
57. Plugin resources
• Plugin static resources (images, CSS, JS,
etc.) packaged in a path corresponding to
plugin name & version - /plugins/
myplugin-1.0/*
• path changes between dev mode and WAR -
<g:resource> handles correctly
• May need to redeploy with each plugin
version bump
• Don’t accidentally share sensitive files!
Wednesday, October 17, 12
58. Component interfaces
• Grails plugins don’t have any kind of
external “interface” or contract
besides Plugin Metadata
• Up to you to make the rules
(not a bad thing)
Wednesday, October 17, 12
59. Success!
Release strategy for 2013 website redesign
spectrum-core Plugin
2.0, 2.1, 2.2
The Institute
Spectrum Spectrum
website
website website
3.x
10.8, 10.9, 4.0 - 2013
10.10 release
Wednesday, October 17, 12
60. Takeaway
• Plugins are easy to create and use
• Private plugins are a safe, robust way
to modularize Grails applications
• Private plugins enable coarse-grained
reuse of application components
• Configuration management and OO
principles are important (as always)
Wednesday, October 17, 12
61. Additional resources
• @grailsplugins - Grails plugin updates - https://twitter.com/
grailsplugins
• Grails reference docs chapter on plugins - http://grails.org/doc/
latest/guide/plugins.html
• Inside Grails: The Build System and Plugin Management - http://
www.slideshare.net/skillsmatter/grails-internals-ggug-dec-2009
• GGUG: Grails Plugins - Lessons to Learn http://skillsmatter.com/
podcast/java-jee/grails-plugins
Wednesday, October 17, 12