SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
Go for the Money
JSR 354 Hackday
2015
February 2015
Go for the money –JSR 354 Hackday
http://java.net/projects/javamoney
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Bio
Anatole Tresch
Consultant, Coach
Credit Suisse
Technical Coordinator &
Architect
Specification Lead JSR 354
Regular Conference Speaker
Driving Java EE Config
Twitter/Google+: @atsticks
atsticks@java.net
anatole.tresch@credit-suisse.com
Java Config Discussion https://groups.google.com/forum/#!forum/java-config
Java Config Blog: http://javaeeconfig.blogspot.ch
Zurich Java Community (Google Community)
Zurich Hackergarten
2
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Agenda
3
Introduction
Possible Topics
Easy:
API Challenge: Moneymachine
Medium:
Adding functonalities to the RI,
e.g. Special Roundings
BitCoin and other currencies
Test Financial Formulas in JavaMoney
Hard
Improve FastMoney
Measure CPU and Memory Consumption
Write a Complex Integration Sample
Setup
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Introduction
javax.money
4
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Currencies
API
5
Allow currencies with arbitrary other currency codes
Register additional Currency Units using an flexible SPI
Fluent API using a Builder (RI only)
(Historic Validity of currencies related to regions/countries and
vice versa (not part of JSR, but javamoney OSS project))
public interface CurrencyUnit{
public String getCurrencyCode();
public int getNumericCode();
public int getDefaultFractionDigits();
}
public final class MonetaryCurrencies{
public CurrencyUnit getCurrency(String currencyCode);
public CurrencyUnit getCurrency(Locale locale);
public boolean isCurrencyAvailable(String currencyCode);
public boolean isCurrencyAvailable(String locale);
}
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Currencies (continued)
API Samples
CurrencyUnit currency1 = MonetaryCurrencies.getCurrency("USD");
CurrencyUnit currency2 = MonetaryCurrencies.getCurrency(
Locale.GERMANY);
CurrencyUnit bitcoin = new BuildableCurrencyUnit.Builder("BTC")
.setNumericCode(123456)
.setDefaultFractionDigits(8)
.create();
6
Access a CurrencyUnit
Build a CurrencyUnit (RI only)
Register a CurrencyUnit
CurrencyUnit bitcoin = ….create(true);
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Monetary Amounts
General Aspects
7
Amount = Currency + Numeric Value
+ Capabilities
Arithmetic Functions, Comparison
Fluent API
Functional design for extendible functionality
(MonetaryOperator, MonetaryQuery)
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Monetary Amounts (continued)
Key Decisions
8
Support Several Numeric Representations (instead of one
single fixed value type)
Define Implementation Recommendations
• Rounding should to be modelled as separate concern
(a MonetaryOperator)
• Ensure Interoperability by the MonetaryAmount
interface
• Precision/scale capabilities should be inherited to its
operational results.
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Monetary Amounts (continued)
The API
public interface MonetaryAmount{
public CurrencyUnit getCurrency();
public NumberValue getNumber();
public MonetaryContext getMonetaryContext();
public MonetaryAmount with(MonetaryOperator operator);
public <R> R query(MonetaryQuery<R> query);
public MonetaryAmountFactory<? extends MonetaryAmount> getFactory();
…
public boolean isLessThanOrEqualTo(MonetaryAmount amt);
public boolean isLessThan(MonetaryAmount amt);
public boolean isEqualTo(MonetaryAmount amt);
public int signum();
…
public MonetaryAmount add(MonetaryAmount amount);
public MonetaryAmount subtract(MonetaryAmount amount);
public MonetaryAmount divide(long number);
public MonetaryAmount multiply(Number number);
public MonetaryAmount remainder(double number);
…
public MonetaryAmount stripTrailingZeros();
}
9
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Monetary Context
Modeling Amount Capabilities
10
Describes the capabilities of a MonetaryAmount.
Accessible from each MonetaryAmount instance.
Allows querying a feasible implementation type from
MonetaryAmounts.
Contains
common aspects
Max precision, max scale, implementation type
Arbitrary attributes
E.g. RoundingMode, MathContext, …
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Monetary Context (continued)
The API
public final class MonetaryContext extends AbstractContext
implements Serializable {
public int getPrecision();
public int getMaxScale();
public Class<? extends MonetaryAmount> getAmountType();
}
public abstract class AbstractContext implements Serializable{
…
public <T> T get(Class<T> type, String key);
public <T> T get (Class<T> type);
public Class<?> getType(String key);
public Set<String> getKeys(Class<?> type);
}
11
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Creating Monetary Amounts
Monetary Amount Factory
12
Creates new instances of MonetaryAmount.
Declares
The concrete MonetaryAmount implementation type
returned.
The min/max MonetaryContext supported.
Can be configured with a target
CurrencyUnit
A numeric value
MonetaryContext.
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Creating Monetary Amounts (continued)
Monetary Amount Factory
public interface MonetaryAmountFactory<T extends MonetaryAmount> {
Class<? extends MonetaryAmount> getAmountType();
MonetaryAmountFactory<T> setCurrency(String currencyCode);
MonetaryAmountFactory<T> setCurrency(CurrencyUnit currency);
MonetaryAmountFactory<T> setNumber(double number);
MonetaryAmountFactory<T> setNumber(long number);
MonetaryAmountFactory<T> setNumber(Number number);
MonetaryAmountFactory<T> setContext(MonetaryContext monetaryContext);
MonetaryAmountFactory<T> setAmount(MonetaryAmount amount);
MonetaryContext getDefaultMonetaryContext();
MonetaryContext getMaximalMonetaryContext();
T create();
}
13
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Creating Monetary Amounts
Usage Samples
// Using the default type
MonetaryAmount amount1 = MonetaryAmounts.getDefaultAmountFactory()
.setCurrency("USD“)
.setNumber(1234566.15)
.create();
// Using an explicit type
Money amount2 = MonetaryAmounts.getAmountFactory(Money.class)
.setCurrency("USD“)
.setNumber(1234566.15)
.create();
// Query a matching implementation type
MonetaryAmountFactoryQuery query =
MonetaryAmountFactoryQueryBuilder.of()
.setPrecision(200)
.setMaxScale(20)
.create();
MonetaryAmountFactory<?> fact = MonetaryAmounts.getAmountFactory(
query);
14
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Extension Points
MonetaryOperator
 Takes an amount and procudes some other amount.
• With different value
• With different currency
• Or both
// @FunctionalInterface
public interface MonetaryOperator {
public MonetaryAmount apply(MonetaryAmount amount);
}
• Operators then can be applied on every MonetaryAmount:
public interface MonetaryAmount{
…
public MonetaryAmount with (MonetaryOperator operator);
…
}
15
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Extension Points (continued)
MonetaryOperator: Use Cases
Extend the algorithmic capabilities
• Percentages
• Permil
• Different Minor Units
• Different Major Units
• Rounding
• Currency Conversion
• Financial Calculations
• …
16
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Extension Points (continued)
MonetaryOperator Example: Rounding and Percentage
17
// round an amount
MonetaryRounding rounding =
MoneyRoundings.getRounding(
MonetaryCurrencies.getCurrency(“USD”));
Money amount = Money.of(“USD”, 12.345567);
Money rounded = amount.with(rounding); // USD 12.35
// MonetaryFunctions, e.g. calculate 3% of it
Money threePercent = rounded.with(
MonetaryFunctions.getPercent(3));
// USD 0.3705
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Extension Points (continued)
MonetaryQuery
 A MonetaryQuery takes an amount and procuces an arbitrary
result:
// @FunctionalInterface
public interface MonetaryQuery<T> {
public T queryFrom(MonetaryAmount amount);
}
 Queries then can be applied on every MonetaryAmount:
public interface MonetaryAmount {
…
public <T> T query (MonetaryQuary<T> query);
…
}
18
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Currency Conversion
javax.money.convert.*
19
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Currency Conversion
ExchangeRate
 A ExchangeRate models a conversion between two currencies:
• Base CurrencyUnit
• Terminating/target CurrencyUnit
• Provider
• Conversion Factor, where M(term) = M(base) * f
• Additional attributes (ConversionContext)
• Rate chain (composite rates)
 Rates may be direct or derived (composite rates)
20
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Currency Conversion
ExchangeRateProvider
// access default provider (chain)
ExchangeRateProvider prov =
MonetaryConversions.getExchangeRateProvider();
// access a provider explicitly
prov = MonetaryConversions.getExchangeRateProvider("IMF");
// access explicit provider chain
prov = MonetaryConversions.getExchangeRateProvider("ECB", "IMF");
// access Exchange rates
ExchangeRate rate = provider.getExchangeRate("EUR", "CHF");
// Passing additional parameters using ConversionQuery
ExchangeRate rate = provider.getExchangeRate(
ConversionQueryBuilder.of()
.setBaseCurrency("EUR")
.setTermCurrency("CHF")
.setTimestampMillis(
System.currentTimeMillis() - 2000L))
.set("providerContact", "1234-1«)
.build());
21Go for the money - JSR 354 - http://java.net/projects/javamoney
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Currency Conversion (continued)
Performing Conversion
Accessing a CurrencyConversion (always targeted to a terminating
CurrencyUnit):
// access from a ExchangeRateProvider
ExchangeRateProvider prov = …;
CurrencyConversion conv = prov.getCurrencyConversion("INR");
// access it directly (using default rate chain)
conv = MonetaryConversions.getConversion("INR");
// access it, using explicit provider chain
conv = MonetaryConversions.getConversion("INR", "ECB", "IMF");
Performing conversion:
MonetaryAmount chfAmount = MonetaryAmounts.of("CHF",10.50);
MonetaryAmount inrAmount = chfAmount.with(conv); // around EUR 8.75
22
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Formatting and Parsing
javax.money.format.*
23
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Formatting and Parsing
MonetaryAmountFormat
Similar to java.text.DecimalFormat accessible by Locale
Configurable by passing an AmountFormatQuery
Supports also custom formats
Building AmountFormatQuery using a fluent API
(AmountFOrmatQueryBuilder)
Thread safe!
24Go for the money - JSR 354 - http://java.net/projects/javamoney
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Formatting and Parsing (continued)
MonetaryAmountFormat: Usage Example
// Access a provided format
MonetaryAmountFormat format = MonetaryFormats.getAmountFormat(
new Locale(“”, “in”));
System.out.println(format.format(
Money.of("INR", 39101112.123456))));
-> INR 3,91,01,112.10
// Access a custom format
MonetaryAmountFormat format = MonetaryFormats.getAmountFormat(
AmountFormatQueryBuilder.of(
“myCustomFormat”)
.build());
25Go for the money - JSR 354 - http://java.net/projects/javamoney
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
JavaMoney OSS Project
org.javamoney.*
26
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
JavaMoney OSS Project
Financial Calculations & Formulas
Extended Currency Services
 Currency namespaces (e.g. ISO, VIRTUAL, …)
 Currency namespace mapping
Validity Services (Historization API)
• access of historic currency data related to regions
Region Services
 Region Forest
• Unicode CLDR region tree
• ISO 2-, 3-letter countries
• Custom Trees
Extendible token-based Formatting API
27
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Links
Current Spec (work in progress, comments allowed):
https://docs.google.com/document/d/1FfihURoCYrbkDcSf1W
XM6fHoU3d3tKooMnZLCpmpyV8/edit
GitHub Project (JSR and JavaMoney):
https://github.com/JavaMoney/javamoney
Umbrella Page: http://javamoney.org
JSR 354: http://jcp.org
Java.net Project: http://java.net/projects/javamoney
JUG Chennai Adoption (TrakStok):
https://github.com/jugchennaiadoptjava/TrakStok
Twitter: @jsr354
Cash Rounding: http://en.wikipedia.org/wiki/Swedish_rounding
28
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
HackDay - Possible Topics
29
Easy
- Money Machine
Medium
- JavaMoney Lib
Hard
- L & P
- Create Sample App
- Implement a RI
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Adoption Areas JSR 354 – The Easy Way
API Challenge: MoneyMachine
30
Objective: Test the API for usability, make proposals to
improve
How:
Checkout/update the MoneyMachine project from
https://github.com/atsticks/moneymachine.git
Implement the classes in the src/main/java to
make the tests green (skeletons are already there)
The challenge will guide you throughout the whole JSR
Overall 40+ test cases of different complexity (easy to
medium), you may also select only a subset ;-)
Add improvement proposals to the JSRs JIRA on
java.net
Blog your (hopefully positive) experience, twitter, …
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Adoption Areas JSR 354 – The Easy Way
API Challenge: MoneyMachine Example
31
/**
* This class has to be implemented and helps us giving feedback on the JSR's API. This
* part of the
* project deals with basic aspects such as getting currencies and amounts.
* Created by Anatole on 07.03.14.
*/
public class Basics{
/**
* Get a CurrencyUnit using a currency code.
*
* @param currencyCode the currency code
* @return the corresponding CurrencyUnit instance.
*/
public CurrencyUnit getProvidedCurrency(String currencyCode){
throw new UnsupportedOperationException();
}
/**
* Get a CurrencyUnit using a Locale, modeling a country.
*
* @param locale The country locale.
* @return the corresponding CurrencyUnit instance.
*/
public CurrencyUnit getProvidedCurrency(Locale locale){
throw new UnsupportedOperationException();
}
...
}
Describes
the task to
be done
(incl. Some
hints)
Replace this
with
according
code
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Adoption Areas JSR 354 – The Easy Way
API Challenge: MoneyMachine Testing
32
To check your
implementation is correct,
simply execute the test suite
Correct ;-)
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Adoption Areas JSR 354 - Medium
Extending the Reference Implementation
33
Objective: Extend the RI
How:
Discuss your ideas with me to see where your idea fits
best
Additional Roundings
Additional Currencies
Additional Exchange Rate Providers
Additional Formats
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Adoption Areas JSR 354 – Medium Level
Helping on JavaMoney Library
34
Objective: Help on JavaMoney
How:
Financial calculations in calc need tests !!! Docs are in
place, including also links to further infos, examples so
testing does not require special financial know how ;)
Write/enhance user guide (asciidoc)
New functionalities, ideas?
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Adoption Areas JSR 354 – The Hard Way
Analyze and Improve Performance
35
Objective: Improve Performance
How:
Measure Performance and Memory Consumption
Define corresponding improvement ideas
Implement improvements
Known aspects:
FastMoney implementation could be faster, especially for
division
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Adoption Areas JSR 354 – The Hard Way
Write an Overall Example Application
36
Objective: Implement a Deployable Example Application
How:
Define Application Storyline
Define Screens etc.
Implement everything needed
Deploy on CloudBees ?
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Adoption Areas JSR 354 – The Hard Way
Write an Implementation
37
Objective: Ensure Specification / API Quality
How:
Implement whole or parts of the specification
Check the implementation against the TCK
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Setup
38
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Setup
39
• Install VirtualBox, if not yet done, download from
https://www.virtualbox.org
• Download the prepared image and start it
• Login with debian/debian
• Open the IDE of your choice (Eclipse, IntelliJ and
Netbeans are preinstalled and setup)
• Update the projects/repositories
• For Contributors:
• Ensure you have a GitHub user account
• Create your own Branch of the corresponding repositories
• Switch your local repositories on your VM, on which you want to commit,
to your branched repos
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Q & A
40
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Go for it!
41

