SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
turn ideas into code faster
Moritz Eysholdt
itemis AG
turn ideas into code faster
!
Java

Moritz Eysholdt
itemis AG
!

Java
!

Java
immutability
dispatch
data_extraction
polymorphism

caching

data_transformation

!

Java
design_patterns
state

null_state

events
persistence

localization
immutability

for

dispatch
data_extraction

caching

if

implements
extends

polymorphism

data_transformation

!

Java
design_patterns
while

state
null_state

events

break

;
persistence

localization

return

fields

variables
immutability
dispatch

caching

data_transformation

if

for

implements

data_extraction
polymorphism

!
state
null_state
events
localization
persistence
design_patterns

extends

Java
while
break
variables
fields

;

return
!

Xtend

Java
functional_programming
dispatch
templates

!

Xtend
lambdas
extension_methods
active_annotations

Java
functional_programming
dispatch
templates

!

Xtend
lambdas
extension_methods
active_annotations

Java
Java

for-if-spaghetti
List<String> result = new ArrayList<String>();
for(Integer integer: integers) {
if(integer > 10) {
result.add(“Int: ” + integer);
}
}

val result = integers.filter[it > 10].map[“Int” + it]

Xtend

functional programming
Java

if-else-spaghetti

String result = null;
if(foo != null) {
result = foo.value;
}
String result;
if(bar != null) {
result = bar;
} else {
result = “unset”;
}

val result = foo?.value

val result = bar ?: “unset”

Xtend

null-safe operators
Java

call non-member methods

backwards(reading(are(you(“X”))))

“X”.you.are.reading.backwards

Xtend

extension methods
Java

type-def boilerplate

Map<String, Set<Integer>> ints = new HashMap<String, Set<Integer>>();

val ints = new HashMap<String, Set<Integer>>

Xtend

type inference
Java

if-else-instanceof-spaghetti

if(shape instanceof Rect)
return ((Rect) shape).width * ((Rect) shape).height;
else if(shape instanceof Circle)
return ((Circle) shape).radius * 2 * PI;
else
return 0;
return switch shape {
Rect: shape.width * shape.height
Circle: shape.radius * 2 * PI
default: 0
}

Xtend

smart switch expression
Java

if-else-instanceof-spaghetti
Xtend

public double surface(Shape shape) {
if(shape instanceof Rect)
return surface((Rect) shape);
else if(shape instanceof Circle)
return surface((Circle) shape);
return 0;
}
protected double surface(Rectangle rect) {
return rect.width * rect.height;
}
protected double surface(Circle circle) {
return circle.radius * 2 + PI;
}

dispatch methods

def dispatch surface(Rectangle rect) {
rect.width * rect.height;
}
def dispatch surface(Circle circle) {
circle.radius * 2 + PI;
}
Java

immutable class boilerplate

@Data class Point {
int x
int y
}

public class Point {
private final int x;
private final int y;
public
public
public
public
public
public

Foo(int x, int x) { ... }
int getX() { ... }
int getY() { ... }
int hashCode() { ... }
boolean equals(Object obj) { ... }
String toString() { ... }

}

Xtend

@Data annotation
Java

getter/setter boilerplate

public class Point {
private int x;
private int y;
public
public
public
public

int getX() { ...
int getY() { ...
void setX(int x)
void setY(int y)

}
}
{ ... }
{ ... }

class Point {
@Property int x
@Property int y
}

}

Xtend

@Property annotation
Java

boilerplate or design pattern

public class MyClass {
...
...
...
...

...
...
...
...

...
...
...
...

{
{
{
{

...
...
...
...

}
}
}
}

@MyAnnotation class MyClass {
...
}

}

Xtend

active annotation
EOF

Weitere ähnliche Inhalte

Was ist angesagt?

Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)
mircodotta
 
Effective Scala: Programming Patterns
Effective Scala: Programming PatternsEffective Scala: Programming Patterns
Effective Scala: Programming Patterns
Vasil Remeniuk
 
Why Java Sucks and C# Rocks (Final)
Why Java Sucks and C# Rocks (Final)Why Java Sucks and C# Rocks (Final)
Why Java Sucks and C# Rocks (Final)
jeffz
 
Javascript basic course
Javascript basic courseJavascript basic course
Javascript basic course
Tran Khoa
 
