Apresentação criada para o Intervalo Técnico do CESAR realizado em 07/03/2012.
Grails é um framework web de alta produtividade para a plataforma Java.
Para isso ele utiliza tecnologias maduras do mundo Java, como os frameworks Hibernate e Spring, através de uma interface simples e consistente. Com pouca codificação e configuração, graças a linguagem Groovy, é possível criar aplicações web de forma fácil e ágil.
If you saw the "Crusty Talk" (Protocol Oriented Programming in Swift) at WWDC, you saw Apple announce Swift as the first "Protocol Oriented language." If you immediately jumped into Xcode and tried to write a lot of protocol oriented code, you may have discovered that the promise isn't quite the reality. In this talk, you'll learn how to rethink your types so that you can avoid complex protocol problems without giving up their power.
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...PROIDEA
Contact
FUNCTIONAL PROGRAMING AND EVENT SOURCING - A PAIR MADE IN HEAVEN - EXTENDED, 2 HOURS LONG BRAINWASH
TL;DR: This is talk is a solid introduction to two (supposedly) different topics: FP & ES. I will cover both the theory and the practice. We will emerage ES+FP application starting from ES+OO one.
While reading blogs or attending conferences, you might have heard about Event Sourcing. But didn't you get this feeling, that while there is a lot of theory out there, it is really hard to see a hands-on example? And even if you find some, those are always orbiting around Object Oriented concepts?
Greg Young once said "When we talk about Event Sourcing, current state is a left-fold of previous behaviours. Nothing new to Functional Programmers". If Functional Programming is such a natural concept for event sourced systems, shouldn't they fit together on a single codebase?
In this talk we will quickly introduce Event Sourcing (but without going into details), we will introduce some functional concepts as well (like State monad). Armoured with that knowledge we will try to transform sample ES application (OO-style, tightly coupled with framework) to frameworkless, FP-style solution).
Talk is targeted for beginner and intermediate audience. Examples will be in Scala but nothing fancy - normal syntax.
This talk is an extended version of a presentation "Event Sourcing & Functional Programming - a pair made in heaven". It is enriched with content of presentations: "Monads - asking the right question" and "It's all been done before - The Hitchhiker's Guide to Time Travel".
This session will take you on a tour of several languages that on the surface only share one thing in common – they all run on JVM as the execution platform. However, despite completely different appearances of Scala, Clojure, Jython and Groovy, we will demonstrate that they have some important commonalities. You will also see the emerging importance of JVM as a generic platform (as opposed to focusing on Java the language).
During the session we will implement a solution to a simple problem in each language, then compare these languages to Java. These solutions, while simple, will nonetheless highlight some of the common principles and implementation patterns that exist across the languages based on different paradigms. The solutions will also show how these approaches are different from implementation patterns common in Java.
If you saw the "Crusty Talk" (Protocol Oriented Programming in Swift) at WWDC, you saw Apple announce Swift as the first "Protocol Oriented language." If you immediately jumped into Xcode and tried to write a lot of protocol oriented code, you may have discovered that the promise isn't quite the reality. In this talk, you'll learn how to rethink your types so that you can avoid complex protocol problems without giving up their power.
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...PROIDEA
Contact
FUNCTIONAL PROGRAMING AND EVENT SOURCING - A PAIR MADE IN HEAVEN - EXTENDED, 2 HOURS LONG BRAINWASH
TL;DR: This is talk is a solid introduction to two (supposedly) different topics: FP & ES. I will cover both the theory and the practice. We will emerage ES+FP application starting from ES+OO one.
While reading blogs or attending conferences, you might have heard about Event Sourcing. But didn't you get this feeling, that while there is a lot of theory out there, it is really hard to see a hands-on example? And even if you find some, those are always orbiting around Object Oriented concepts?
Greg Young once said "When we talk about Event Sourcing, current state is a left-fold of previous behaviours. Nothing new to Functional Programmers". If Functional Programming is such a natural concept for event sourced systems, shouldn't they fit together on a single codebase?
In this talk we will quickly introduce Event Sourcing (but without going into details), we will introduce some functional concepts as well (like State monad). Armoured with that knowledge we will try to transform sample ES application (OO-style, tightly coupled with framework) to frameworkless, FP-style solution).
Talk is targeted for beginner and intermediate audience. Examples will be in Scala but nothing fancy - normal syntax.
This talk is an extended version of a presentation "Event Sourcing & Functional Programming - a pair made in heaven". It is enriched with content of presentations: "Monads - asking the right question" and "It's all been done before - The Hitchhiker's Guide to Time Travel".
This session will take you on a tour of several languages that on the surface only share one thing in common – they all run on JVM as the execution platform. However, despite completely different appearances of Scala, Clojure, Jython and Groovy, we will demonstrate that they have some important commonalities. You will also see the emerging importance of JVM as a generic platform (as opposed to focusing on Java the language).
During the session we will implement a solution to a simple problem in each language, then compare these languages to Java. These solutions, while simple, will nonetheless highlight some of the common principles and implementation patterns that exist across the languages based on different paradigms. The solutions will also show how these approaches are different from implementation patterns common in Java.
Slides of a talk I gave at work on Scala. It is geared toward Java developers. Some of the examples are in my company's domain, which is analyzing energy usage (i.e. a "read" is an electric meter read).
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
Commonality and Variability Analysis: Avoiding Duplicate CodeAlistair McKinnell
Duplicate code is something to be avoided. And yet, everyday developers make copies of working code, make edits to the copy, and create duplicate code.
Some developers have the discipline and the skill to refactor to eliminate this duplicate code. Many do not.
Liferay Mobile SDK has been enabling developers to create native apps backed by Liferay Portal’s power. We’ve been using it in production since 2013 and have noticed many improvement points. We also listened to the community and added new features that will make app development even faster. The new Liferay Mobile SDK for Android brings a lot of new features that boosts apps development. Things from automatic JSON parsing and RxJava compatibility to better code generation are ones of the improvements in this new major release.
A slightly-modified version of my IPRUG talk, this time for the BT DevCon5 developer conference at Adastral Park on 25 May 2012.
The main changes are the addition of the Ruby section and the increased number of HHGTTG references in honour of towel day.
Paco van der Linden, werkzaam als Senior ADF Ontwikkelaar bij AMIS, heeft met Groovy een aantal interessante oplossingen ontwikkeld. De kennis en ervaring die hij daarbij met Groovy in combinatie met Java (en ADF) heeft opgedaan, heeft hij op maandag 26 november gedeeld in een kennissessie.
Slides of a talk I gave at work on Scala. It is geared toward Java developers. Some of the examples are in my company's domain, which is analyzing energy usage (i.e. a "read" is an electric meter read).
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
Commonality and Variability Analysis: Avoiding Duplicate CodeAlistair McKinnell
Duplicate code is something to be avoided. And yet, everyday developers make copies of working code, make edits to the copy, and create duplicate code.
Some developers have the discipline and the skill to refactor to eliminate this duplicate code. Many do not.
Liferay Mobile SDK has been enabling developers to create native apps backed by Liferay Portal’s power. We’ve been using it in production since 2013 and have noticed many improvement points. We also listened to the community and added new features that will make app development even faster. The new Liferay Mobile SDK for Android brings a lot of new features that boosts apps development. Things from automatic JSON parsing and RxJava compatibility to better code generation are ones of the improvements in this new major release.
A slightly-modified version of my IPRUG talk, this time for the BT DevCon5 developer conference at Adastral Park on 25 May 2012.
The main changes are the addition of the Ruby section and the increased number of HHGTTG references in honour of towel day.
Paco van der Linden, werkzaam als Senior ADF Ontwikkelaar bij AMIS, heeft met Groovy een aantal interessante oplossingen ontwikkeld. De kennis en ervaring die hij daarbij met Groovy in combinatie met Java (en ADF) heeft opgedaan, heeft hij op maandag 26 november gedeeld in een kennissessie.
Functional programming is all the rage. It can undoubtedly produce cleaner and more expressive code, but why switch to Scala or wait for Java 8? In fact, there are many ways to dramatically improve your Java code quality by using a more functional style today. This presentation discusses how techniques such as functional programming, using fluent APIs, and other clean coding practices can make your code more concise, more readable, and much easier to maintain. But more importantly, you will learn about libraries such as LambdaJ and Google Guava that make this possible today with your existing Java code base.
Are you a Java programmer having wrist pain typing a lot (yes, I have!)? Does your mind keep swinging from loving to hating Java? Do you want to become more productive without leaving your world of Java? If so, this presentation is for you. I have been experimenting with Groovy for the last three months and I'm loving it - I am not going back to programming in plan old Java anymore. Yes, I have become Groovy - have you?
Scala is becoming the language of choice for many development teams. This talk highlights how Scala excels in the world of multi-core processing and explores how it compares to Java 8.
Video Presentation: http://youtu.be/8vxTowBXJSg
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
Java som sprog har ikke bevæget sig meget de seneste år. Vi har stadig ikke closures eller funktionelle aspekter som f.eks. C# har haft siden version 3. Er Scala svaret på enhver Javaudviklers bønner eller er sproget kun interessant for tågehoveder som mig, som begynder at synes bedre og bedre om funktionsorientering? Er den store portion syntaktisk sukker, Scala bringer på bordet, bare tomme kalorier?
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Understanding Nidhi Software Pricing: A Quick Guide 🌟
Choosing the right software is vital for Nidhi companies to streamline operations. Our latest presentation covers Nidhi software pricing, key factors, costs, and negotiation tips.
📊 What You’ll Learn:
Key factors influencing Nidhi software price
Understanding the true cost beyond the initial price
Tips for negotiating the best deal
Affordable and customizable pricing options with Vector Nidhi Software
🔗 Learn more at: www.vectornidhisoftware.com/software-for-nidhi-company/
#NidhiSoftwarePrice #NidhiSoftware #VectorNidhi
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
In the ever-evolving landscape of technology, enterprise software development is undergoing a significant transformation. Traditional coding methods are being challenged by innovative no-code solutions, which promise to streamline and democratize the software development process.
This shift is particularly impactful for enterprises, which require robust, scalable, and efficient software to manage their operations. In this article, we will explore the various facets of enterprise software development with no-code solutions, examining their benefits, challenges, and the future potential they hold.
2. Grails – The search is over
Aécio Costa
Felipe Coutinho
3. Grails – The search is over
Groovy
Características
Groovy x Java
Regra dos 80/20
Grails
Cenário Atual do Desenvolvimento Web
Características
Arquitetura
Demo
4. Grails – The search is over
Groovy - Características
Inspirada no Python, Ruby...;
Linguagem Dinâmica;
Plataforma Java;
Especificação do JCP (JSR 241);
Copy/Paste Compatibilty.
5. Grails – The search is over
O que Groovy tem de diferente de Java?
Tipagem dinâmica;
Recurso: attribute accessor;
Closure;
Métodos Dinâmicos;
e mais...
6. Grails – The search is over
Tipagem dinâmica
def name = “João”
def names = [“João”, “José”, “Geraldo”]
7. Grails – The search is over
Atribute accessor
class User{
String nome
Integer idade
}
def user = new User(name:”João”, age: 23)
user.nome = “Pedro”
8. Grails – The search is over
Closure
def name = “Paulo”
def printName = {println “Hello, ${name}”}
printName()
def listNames = [“Gabriela”, “Maria”]
def sayHello = {println it}
listNames.each(sayHello)
9. Grails – The search is over
Métodos Dinâmicos
def methodName = “getYearBorn”
user.”${methodName}”()
new User().”getDayBorn”()
10. Grails – The search is over
Além de...
Sobre carga de operadores;
Ranges;
MetaPrograming;
e etc...
11. Grails – The search is over
Groovy veio acabar com a Regra dos 80/20
(Princípio de Pareto)
12. Grails – The search is over
import java.util.ArrayList;
import java.util.List;
class Seletor {
private List selectBooksNameLessThan(List bookNames, int length) {
List resultado = new ArrayList();
for (int i = 0; i < bookNames.size(); i++) {
String candidate = (String) bookNames.get(i);
if (candidate.length() < length) {
resultado.add(candidate);
}
}
return resultado;
}
public static void main(String[] args) {
List books = new ArrayList();
books.add("Harry Potter");
books.add("A Vila");
books.add(“O Exorcista");
Seletor s = new Seletor();
List selected = s.selectBooksNameLessThan(books, 10);
System.out.println("Total Selecionados: " + selecionados.size());
for (int i = 0; i < selected.size(); i++) {
String sel = (String) selecionados.get(i);
System.out.println(sel);
}
}
}
13. Grails – The search is over
O que realmente interessa no código anterior?
14. Grails – The search is over
import java.util.ArrayList;
import java.util.List;
class Seletor {
private List selectBooksNameLessThan(List bookNames, int length) {
List resultado = new ArrayList();
for (int i = 0; i < bookNames.size(); i++) {
String candidate = (String) bookNames.get(i);
if (candidate.length() < length) {
resultado.add(candidate);
}
}
return resultado;
}
public static void main(String[] args) {
List books = new ArrayList();
books.add("Harry Potter");
books.add("A Vila");
books.add(“O Exorcista");
Seletor s = new Seletor();
List selected = s.selectBooksNameLessThan(books, 10);
System.out.println("Total Selecionados: " + selecionados.size());
for (int i = 0; i < selected.size(); i++) {
String sel = (String) selecionados.get(i);
System.out.println(sel);
}
}
}
16. Grails – The search is over
Closure e import implícito
17. Grails – The search is over
import java.util.ArrayList;
import java.util.List;
class Seletor {
private List selectBooksNameLessThan(List bookNames, int length) {
List resultado = new ArrayList();
for (int i = 0; i < bookNames.size(); i++) {
String candidate = (String) bookNames.get(i);
if (candidate.length() < length) {
resultado.add(candidate);
}
}
return resultado;
}
public static void main(String[] args) {
List books = new ArrayList();
books.add("Harry Potter");
books.add("A Vila");
books.add(“O Exorcista");
Seletor s = new Seletor();
List selected = s.selectBooksNameLessThan(books, 10);
System.out.println("Total Selecionados: " + selecionados.size());
for (int i = 0; i < selected.size(); i++) {
String sel = (String) selecionados.get(i);
System.out.println(sel);
}
}
}
18. Grails – The search is over
class Seletor {
private List selectBooksNameLessThan(List bookNames, int length) {
List resultado = new ArrayList();
bookNames.each { String candidate ->
if (candidate.length() < length) {
resultado.add(candidate);
}
} return resultado;
}
public static void main(String[] args) {
List books = new ArrayList();
books.add("Harry Potter");
books.add("A Vila");
books.add(“O Exorcista");
Seletor s = new Seletor();
List selected = s.selectBooksNameLessThan(books, 10);
System.out.println("Total Selecionados: " + selecionados.size());
selected.each { String sel ->
System.out.println(sel);
}
}
}
19. Grails – The search is over
Closure e import implícito
Declaração e Assinatura de Métodos
20. Grails – The search is over
class Seletor {
private List selectBooksNameLessThan(List bookNames, int length) {
List resultado = new ArrayList();
bookNames.each { String candidate ->
if (candidate.length() < length) {
resultado.add(candidate);
}
} return resultado;
}
public static void main(String[] args) {
List books = new ArrayList();
books.add("Harry Potter");
books.add("A Vila");
books.add(“O Exorcista");
Seletor s = new Seletor();
List selected = s.selectBooksNameLessThan(books, 10);
System.out.println("Total Selecionados: " + selecionados.size());
selected.each { String sel ->
System.out.println(sel);
}
}
}
21. Grails – The search is over
List selectBooksNameLessThan(List bookNames, int length) {
List resultado = new ArrayList();
bookNames.each { String candidate ->
if (candidate.length() < length) {
resultado.add(candidate);
}
} return resultado;
}
List books = new ArrayList();
books.add("Harry Potter");
books.add("A Vila");
books.add(“O Exorcista");
Seletor s = new Seletor();
List selected = s.selectBooksNameLessThan(books, 10);
System.out.println("Total Selecionados: " + selecionados.size());
selected.each { String sel ->
System.out.println(sel);
}
22. Grails – The search is over
Closure e import implícito
Declaração e Assinatura de Métodos
Tipagem Estática
23. Grails – The search is over
List selectBooksNameLessThan(List bookNames, int length) {
List resultado = new ArrayList();
bookNames.each { String candidate ->
if (candidate.length() < length) {
resultado.add(candidate);
}
} return resultado;
}
List books = new ArrayList();
books.add("Harry Potter");
books.add("A Vila");
books.add(“O Exorcista");
Seletor s = new Seletor();
List selected = s.selectBooksNameLessThan(books, 10);
System.out.println("Total Selecionados: " + selecionados.size());
selected.each { String sel ->
System.out.println(sel);
}
24. Grails – The search is over
def selectBooksNameLessThan(bookNames, length) {
def resultado = new ArrayList();
bookNames.each { candidate ->
if (candidate.size() < length) {
resultado.add(candidate);
}
}
return resultado;
}
def books = new ArrayList();
books.add("Harry Potter");
books.add("A Vila");
books.add(“O Exorcista");
def selected = s.selectBooksNameLessThan(books, 10);
System.out.println("Total Selecionados: " + selecionados.size());
selected.each { sel ->
System.out.println(sel);
}
25. Grails – The search is over
Closure e import implícito
Declaração e Assinatura de Métodos
Tipagem Estática
Instância simplificada de Listas
Não necessidade de “return”
“;” não obrigatório
Impressão simples
26. Grails – The search is over
def selectBooksNameLessThan(bookNames, length) {
def resultado = new ArrayList();
bookNames.each { candidate ->
if (candidate.size() < length) {
resultado.add(candidate);
}
}
return resultado;
}
def books = new ArrayList();
books.add("Harry Potter");
books.add("A Vila");
books.add(“O Exorcista");
def selected = s.selectBooksNameLessThan(books, 10);
System.out.println("Total Selecionados: " + selecionados.size());
selected.each { sel ->
System.out.println(sel);
}
27. Grails – The search is over
def selectBooksNameLessThan(bookNames, length) {
def resultado = [];
bookNames.each { candidate ->
if (candidate.size) < length) {
resultado.add(candidate)
}
}
resultado
}
def books = ["Harry Potter”, "A Vila”, “O Exorcista”]
def selected = s.selectBooksNameLessThan(books, 10)
println "Total ${selecionados.size()}”
selected.each { sel ->
println sel
}
28. Grails – The search is over
Closure e import implícito
Declaração e Assinatura de Métodos
Tipagem Estática
Instância simplificada de Listas
Não necessidade de “return”
“;” não obrigatório
Impressão simples
Métódos Dinâmicos
29. Grails – The search is over
def selectBooksNameLessThan(bookNames, length) {
def resultado = [];
bookNames.each { candidate ->
if (candidate.size) < length) {
resultado.add(candidate)
}
}
resultado
}
def books = ["Harry Potter”, "A Vila”, “O Exorcista”]
def selected = s.selectBooksNameLessThan(books, 10)
println "Total ${selecionados.size()}”
selected.each { sel ->
println sel
}
30. Grails – The search is over
def selectBooksNameLessThan(bookNames, length) {
bookNames.findAll { it.size() < length }
}
def books = ["Harry Potter”, "A Vila”, “O Exorcista”]
def selected = s.selectBooksNameLessThan(books, 10)
println "Total ${selecionados.size()}”
selected.each { sel ->
println sel
}
31. Grails – The search is over
def selectBooksNameLessThan(bookNames, length) {
bookNames.findAll { it.size() < length }
}
def books = ["Harry Potter”, "A Vila”, “O Exorcista”]
def selected = s.selectBooksNameLessThan(books, 10)
println "Total ${selecionados.size()}”
selected.each { sel ->
println sel
}
32. Grails – The search is over
def books = ["Harry Potter”, "A Vila”, “O Exorcista”]
def selected = books. findAll { it.size() <= 5}
println "Total ${selecionados.size()}”
selected.each { sel ->
println sel
}
33. Grails – The search is over
def books = ["Harry Potter”, "A Vila”, “O Exorcista”]
def selected = books. findAll { it.size() <= 5}
println "Total ${selecionados.size()}”
selected.each { sel ->
println sel
}
Seletor.groovy
34. Grails – The search is over
def books = ["Harry Potter”, "A Vila”, “O Exorcista”]
def selected = books. findAll { it.size() <= 5}
println "Total ${selecionados.size()}”
selected.each { sel ->
println sel
}
Seletor.groovy
Groovy é Java
35. Grails – The search is over
Cenário Atual Web
Persistência
Validações
Logs
Visualização
Controladores
Controle Transacional
Injeção de Dependências
Ajax
Redirecionador de URL’s
Configuração por ambiente
Internacionalização
38. Grails – The search is over
Framework Web de Alta produtividade para plataforma
Java;
Programação por convenção;
MVC nativo;
Fácil bootstrap;
GORM;
Scaffolding;
Plugins;
e tudo que você viu lá atras...
39. Grails – The search is over
Arquitetura do Grails
40. Grails – The search is over
Passos para criar a Aplicação
$ grails create-app booklibrary
$ grails run-app
41. Grails – The search is over
Classes de domínio
$ grails create-domain-class cesar.example.Book
class Book {
String title
Date releaseDate
String ISBN
}
42. Grails – The search is over
Scaffolding
INSERT, UPDATE, DELETE, SEARCH
$ grails generate-all cesar.example.Book
43. Grails – The search is over
Validations (Constraints)
DSL interna baseada no recurso builder da linguagem Groovy;
Constraints:
http://grails.org/doc/latest/ref/Constraints/Usage.html
static constraints = {
title(blank: false)
ISBN(blank: false, unique: true)
}
44. Grails – The search is over
Relacionamento
$ grails create-domain-class cesar.example.Person
class Person {
static hasMany = [books: Book]
String name
String email
String password
static constraints = {
name(blank: false)
email(blank: false, email: true)
password(blank: false, password: true)
}
}
Na classe Book:
static belongsTo = [person: Person]
45. Grails – The search is over
View
.gsp
i18n
# Book
book.label=Livro
book.title.label=Titulo
book.person.label=Pessoa
book.releaseDate.label=Data de lancamento
# Person
person.label=Pessoa
person.name.label=Nome
person.password.label=Senha
46. Grails – The search is over
GORM
def books = Book.list(max:10, order:”name”)
def books = Book.findByName(“The Developer”)
def books = Book.findAllByPriceLessThan(10.0)
def books = Book.findAllByTitleLikeAndPriceBetween(“Harry %”,
40.0, 70.0)