Weitere ähnliche Inhalte

Was ist angesagt?

Web注入+http漏洞等描述
Web注入+http漏洞等描述Web注入+http漏洞等描述
Web注入+http漏洞等描述fangjiafu
 
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVM
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVMQCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVM
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVMPeter Pilgrim
 
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJosé Paumard
 
Slice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed PersistenceSlice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed PersistencePinaki Poddar
 
Demystifying Oak Search
Demystifying Oak SearchDemystifying Oak Search
Demystifying Oak SearchJustin Edelson
 
Why You Should Use TAPIs
Why You Should Use TAPIsWhy You Should Use TAPIs
Why You Should Use TAPIsJeffrey Kemp
 
Innovation and Security in Ruby on Rails
Innovation and Security in Ruby on RailsInnovation and Security in Ruby on Rails
Innovation and Security in Ruby on Railstielefeld
 
Demystifying Drupal AJAX Callback Commands
Demystifying Drupal AJAX Callback CommandsDemystifying Drupal AJAX Callback Commands
Demystifying Drupal AJAX Callback CommandsMichael Miles
 
Mastering the Sling Rewriter
Mastering the Sling RewriterMastering the Sling Rewriter
Mastering the Sling RewriterJustin Edelson
 
Moving from JFreeChart to JavaFX with JavaFX Chart Extensions
Moving from JFreeChart to JavaFX with JavaFX Chart ExtensionsMoving from JFreeChart to JavaFX with JavaFX Chart Extensions
Moving from JFreeChart to JavaFX with JavaFX Chart ExtensionsBruce Schubert
 