Java Intro
Java IntroJava Intro
Java Intro
backdoor
 

Was ist angesagt? (20)

Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)
 
Effective Scala: Programming Patterns
Effective Scala: Programming PatternsEffective Scala: Programming Patterns
Effective Scala: Programming Patterns
 
Ajax and JavaScript Bootcamp
Ajax and JavaScript BootcampAjax and JavaScript Bootcamp
Ajax and JavaScript Bootcamp
 
JavaScript Basics
JavaScript BasicsJavaScript Basics
JavaScript Basics
 
A Deeper look into Javascript Basics
A Deeper look into Javascript BasicsA Deeper look into Javascript Basics
A Deeper look into Javascript Basics
 
Java Performance MythBusters
Java Performance MythBustersJava Performance MythBusters
Java Performance MythBusters
 
Java best practices
Java best practicesJava best practices
Java best practices
 
Javascript
JavascriptJavascript
Javascript
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming Language
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
 
Why Java Sucks and C# Rocks (Final)
Why Java Sucks and C# Rocks (Final)Why Java Sucks and C# Rocks (Final)
Why Java Sucks and C# Rocks (Final)
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
 
A Re-Introduction to JavaScript
A Re-Introduction to JavaScriptA Re-Introduction to JavaScript
A Re-Introduction to JavaScript
 
Compiler2016 by abcdabcd987
Compiler2016 by abcdabcd987Compiler2016 by abcdabcd987
Compiler2016 by abcdabcd987
 
Javascript basic course
Javascript basic courseJavascript basic course
Javascript basic course
 
Java Intro
Java IntroJava Intro
Java Intro
 
What I Love About Ruby
What I Love About RubyWhat I Love About Ruby
What I Love About Ruby
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
 

Ähnlich wie Turning Ideas Into Code Faster

Ähnlich wie Turning Ideas Into Code Faster (20)

Writing Hadoop Jobs in Scala using Scalding
Writing Hadoop Jobs in Scala using ScaldingWriting Hadoop Jobs in Scala using Scalding
Writing Hadoop Jobs in Scala using Scalding
 
Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)
 
Scala Programming for Semantic Web Developers ESWC Semdev2015
Scala Programming for Semantic Web Developers ESWC Semdev2015Scala Programming for Semantic Web Developers ESWC Semdev2015
Scala Programming for Semantic Web Developers ESWC Semdev2015
 
Devoxx
DevoxxDevoxx
Devoxx
 
Module Ninja .JS
Module Ninja .JSModule Ninja .JS
Module Ninja .JS
 
Knowledge of Javascript
Knowledge of JavascriptKnowledge of Javascript
Knowledge of Javascript
 
Java
JavaJava
Java
 
Caerusone
CaerusoneCaerusone
Caerusone
 
Jugar Introduccion a Scala
Jugar Introduccion a ScalaJugar Introduccion a Scala
Jugar Introduccion a Scala
 
Oscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simpleOscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simple
 
Intro to Scala.js - Scala UG Cologne
Intro to Scala.js - Scala UG CologneIntro to Scala.js - Scala UG Cologne
Intro to Scala.js - Scala UG Cologne
 
Crossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkCrossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end Framework
 
Adding geospatial features to a java web app
Adding geospatial features to a java web appAdding geospatial features to a java web app
Adding geospatial features to a java web app
 
Modern, Scalable, Ambitious apps with Ember.js
Modern, Scalable, Ambitious apps with Ember.jsModern, Scalable, Ambitious apps with Ember.js
Modern, Scalable, Ambitious apps with Ember.js
 
Introduction To Scala
Introduction To ScalaIntroduction To Scala
Introduction To Scala
 
What did you miss in Java from 9-13?
What did you miss in Java from 9-13?What did you miss in Java from 9-13?
What did you miss in Java from 9-13?
 
Debugging Your Ext JS Code
Debugging Your Ext JS CodeDebugging Your Ext JS Code
Debugging Your Ext JS Code
 
Aop clustering
Aop clusteringAop clustering
Aop clustering
 
Coding Your Way to Java 13
Coding Your Way to Java 13Coding Your Way to Java 13
Coding Your Way to Java 13
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescript
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Turning Ideas Into Code Faster