The document discusses tools and techniques for developing Grails applications. It describes using Grails, IntelliJ IDEA, MySQL, JUnit and other tools for specification, design, construction, testing and deployment. It also discusses implementing common domain classes with status enumerations and default filters to control data visibility based on status in the backend vs frontend.
Everything is Permitted: Extending Built-insAndrew Dupont
Adding methods to built-in objects: it’s one of JavaScript’s most powerful features. It’s also a great way to offend the sensibilities of your colleagues. We all hear that it’s irresponsible, that it’s sloppy, that it’s flat-out bad practice and should be avoided.
I’m tired of this one-sided battle. In this talk, I’m going to push back against whatever blog post you read that told you that extending built-ins was unconditionally and universally bad. I’m gonna go all Howard Beale on your asses.
Everything is Permitted: Extending Built-insAndrew Dupont
Adding methods to built-in objects: it’s one of JavaScript’s most powerful features. It’s also a great way to offend the sensibilities of your colleagues. We all hear that it’s irresponsible, that it’s sloppy, that it’s flat-out bad practice and should be avoided.
I’m tired of this one-sided battle. In this talk, I’m going to push back against whatever blog post you read that told you that extending built-ins was unconditionally and universally bad. I’m gonna go all Howard Beale on your asses.
«Objective-C Runtime в примерах» — Алексей Сторожев, e-Legione-Legion
Цель доклада — вдохновить разработчиков на более глубокое изучение возможностей Objective-C Runtime, показать способы исследования системы, воодушевить аудиторию на эксперименты.
В докладе показаны несколько примеров использования Objective-C Runtime для решения нетипичных задач. Первый пример - реализация простого KVO своими руками тремя способами. Вторым примером показана полезность исследования приватных классов. Рассказано, как во время работы программы получить информацию о протянутых IBOutlet и IBAction в xib и storyboard. В каждом примере присутствуют особенности реализации, на которых сделан акцент и показаны варианты решения или обхода.
Ralph Schindler (of Zend Framework) and Jon Wage (of Doctrine) presented these slides for a webinar hosted by zend.com (webinar available online).
Links are contained within the slides to the demo application that was also used during the webinar.
The PPTs from one of the event of iWillStudy.com - a leading start-up in the education space in India. This PPT is being used at an event where they taught iPhone programming and applications development.
자프링(자바 + 스프링) 외길 12년차 서버 개발자가 코프링(코틀린 + 스프링)을 만난 후 코틀린의 특징과 스프링의 코틀린 지원을 알아가며 코프링 월드에서 살아남은 이야기…
코드 저장소: https://github.com/arawn/kotlin-support-in-spring
«Objective-C Runtime в примерах» — Алексей Сторожев, e-Legione-Legion
Цель доклада — вдохновить разработчиков на более глубокое изучение возможностей Objective-C Runtime, показать способы исследования системы, воодушевить аудиторию на эксперименты.
В докладе показаны несколько примеров использования Objective-C Runtime для решения нетипичных задач. Первый пример - реализация простого KVO своими руками тремя способами. Вторым примером показана полезность исследования приватных классов. Рассказано, как во время работы программы получить информацию о протянутых IBOutlet и IBAction в xib и storyboard. В каждом примере присутствуют особенности реализации, на которых сделан акцент и показаны варианты решения или обхода.
Ralph Schindler (of Zend Framework) and Jon Wage (of Doctrine) presented these slides for a webinar hosted by zend.com (webinar available online).
Links are contained within the slides to the demo application that was also used during the webinar.
The PPTs from one of the event of iWillStudy.com - a leading start-up in the education space in India. This PPT is being used at an event where they taught iPhone programming and applications development.
자프링(자바 + 스프링) 외길 12년차 서버 개발자가 코프링(코틀린 + 스프링)을 만난 후 코틀린의 특징과 스프링의 코틀린 지원을 알아가며 코프링 월드에서 살아남은 이야기…
코드 저장소: https://github.com/arawn/kotlin-support-in-spring
A Dotstore investiu mais de três anos no desenvolvimento de uma nova plataforma, completamente do zero, preparada para todos os tamanhos de empresas, mas especialmente estruturada para médias e grandes lojas. A nova plataforma é omni-channel e conta com API completa para novas integrações e desenvolvimento de aplicativos personalizados.
A plataforma possui ambiente mobile, clusterização de clientes, precificações avançadas, automatizações de processos, pagamento dividido em dois cartões, integrações com marketplaces e ERP’s, recuperação de carrinhos abandonados, checkout preparado para o aumento da conversão de vendas e centenas de outras integrações.
Creating applications with Grails, Angular JS and Spring Security - G3 Summit...Alvaro Sanchez-Mariscal
Grails 3.1 enhances and improves the profile system introduced in Grails 3.0. One of the new profiles ease the creation and development of applications where the the front-end is an Angular JS application, and the backend is a Grails REST API.
In this session, Álvaro (member of the Grails team at OCI, Grails committer and author of several plugins) will demonstrate how to use the Angular profile to create an application using Grails 3.1, Angular JS and Spring Security REST.
Slides from a talk I gave at Scandinavian Developers Conference 2012 on the architecture of Spotify. The slides follows a story of playing a track and the steps to get there.
Talk delivered by Chema Alonso at RootedCON Satellite (Saturday 12th of September 2015) about how to do hacking & pentesting using dorks over Tacyt, a Big Data of Android Apps
Índice del libro Hacking iOS: iPhone & iPad (2ª Edición) de la editorial 0xWord centrado en mostrar las técnicas de hacking de estos dispositivos hasta la versión de iOS 10 o dispositivos iPhone 7. Tienes el libro disponible en: http://0xword.com/es/libros/39-libro-hacking-dispositivos-ios-iphone-ipad.html
Seminário sobre Computação na Nuvem da disciplina de Redes de Computadores do curso de Engenharia da Computação, do Centro Universitário de Votuporanga - UNIFEV.
Talk about add proxy user in Spark Task execution time given in Spark Summit East 2017 by Jorge López-Malla and Abel Ricon
full video:
https://www.youtube.com/watch?v=VaU1xC0Rixo&feature=youtu.be
The Bundle system is one of the greatest and most powerful features of Symfony2. Bundles contain all the files related to a single feature of your application: controllers, entities, event listeners, form types, Twig templates, etc. But how much of that actually needs to be inside a bundle?
In this talk we’ll take a bundle, containing all those different types of classes, configuration files and templates, and strip it down to the bare necessities. And I promise that after moving many files out of the bundle, everything still works.
While looking for ways to move things out of the bundle, I will discuss some of the more advanced features of bundle design, like prepending configuration, compiler passes and Doctrine mapping drivers. We will end with a very lean bundle, surrounded by a few highly reusable, maximally decoupled libraries.
A comprehensive walkthrough of how to manage infrastructure-as-code using Terraform. This presentation includes an introduction to Terraform, a discussion of how to manage Terraform state, how to use Terraform modules, an overview of best practices (e.g. isolation, versioning, loops, if-statements), and a list of gotchas to look out for.
For a written and more in-depth version of this presentation, check out the "Comprehensive Guide to Terraform" blog post series: https://blog.gruntwork.io/a-comprehensive-guide-to-terraform-b3d32832baca
Slides contain selectively and subjectively choosen topics related with development application in Django framework like: class-based views, signals, customizing User model after 1.5 version released, database migration and queuing tasks using Celery and RabbitMQ.
How Netflix run Apache Flink at very large scale in these two scenarios. (1) Thousands of stateless routing jobs in the context of Keystone data pipeline (2) single large state job with many TBs of state and parallelism at a couple thousands
NET Systems Programming Learned the Hard Way.pptxpetabridge
What is a thread quantum and why is it different on Windows Desktop and Windows Server? What's the difference between a blocking call and a blocking flow? Why did our remoting benchmarks suddenly drop when we moved to .NET 6? When should I try to write lock-free code? What does the `volatile` keyword mean?
Welcome to the types of questions my team and I are asked, or ask ourselves, on a regular basis - we're the makers of Akka.NET, a high performance distributed actor system library and these are the sorts of low-level questions we need to answer in order to build great experiences for our own users.
In this talk we're going to learn about .NET systems programming, the low level components we hope we can take for granted, but sometimes can't. In particular:
- The `ThreadPool` and how work queues operate in practice;
- Synchronization mechanisms - including `lock`-less ones;
- Memory management, `Span<T>`, and garbage collection;
- `await`, `Task`, and the synchronization contexts; and
- Crossing user-code and system boundaries in areas such as sockets.
This talk will help .NET developers understand why their code works the way it does and what to do in scenarios that demand high performance.
The Bundle system is one of the greatest and most powerful features of Symfony2. Bundles contain all the files related to a single feature of your application: controllers, entities, event listeners, form types, Twig templates, etc. But how much of that actually needs to be inside a bundle?
In this talk we’ll take a bundle, containing all those different types of classes, configuration files and templates, and strip it down to the bare necessities. And I promise that after moving many files out of the bundle, everything still works.
While looking for ways to move things out of the bundle, I will discuss some of the more advanced features of bundle design, like prepending configuration, compiler passes and Doctrine mapping drivers. We will end with a very lean bundle, surrounded by a few highly reusable, maximally decoupled libraries.
With Grails 3, the plugin development experience changes a little bit compared to that of Grails 2. In this talk, Álvaro (member of the Grails team at OCI, Grails committer and author of several plugins) will cover several topics to understand how plugins work in Grails 3, focusing on best practices.
The session is structured as a set of tips and tricks with code samples in the following areas: modularisation, build system, testing and publishing.
Rapid and Scalable Development with MongoDB, PyMongo, and MingRick Copeland
This intermediate-level talk will teach you techniques using the popular NoSQL database MongoDB and the Python library Ming to write maintainable, high-performance, and scalable applications. We will cover everything you need to become an effective Ming/MongoDB developer from basic PyMongo queries to high-level object-document mapping setups in Ming.
The Bundle system is one of the greatest and most powerful features of Symfony2. Bundles contain all the files related to a single feature of your application: controllers, entities, event listeners, form types, Twig templates, etc. But how much of that actually needs to be inside a bundle?
In this talk we’ll take a bundle, containing all those different types of classes, configuration files and templates, and strip it down to the bare necessities. And I promise that after moving many files out of the bundle, everything still works.
While looking for ways to move things out of the bundle, I will discuss some of the more advanced features of bundle design, like prepending configuration, compiler passes and Doctrine mapping drivers. We will end with a very lean bundle, surrounded by a few highly reusable, maximally decoupled libraries.
Jan Stępień - GraalVM: Fast, Polyglot, Native - Codemotion Berlin 2018Codemotion
GraalVM challenges the status quo on the JVM. This newly-released JIT compiler brings substantial speed improvements and support for polyglot applications. It also allows us to translate our JVM bytecode into self-contained native binaries. In this session we’ll explore GraalVM’s potential. We’ll focus on Clojure, but our discussion will apply to many more programming languages. We’ll use GraalVM to build small native binaries. We’ll discuss the method’s limitations and their impact. Finally, we’ll build complete Clojure web apps weighing a fraction of their traditional JVM incarnations.
14. AbstractDomain
• Not
too
Groovy
probably
• Add
some
standard
akributes
– Some
useful
3mestamps
– ‘recentlyUpdated’
boolean
for
easy
highligh3ng
– Each
record
gets
a
‘remarks’
akribute
16. AbstractDomain.Status
Hibernate
filters
Plugin
• defaultFilter
in
Backend
– Status
in
[Status.ACTIVE,
Status.INACTIVE]
• defaultFilter
in
Frontend
– Status
==
Status.ACTIVE
17. AbstractDomain.Status
Hibernate
filters
• defaultFilter
in
Backend
– Status
in
[Status.ACTIVE,
Status.INACTIVE]
• defaultFilter
in
Frontend
– Status
==
Status.ACTIVE
21. AbstractDomain.change
• Holds
a
record
of
type
AbstractDomain
• Like
a
“muta3on-‐record”
• i.e.
future
change
to
the
object
• example:
division
of
responsibility
(amongst
users)
22. AbstractDomain.change
id
version
change
.tle
year
1
5
7
The
Bright
Side
of
the
Moon
1973
id
version
change
.tle
year
7
5
null
The
Dark
Side
of
the
Moon
1973
Should
verify
(op3mis3c)
Hibernate
filter:
exclude
records
that
are
“change
records”
23. Direc3ons
• Weapons
of
Choice
• AbstractDomain
• Heavy-‐Duty
Scaffolding
• Mul3-‐lingualiza3on
• Types
&
Categories
• Connec3ng
an
API
• Error
Abstrac3on
in
a
Plugin
24. Heavy-‐Duty
Scaffolding
• Substan3al
3me
spent
on
tailor-‐made
scaffolding
• Controllers
are
always
scaffolded
– Only
specific
code
for
a
specific
domain
is
coded
• Views
are
scaffolded
as
a
start
– Much
more
likely
to
manually
adjust
– But
certainly
not
for
each
and
every
Domain
Class
• Domain
Classes
can
contain
seungs
to
influence
rendering
during
scaffolding
25. Scaffolded
Controllers
• All
Controllers
exists
as
files
but
are
100%
scaffolded
unless
…
class
AlbumController
{
static
scaffold
=
true
}
26. Scaffolded
Controllers
• All
Controllers
exists
as
files
but
are
100%
scaffolded
unless
…
class
AlbumController
{
static
scaffold
=
true
def
list
(Integer
max)
{
//
different
implementation
of
Album.list
}
}
27. SimpleFlow
=
true
• Simple
states
– List
– Edit
• Mul3ple
ac3ons
– Create
– Cancel
– Save
– SaveAndClose
– SaveAndCreate
28. SimpleFlow
=
false
• More
states
– List
– Create
– Edit
– Show
• Same
set
of
ac3ons
– Create
– Cancel
– Save
– SaveAndClose
– SaveAndCreate
29. Scaffolded
Views
• Views
are
most
likely
to
be
changed
– Order
of
fields
from
Domain
Class
constraints
static
constraints
=
{
title
(blank:false)
artist
(blank:false)
year
(display:true)
change
(display:false)
}
30. Scaffolded
Views
• Views
are
most
likely
to
be
changed
– Order
of
fields
from
Domain
Class
constraints
static
constraints
=
{
title
(blank:false)
artist
(blank:false)
year
(display:true)
change
(display:false)
}
31. Scaffolded
Views
• Render
more
artefacts
_form.gsp
=
fields
used
in
create
/
edit
_table.gsp
=
<table>
used
in
list
for
reuse
_panel.gsp
=
simple
<div>
for
reuse
list.csv.gsp
=
used
for
formatting
exports
32. Scaffolded
Views
• Render
more
artefacts
_form.gsp
=
fields
used
in
create
/
edit
_table.gsp
=
<table>
used
in
list
for
reuse
_panel.gsp
=
simple
<div>
for
reuse
list.csv.gsp
=
used
for
formatting
exports
<%@
page
import="gr8tunes.Album"
%>
<g:if
test="${albumInstance
instanceof
Album}">
<div
class="domain-‐panel
domain-‐album">
<h4><small><g:message
code="album.title.label"
/>:</small></h4>
<p>
<g:if
test="${!controllerName.equals('album')}">
<g:link
controller=”album"
action="show"
id="${albumInstance.id}">
<g:fieldValue
bean="${albumInstance}"
field="year"/>
<g:fieldValue
bean="${albumInstance}"
field="title"/>
</g:link>
</g:if>
<g:else>
<g:fieldValue
bean="${albumInstance}"
field="year"/>
<g:fieldValue
bean="${albumInstance}"
field="title"/>
</g:else>
</p>
</div>
</g:if>
_panel.gsp
33. Scaffolded
Views
• Render
more
artefacts
_form.gsp
=
fields
used
in
create
/
edit
_table.gsp
=
<table>
used
in
list
for
reuse
_panel.gsp
=
simple
<div>
for
reuse
list.csv.gsp
=
used
for
formatting
exports
34. Scaffolded
Views
• Render
more
artefacts
_form.gsp
=
fields
used
in
create
/
edit
_table.gsp
=
<table>
used
in
list
for
reuse
_panel.gsp
=
simple
<div>
for
reuse
list.csv.gsp
=
used
for
formatting
exports
35. Scaffolded
Views
• Render
more
artefacts
_form.gsp
=
fields
used
in
create
/
edit
_table.gsp
=
<table>
used
in
list
for
reuse
_panel.gsp
=
simple
<div>
for
reuse
list.csv.gsp
=
used
for
formatting
exports
39. Direc3ons
• Weapons
of
Choice
• AbstractDomain
• Heavy-‐Duty
Scaffolding
• Mul3-‐lingualiza3on
• Types
&
Categories
• Connec3ng
an
API
• Error
Abstrac3on
in
a
Plugin
40. Mul3-‐lingualiza3on
• Transla3on
of
program
code
– aka
i18n;
that’s
in
Grails
right?
– .proper3es
file
per
‘group
of
(Domain)
classes’
• album.proper3es
• messages.proper3es
• abstractDomain.proper3es
• enums.proper3es
• Transla3on
of
data
(records)
– That’s
what
we
refer
to
as
“m17n”
41. Mul3-‐lingualiza3on
• Transla3on
of
program
code
– aka
i18n;
that’s
in
Grails
– .proper3es
file
per
“group
of
Domain
classes”
• album.proper3es
• messages.proper3es
• abstractDomain.proper3es
• enums.proper3es
• Transla3on
of
objects
(records)
– That’s
what
we
refer
to
as
“m17n”
42. Mul3-‐lingualiza3on
• System
default
Language
reflects
the
language
of
all
record
in
the
database
• Data
is
op3onally
“overlayed”
with
an
M17n
record
• By
conven3on
– i.e.
if
the
domain-‐name
ends
in
“M17n”
– Scaffolding
renders
a
different
controller
– Scaffolding
renders
a
different
view
43. AbstractDomain.change
id
.tle
year
image
ar.st_id
descrip.on
3
Licensed
to
Ill
1986
/img/4529ad62}.png
5
The
first
rap
rock
LP
to
top
the
Billboard
album
chart
id
album_id
language_id
.tle
descrip.on
1
3
7
Licensed
to
Ill
Es
ist
das
erste
reine
Hip-‐Hop-‐Album,
das
Platz
1
in
den
US-‐amerikanischen
Billboard-‐Charts
erreichte.
2
3
4
Licensed
to
Ill
La
canzone
raggiunse
la
seuma
posizione
nella
speciale
classifica
del
”Billboard
Hot
100"
Album
AlbumM17n
Language.isSystem
==
false
Rela3ons
are
not
overlay
/
translated
(could
be
a
limita3on)
Not
overlayed
Not
overlayed
44. m17n
service
Class
Album
extends
AbstractDomain
{
def
m17nService
private
String
title
...
public
String
getTitle()
{
m17nService.getProperty(this,
‘title’)
}
}
45. m17n
service
Class
Album
extends
AbstractDomain
{
def
m17nService
private
String
title
...
public
String
getTitle()
{
m17nService.getProperty(this,
‘title’)
}
}
The
m17nService
can
figure
out:
• If
an
overlay
Class
exists
(by
conven3on)
• What
the
system
language
is
…
Language.findByIsSystem(true)
• What
the
requested
Language
is
(from
Session)
• …
or
return
the
un-‐translated
…
this[title]
NB.
Session
does
not
necessarily
contain
browser
locale,
users
can
override
this
46. Direc3ons
• Weapons
of
Choice
• AbstractDomain
• Heavy-‐Duty
Scaffolding
• Mul3-‐lingualiza3on
• Types
&
Categories
• Connec3ng
an
API
47. Types
&
Categories
• Types
– Hardcoded
– Used
by
program-‐code(business-‐logic,
rendering
etc.)
• Categories
– Added
wherever
they
could
be
somewhat
useful
to
a
par3cular
user
– Used
in
the
UI
for
quick
filters
– Used
in
the
UI
for
color-‐coding
48. Types
&
Categories
• Types
– Hardcoded
– Use
by
program-‐code
(business-‐logic,
rendering
etc.)
• Categories
– Added
wherever
they
could
be
somewhat
useful
to
a
par3cular
user
– Used
in
the
UI
for
quick
filters
– Used
in
the
UI
for
color-‐coding
49. Types
&
Categories
• Types
– Hardcoded
– Use
by
program-‐code
(business-‐logic,
rendering
etc.)
• Categories
– Added
wherever
they
could
be
somewhat
useful
to
a
par3cular
user
– Used
in
the
UI
for
quick
filters
– Used
in
the
UI
for
color-‐coding
53. Connector
for
API
-‐>
Grails
• Example
of
calling
the
Flickr
REST
API
• Explain
my
approach
to
API
wrapping
54. Abstrac3on
of
an
API
call
1. Validate
the
parameters
needed
for
the
par3cular
call
2. Well
eh,
do
the
actual
API
call
3. Process
the
response
or
handle
any
errors
55. Abstrac3on
of
an
API
call
1. Validate
the
parameters
needed
for
the
par3cular
call
2. Well
eh,
do
the
actual
API
call
3. Process
the
response
or
handle
any
errors
void
apiCall(method,
params)
{
if
(validator(params))
{
try
{
def
rsp
=
doApiCall(method,params)
return
process(rsp)
}
catch
(Exception
ex)
{
...
}
}
else
{
//
todo:
raise
validation
exception
}
}
Params
Validator
Processor
API
56. Abstrac3on
of
an
API
call
//
abstracting
the
whole
call
handling
with
closures
implemented
in
individual
classes
private
def
apiCall(FlickrApiMethod
apiImplementation,
def
apiModel
=
{}
)
{
def
params
=
apiImplementation.paramsClosure
def
validator
=
apiImplementation.validatorClosure
def
processor
=
apiImplementation.processorClosure
if
(validator(apiModel()))
{
try
{
def
rsp
=
doApiCall(apiImplementation.apiMethod,
params(apiModel()))
return
processor(rsp,apiModel())
}
catch
(FlickrException
ex)
{
FlickrExceptionHandler.handleApiCallException(ex)
}
}
//
TODO:
raise
validation
exception
return
apiModel()
}
59. Implementa3on
class
photosGetInfo
implements
FlickrApiMethod{
...
//
ERROR
CODES
Closure
errorsClosure
=
{
GPathResult
response
-‐>
if
(response.err.@code.toInteger()
==
1)
{
return
null
}
//
photo
not
found
//
recoverable
errors
if
([100,105,116].contains(response.err.@code.toInteger()))
{
return
new
FlickrServiceApiException(response)
}
else
{
return
new
FlickrServiceSyntaxException(response)
}
}
}
60. We
we’re
at
• We’ve
got
a
generic
implementa3on
of
calls
• A
Class
that
implements
a
par3cular
call
• The
params
back-‐and-‐forth
are
Groovy
• Now
3e
it
all
together
in
a
Grails-‐like
way
61. Service.getPhotoById(..)
class
flickrService
{
…
//
abstracting
call
handling
implemented
in
individual
classes
private
def
apiCall(def
apiImplementation,
def
apiModel
=
{})
{
…
}
//
public
service
methods
public
FlickrPhoto
getPhotoById(Long
id)
{
return
apiCall(
new
photosGetInfo(),
{new
FlickrPhoto(id:id)}
)
as
FlickrPhoto
}
62. Well,
that’s
a
Wrap
• Weapons
of
Choice
• AbstractDomain
• Heavy-‐Duty
Scaffolding
• Mul3-‐lingualiza3on
• Types
&
Categories
• Connec3ng
an
API
63. Well,
that’s
a
Wrap
• Weapons
of
Choice
• AbstractDomain
• Heavy-‐Duty
Scaffolding
• Mul3-‐lingualiza3on
• Types
&
Categories
• Connec3ng
an
API