Singpore Oracle Sessions III - What is truly useful in Oracle Database 12c fo...
Singpore Oracle Sessions III - What is truly useful in Oracle Database 12c fo...Singpore Oracle Sessions III - What is truly useful in Oracle Database 12c fo...
Singpore Oracle Sessions III - What is truly useful in Oracle Database 12c fo...Lucas Jellema
 
Scala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghStuart Roebuck
 
Core Php Component Presentation
Core Php Component PresentationCore Php Component Presentation
Core Php Component PresentationJohn Coonen
 
Back to the basics: Modelando nuestro dominio #scbcn19
Back to the basics: Modelando nuestro dominio #scbcn19Back to the basics: Modelando nuestro dominio #scbcn19
Back to the basics: Modelando nuestro dominio #scbcn19CodelyTV
 
Greach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsGreach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsIván López Martín
 
Redis for your boss 2.0
Redis for your boss 2.0Redis for your boss 2.0
Redis for your boss 2.0Elena Kolevska
 

Was ist angesagt? (20)

Web注入+http漏洞等描述
Web注入+http漏洞等描述Web注入+http漏洞等描述
Web注入+http漏洞等描述
 
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVM
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVMQCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVM
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVM
 
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) Bridge
 
Slice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed PersistenceSlice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed Persistence
 
Demystifying Oak Search
Demystifying Oak SearchDemystifying Oak Search
Demystifying Oak Search
 
Why You Should Use TAPIs
Why You Should Use TAPIsWhy You Should Use TAPIs
Why You Should Use TAPIs
 
Innovation and Security in Ruby on Rails
Innovation and Security in Ruby on RailsInnovation and Security in Ruby on Rails
Innovation and Security in Ruby on Rails
 
Demystifying Drupal AJAX Callback Commands
Demystifying Drupal AJAX Callback CommandsDemystifying Drupal AJAX Callback Commands
Demystifying Drupal AJAX Callback Commands
 
Getting Started-with-Laravel
Getting Started-with-LaravelGetting Started-with-Laravel
Getting Started-with-Laravel
 
Mastering the Sling Rewriter
Mastering the Sling RewriterMastering the Sling Rewriter
Mastering the Sling Rewriter
 
Spring data requery
Spring data requerySpring data requery
Spring data requery
 
The CoFX Data Model
The CoFX Data ModelThe CoFX Data Model
The CoFX Data Model
 
Moving from JFreeChart to JavaFX with JavaFX Chart Extensions
Moving from JFreeChart to JavaFX with JavaFX Chart ExtensionsMoving from JFreeChart to JavaFX with JavaFX Chart Extensions
Moving from JFreeChart to JavaFX with JavaFX Chart Extensions
 
Singpore Oracle Sessions III - What is truly useful in Oracle Database 12c fo...
Singpore Oracle Sessions III - What is truly useful in Oracle Database 12c fo...Singpore Oracle Sessions III - What is truly useful in Oracle Database 12c fo...
Singpore Oracle Sessions III - What is truly useful in Oracle Database 12c fo...
 
Scala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup Edinburgh
 
Core Php Component Presentation
Core Php Component PresentationCore Php Component Presentation
Core Php Component Presentation
 
Back to the basics: Modelando nuestro dominio #scbcn19
Back to the basics: Modelando nuestro dominio #scbcn19Back to the basics: Modelando nuestro dominio #scbcn19
Back to the basics: Modelando nuestro dominio #scbcn19
 
Greach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsGreach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut Configurations
 
Redis for your boss 2.0
Redis for your boss 2.0Redis for your boss 2.0
Redis for your boss 2.0
 
Redis for your boss
Redis for your bossRedis for your boss
Redis for your boss
 

Ähnlich wie JSR 354 Hackday - What you can do...

Go for the Money - JSR 354
Go for the Money - JSR 354Go for the Money - JSR 354
Go for the Money - JSR 354Anatole Tresch
 
JSR 354: Money and Currency API - Short Overview
JSR 354: Money and Currency API - Short OverviewJSR 354: Money and Currency API - Short Overview
JSR 354: Money and Currency API - Short OverviewWerner Keil
 
JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !
JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !
JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !jazoon13
 
Vertical Recommendation Using Collaborative Filtering
Vertical Recommendation Using Collaborative FilteringVertical Recommendation Using Collaborative Filtering
Vertical Recommendation Using Collaborative Filteringgorass
 
Week 8
Week 8Week 8
Week 8A VD
 
Adopting F# at SBTech
Adopting F# at SBTechAdopting F# at SBTech
Adopting F# at SBTechAntya Dev
 
JSR 354 - Money and Currency API
JSR 354 - Money and Currency APIJSR 354 - Money and Currency API
JSR 354 - Money and Currency APIRajmahendra Hegde
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every dayVadym Khondar
 
Introduction to JSR 354 (Currency and Money) by Anatole Tresch
Introduction to JSR 354 (Currency and Money) by Anatole TreschIntroduction to JSR 354 (Currency and Money) by Anatole Tresch
Introduction to JSR 354 (Currency and Money) by Anatole TreschCodemotion
 
JSR354 Utrecht JUG 20171027
JSR354 Utrecht JUG 20171027JSR354 Utrecht JUG 20171027
JSR354 Utrecht JUG 20171027Wim van Haaren
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Groovy On The Trading Desk
Groovy On The Trading DeskGroovy On The Trading Desk
Groovy On The Trading DeskJonathan Felch
 
Ten Battle-Tested Tips for Atlassian Connect Add-ons
Ten Battle-Tested Tips for Atlassian Connect Add-onsTen Battle-Tested Tips for Atlassian Connect Add-ons
Ten Battle-Tested Tips for Atlassian Connect Add-onsAtlassian
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklum Ukraine
 
Mule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce InterfaceMule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce Interfacekrishananth
 
Spstc2011 managed metadata real world
Spstc2011 managed metadata real worldSpstc2011 managed metadata real world
Spstc2011 managed metadata real worldAtul Chhoda
 

Ähnlich wie JSR 354 Hackday - What you can do... (20)

JSR 354 LJC-Hackday
JSR 354 LJC-HackdayJSR 354 LJC-Hackday
JSR 354 LJC-Hackday
 
Adopt JSR 354
Adopt JSR 354Adopt JSR 354
Adopt JSR 354
 
Go for the Money - JSR 354
Go for the Money - JSR 354Go for the Money - JSR 354
Go for the Money - JSR 354
 
JSR 354: Money and Currency API - Short Overview
JSR 354: Money and Currency API - Short OverviewJSR 354: Money and Currency API - Short Overview
JSR 354: Money and Currency API - Short Overview
 
JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !
JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !
JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !
 
Vertical Recommendation Using Collaborative Filtering
Vertical Recommendation Using Collaborative FilteringVertical Recommendation Using Collaborative Filtering
Vertical Recommendation Using Collaborative Filtering
 
Week 8
Week 8Week 8
Week 8
 
Adopting F# at SBTech
Adopting F# at SBTechAdopting F# at SBTech
Adopting F# at SBTech
 
JSR 354 - Money and Currency API
JSR 354 - Money and Currency APIJSR 354 - Money and Currency API
JSR 354 - Money and Currency API
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every day
 
Introduction to JSR 354 (Currency and Money) by Anatole Tresch
Introduction to JSR 354 (Currency and Money) by Anatole TreschIntroduction to JSR 354 (Currency and Money) by Anatole Tresch
Introduction to JSR 354 (Currency and Money) by Anatole Tresch
 
JSR354 Utrecht JUG 20171027
JSR354 Utrecht JUG 20171027JSR354 Utrecht JUG 20171027
JSR354 Utrecht JUG 20171027
 
Designing for Autonomy
Designing for AutonomyDesigning for Autonomy
Designing for Autonomy
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Groovy On The Trading Desk
Groovy On The Trading DeskGroovy On The Trading Desk
Groovy On The Trading Desk
 
Java Se next Generetion
Java Se next GeneretionJava Se next Generetion
Java Se next Generetion
 
Ten Battle-Tested Tips for Atlassian Connect Add-ons
Ten Battle-Tested Tips for Atlassian Connect Add-onsTen Battle-Tested Tips for Atlassian Connect Add-ons
Ten Battle-Tested Tips for Atlassian Connect Add-ons
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce
 
Mule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce InterfaceMule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce Interface
 
Spstc2011 managed metadata real world
Spstc2011 managed metadata real worldSpstc2011 managed metadata real world
Spstc2011 managed metadata real world
 

Mehr von Anatole Tresch

Jsr382: Konfiguration in Java
Jsr382: Konfiguration in JavaJsr382: Konfiguration in Java
Jsr382: Konfiguration in JavaAnatole Tresch
 
Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...Anatole Tresch
 
The Gib Five - Modern IT Architecture
The Gib Five - Modern IT ArchitectureThe Gib Five - Modern IT Architecture
The Gib Five - Modern IT ArchitectureAnatole Tresch
 
The Big Five - IT Architektur Heute
The Big Five - IT Architektur HeuteThe Big Five - IT Architektur Heute
The Big Five - IT Architektur HeuteAnatole Tresch
 
Disruption is Change is Future
Disruption is Change is FutureDisruption is Change is Future
Disruption is Change is FutureAnatole Tresch
 
Configuration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache TamayaConfiguration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache TamayaAnatole Tresch
 
Configuration beyond Java EE 8
Configuration beyond Java EE 8Configuration beyond Java EE 8
Configuration beyond Java EE 8Anatole Tresch
 
Alles Docker oder Was ?
Alles Docker oder Was ?Alles Docker oder Was ?
Alles Docker oder Was ?Anatole Tresch
 
Configure once, run everywhere 2016
Configure once, run everywhere 2016Configure once, run everywhere 2016
Configure once, run everywhere 2016Anatole Tresch
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache TamayaAnatole Tresch
 
Wie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmenWie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmenAnatole Tresch
 
Configure Your Projects with Apache Tamaya
Configure Your Projects with Apache TamayaConfigure Your Projects with Apache Tamaya
Configure Your Projects with Apache TamayaAnatole Tresch
 
Legacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseLegacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseAnatole Tresch
 
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...Anatole Tresch
 
A first Draft to Java Configuration
A first Draft to Java ConfigurationA first Draft to Java Configuration
A first Draft to Java ConfigurationAnatole Tresch
 

Mehr von Anatole Tresch (17)

Jsr382: Konfiguration in Java
Jsr382: Konfiguration in JavaJsr382: Konfiguration in Java
Jsr382: Konfiguration in Java
 
Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...
 
The Gib Five - Modern IT Architecture
The Gib Five - Modern IT ArchitectureThe Gib Five - Modern IT Architecture
The Gib Five - Modern IT Architecture
 
The Big Five - IT Architektur Heute
The Big Five - IT Architektur HeuteThe Big Five - IT Architektur Heute
The Big Five - IT Architektur Heute
 
Microservices in Java
Microservices in JavaMicroservices in Java
Microservices in Java
 
Disruption is Change is Future
Disruption is Change is FutureDisruption is Change is Future
Disruption is Change is Future
 
Configuration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache TamayaConfiguration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache Tamaya
 
Configuration beyond Java EE 8
Configuration beyond Java EE 8Configuration beyond Java EE 8
Configuration beyond Java EE 8
 
Alles Docker oder Was ?
Alles Docker oder Was ?Alles Docker oder Was ?
Alles Docker oder Was ?
 
Going Resilient...
Going Resilient...Going Resilient...
Going Resilient...
 
Configure once, run everywhere 2016
Configure once, run everywhere 2016Configure once, run everywhere 2016
Configure once, run everywhere 2016
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache Tamaya
 
Wie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmenWie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmen
 
Configure Your Projects with Apache Tamaya
Configure Your Projects with Apache TamayaConfigure Your Projects with Apache Tamaya
Configure Your Projects with Apache Tamaya
 
Legacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseLegacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the Enterprise
 
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
 
A first Draft to Java Configuration
A first Draft to Java ConfigurationA first Draft to Java Configuration
A first Draft to Java Configuration
 

Kürzlich hochgeladen

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456KiaraTiradoMicha
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 

Kürzlich hochgeladen (20)

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

JSR 354 Hackday - What you can do...

  • 1. Go for the Money JSR 354 Hackday 2015 February 2015 Go for the money –JSR 354 Hackday http://java.net/projects/javamoney
  • 2. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Bio Anatole Tresch Consultant, Coach Credit Suisse Technical Coordinator & Architect Specification Lead JSR 354 Regular Conference Speaker Driving Java EE Config Twitter/Google+: @atsticks atsticks@java.net anatole.tresch@credit-suisse.com Java Config Discussion https://groups.google.com/forum/#!forum/java-config Java Config Blog: http://javaeeconfig.blogspot.ch Zurich Java Community (Google Community) Zurich Hackergarten 2
  • 3. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Agenda 3 Introduction Possible Topics Easy: API Challenge: Moneymachine Medium: Adding functonalities to the RI, e.g. Special Roundings BitCoin and other currencies Test Financial Formulas in JavaMoney Hard Improve FastMoney Measure CPU and Memory Consumption Write a Complex Integration Sample Setup
  • 4. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Introduction javax.money 4
  • 5. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Currencies API 5 Allow currencies with arbitrary other currency codes Register additional Currency Units using an flexible SPI Fluent API using a Builder (RI only) (Historic Validity of currencies related to regions/countries and vice versa (not part of JSR, but javamoney OSS project)) public interface CurrencyUnit{ public String getCurrencyCode(); public int getNumericCode(); public int getDefaultFractionDigits(); } public final class MonetaryCurrencies{ public CurrencyUnit getCurrency(String currencyCode); public CurrencyUnit getCurrency(Locale locale); public boolean isCurrencyAvailable(String currencyCode); public boolean isCurrencyAvailable(String locale); }
  • 6. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Currencies (continued) API Samples CurrencyUnit currency1 = MonetaryCurrencies.getCurrency("USD"); CurrencyUnit currency2 = MonetaryCurrencies.getCurrency( Locale.GERMANY); CurrencyUnit bitcoin = new BuildableCurrencyUnit.Builder("BTC") .setNumericCode(123456) .setDefaultFractionDigits(8) .create(); 6 Access a CurrencyUnit Build a CurrencyUnit (RI only) Register a CurrencyUnit CurrencyUnit bitcoin = ….create(true);
  • 7. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Monetary Amounts General Aspects 7 Amount = Currency + Numeric Value + Capabilities Arithmetic Functions, Comparison Fluent API Functional design for extendible functionality (MonetaryOperator, MonetaryQuery)
  • 8. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Monetary Amounts (continued) Key Decisions 8 Support Several Numeric Representations (instead of one single fixed value type) Define Implementation Recommendations • Rounding should to be modelled as separate concern (a MonetaryOperator) • Ensure Interoperability by the MonetaryAmount interface • Precision/scale capabilities should be inherited to its operational results.
  • 9. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Monetary Amounts (continued) The API public interface MonetaryAmount{ public CurrencyUnit getCurrency(); public NumberValue getNumber(); public MonetaryContext getMonetaryContext(); public MonetaryAmount with(MonetaryOperator operator); public <R> R query(MonetaryQuery<R> query); public MonetaryAmountFactory<? extends MonetaryAmount> getFactory(); … public boolean isLessThanOrEqualTo(MonetaryAmount amt); public boolean isLessThan(MonetaryAmount amt); public boolean isEqualTo(MonetaryAmount amt); public int signum(); … public MonetaryAmount add(MonetaryAmount amount); public MonetaryAmount subtract(MonetaryAmount amount); public MonetaryAmount divide(long number); public MonetaryAmount multiply(Number number); public MonetaryAmount remainder(double number); … public MonetaryAmount stripTrailingZeros(); } 9
  • 10. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Monetary Context Modeling Amount Capabilities 10 Describes the capabilities of a MonetaryAmount. Accessible from each MonetaryAmount instance. Allows querying a feasible implementation type from MonetaryAmounts. Contains common aspects Max precision, max scale, implementation type Arbitrary attributes E.g. RoundingMode, MathContext, …
  • 11. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Monetary Context (continued) The API public final class MonetaryContext extends AbstractContext implements Serializable { public int getPrecision(); public int getMaxScale(); public Class<? extends MonetaryAmount> getAmountType(); } public abstract class AbstractContext implements Serializable{ … public <T> T get(Class<T> type, String key); public <T> T get (Class<T> type); public Class<?> getType(String key); public Set<String> getKeys(Class<?> type); } 11
  • 12. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Creating Monetary Amounts Monetary Amount Factory 12 Creates new instances of MonetaryAmount. Declares The concrete MonetaryAmount implementation type returned. The min/max MonetaryContext supported. Can be configured with a target CurrencyUnit A numeric value MonetaryContext.
  • 13. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Creating Monetary Amounts (continued) Monetary Amount Factory public interface MonetaryAmountFactory<T extends MonetaryAmount> { Class<? extends MonetaryAmount> getAmountType(); MonetaryAmountFactory<T> setCurrency(String currencyCode); MonetaryAmountFactory<T> setCurrency(CurrencyUnit currency); MonetaryAmountFactory<T> setNumber(double number); MonetaryAmountFactory<T> setNumber(long number); MonetaryAmountFactory<T> setNumber(Number number); MonetaryAmountFactory<T> setContext(MonetaryContext monetaryContext); MonetaryAmountFactory<T> setAmount(MonetaryAmount amount); MonetaryContext getDefaultMonetaryContext(); MonetaryContext getMaximalMonetaryContext(); T create(); } 13
  • 14. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Creating Monetary Amounts Usage Samples // Using the default type MonetaryAmount amount1 = MonetaryAmounts.getDefaultAmountFactory() .setCurrency("USD“) .setNumber(1234566.15) .create(); // Using an explicit type Money amount2 = MonetaryAmounts.getAmountFactory(Money.class) .setCurrency("USD“) .setNumber(1234566.15) .create(); // Query a matching implementation type MonetaryAmountFactoryQuery query = MonetaryAmountFactoryQueryBuilder.of() .setPrecision(200) .setMaxScale(20) .create(); MonetaryAmountFactory<?> fact = MonetaryAmounts.getAmountFactory( query); 14
  • 15. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Extension Points MonetaryOperator  Takes an amount and procudes some other amount. • With different value • With different currency • Or both // @FunctionalInterface public interface MonetaryOperator { public MonetaryAmount apply(MonetaryAmount amount); } • Operators then can be applied on every MonetaryAmount: public interface MonetaryAmount{ … public MonetaryAmount with (MonetaryOperator operator); … } 15
  • 16. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Extension Points (continued) MonetaryOperator: Use Cases Extend the algorithmic capabilities • Percentages • Permil • Different Minor Units • Different Major Units • Rounding • Currency Conversion • Financial Calculations • … 16
  • 17. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Extension Points (continued) MonetaryOperator Example: Rounding and Percentage 17 // round an amount MonetaryRounding rounding = MoneyRoundings.getRounding( MonetaryCurrencies.getCurrency(“USD”)); Money amount = Money.of(“USD”, 12.345567); Money rounded = amount.with(rounding); // USD 12.35 // MonetaryFunctions, e.g. calculate 3% of it Money threePercent = rounded.with( MonetaryFunctions.getPercent(3)); // USD 0.3705
  • 18. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Extension Points (continued) MonetaryQuery  A MonetaryQuery takes an amount and procuces an arbitrary result: // @FunctionalInterface public interface MonetaryQuery<T> { public T queryFrom(MonetaryAmount amount); }  Queries then can be applied on every MonetaryAmount: public interface MonetaryAmount { … public <T> T query (MonetaryQuary<T> query); … } 18
  • 19. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Currency Conversion javax.money.convert.* 19
  • 20. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Currency Conversion ExchangeRate  A ExchangeRate models a conversion between two currencies: • Base CurrencyUnit • Terminating/target CurrencyUnit • Provider • Conversion Factor, where M(term) = M(base) * f • Additional attributes (ConversionContext) • Rate chain (composite rates)  Rates may be direct or derived (composite rates) 20
  • 21. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Currency Conversion ExchangeRateProvider // access default provider (chain) ExchangeRateProvider prov = MonetaryConversions.getExchangeRateProvider(); // access a provider explicitly prov = MonetaryConversions.getExchangeRateProvider("IMF"); // access explicit provider chain prov = MonetaryConversions.getExchangeRateProvider("ECB", "IMF"); // access Exchange rates ExchangeRate rate = provider.getExchangeRate("EUR", "CHF"); // Passing additional parameters using ConversionQuery ExchangeRate rate = provider.getExchangeRate( ConversionQueryBuilder.of() .setBaseCurrency("EUR") .setTermCurrency("CHF") .setTimestampMillis( System.currentTimeMillis() - 2000L)) .set("providerContact", "1234-1«) .build()); 21Go for the money - JSR 354 - http://java.net/projects/javamoney
  • 22. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Currency Conversion (continued) Performing Conversion Accessing a CurrencyConversion (always targeted to a terminating CurrencyUnit): // access from a ExchangeRateProvider ExchangeRateProvider prov = …; CurrencyConversion conv = prov.getCurrencyConversion("INR"); // access it directly (using default rate chain) conv = MonetaryConversions.getConversion("INR"); // access it, using explicit provider chain conv = MonetaryConversions.getConversion("INR", "ECB", "IMF"); Performing conversion: MonetaryAmount chfAmount = MonetaryAmounts.of("CHF",10.50); MonetaryAmount inrAmount = chfAmount.with(conv); // around EUR 8.75 22
  • 23. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Formatting and Parsing javax.money.format.* 23
  • 24. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Formatting and Parsing MonetaryAmountFormat Similar to java.text.DecimalFormat accessible by Locale Configurable by passing an AmountFormatQuery Supports also custom formats Building AmountFormatQuery using a fluent API (AmountFOrmatQueryBuilder) Thread safe! 24Go for the money - JSR 354 - http://java.net/projects/javamoney
  • 25. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Formatting and Parsing (continued) MonetaryAmountFormat: Usage Example // Access a provided format MonetaryAmountFormat format = MonetaryFormats.getAmountFormat( new Locale(“”, “in”)); System.out.println(format.format( Money.of("INR", 39101112.123456)))); -> INR 3,91,01,112.10 // Access a custom format MonetaryAmountFormat format = MonetaryFormats.getAmountFormat( AmountFormatQueryBuilder.of( “myCustomFormat”) .build()); 25Go for the money - JSR 354 - http://java.net/projects/javamoney
  • 26. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 JavaMoney OSS Project org.javamoney.* 26
  • 27. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 JavaMoney OSS Project Financial Calculations & Formulas Extended Currency Services  Currency namespaces (e.g. ISO, VIRTUAL, …)  Currency namespace mapping Validity Services (Historization API) • access of historic currency data related to regions Region Services  Region Forest • Unicode CLDR region tree • ISO 2-, 3-letter countries • Custom Trees Extendible token-based Formatting API 27
  • 28. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Links Current Spec (work in progress, comments allowed): https://docs.google.com/document/d/1FfihURoCYrbkDcSf1W XM6fHoU3d3tKooMnZLCpmpyV8/edit GitHub Project (JSR and JavaMoney): https://github.com/JavaMoney/javamoney Umbrella Page: http://javamoney.org JSR 354: http://jcp.org Java.net Project: http://java.net/projects/javamoney JUG Chennai Adoption (TrakStok): https://github.com/jugchennaiadoptjava/TrakStok Twitter: @jsr354 Cash Rounding: http://en.wikipedia.org/wiki/Swedish_rounding 28
  • 29. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 HackDay - Possible Topics 29 Easy - Money Machine Medium - JavaMoney Lib Hard - L & P - Create Sample App - Implement a RI
  • 30. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – The Easy Way API Challenge: MoneyMachine 30 Objective: Test the API for usability, make proposals to improve How: Checkout/update the MoneyMachine project from https://github.com/atsticks/moneymachine.git Implement the classes in the src/main/java to make the tests green (skeletons are already there) The challenge will guide you throughout the whole JSR Overall 40+ test cases of different complexity (easy to medium), you may also select only a subset ;-) Add improvement proposals to the JSRs JIRA on java.net Blog your (hopefully positive) experience, twitter, …
  • 31. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – The Easy Way API Challenge: MoneyMachine Example 31 /** * This class has to be implemented and helps us giving feedback on the JSR's API. This * part of the * project deals with basic aspects such as getting currencies and amounts. * Created by Anatole on 07.03.14. */ public class Basics{ /** * Get a CurrencyUnit using a currency code. * * @param currencyCode the currency code * @return the corresponding CurrencyUnit instance. */ public CurrencyUnit getProvidedCurrency(String currencyCode){ throw new UnsupportedOperationException(); } /** * Get a CurrencyUnit using a Locale, modeling a country. * * @param locale The country locale. * @return the corresponding CurrencyUnit instance. */ public CurrencyUnit getProvidedCurrency(Locale locale){ throw new UnsupportedOperationException(); } ... } Describes the task to be done (incl. Some hints) Replace this with according code
  • 32. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – The Easy Way API Challenge: MoneyMachine Testing 32 To check your implementation is correct, simply execute the test suite Correct ;-)
  • 33. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 - Medium Extending the Reference Implementation 33 Objective: Extend the RI How: Discuss your ideas with me to see where your idea fits best Additional Roundings Additional Currencies Additional Exchange Rate Providers Additional Formats
  • 34. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – Medium Level Helping on JavaMoney Library 34 Objective: Help on JavaMoney How: Financial calculations in calc need tests !!! Docs are in place, including also links to further infos, examples so testing does not require special financial know how ;) Write/enhance user guide (asciidoc) New functionalities, ideas?
  • 35. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – The Hard Way Analyze and Improve Performance 35 Objective: Improve Performance How: Measure Performance and Memory Consumption Define corresponding improvement ideas Implement improvements Known aspects: FastMoney implementation could be faster, especially for division
  • 36. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – The Hard Way Write an Overall Example Application 36 Objective: Implement a Deployable Example Application How: Define Application Storyline Define Screens etc. Implement everything needed Deploy on CloudBees ?
  • 37. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – The Hard Way Write an Implementation 37 Objective: Ensure Specification / API Quality How: Implement whole or parts of the specification Check the implementation against the TCK
  • 38. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Setup 38
  • 39. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Setup 39 • Install VirtualBox, if not yet done, download from https://www.virtualbox.org • Download the prepared image and start it • Login with debian/debian • Open the IDE of your choice (Eclipse, IntelliJ and Netbeans are preinstalled and setup) • Update the projects/repositories • For Contributors: • Ensure you have a GitHub user account • Create your own Branch of the corresponding repositories • Switch your local repositories on your VM, on which you want to commit, to your branched repos
  • 40. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Q & A 40
  • 41. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Go for it! 41