SlideShare a Scribd company logo
Go for the Money
JSR 354 Hackday
London Java Community 2014
June 2014
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 static final class Builder{…}
}
public abstract class AbstractContext implements Serializable{
…
public <T> T getNamedAttribute(Class<T> type, Object key,
T defaultValue);
public <T> T getNamedAttribute(Class<T> type, Object key);
public <T> T getAttribute(Class<T> type, T defaultValue);
public <T> T getAttribute(Class<T> type);
public Set<Class<?>> getAttributeTypes();
}
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.getAmountFactory()
.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
MonetaryContext monCtx = new MonetaryContext.Builder()
.setAmountFlavor(
AmountFlavor.PERFORMANT)
.create();
Class<? extends MonetaryAmount> type = MonetaryAmounts.queryAmontType(
monCtx);
MonetaryAmountFactory<?> fact = MonetaryAmounts.queryAmountFactory(
monCtx);
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
MonetaryOperator 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
ExchangeRate rate = provider.getExchangeRate("EUR", "CHF",
ConversionContext.of(
System.currentTimeMillis() + 2000L) );
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
Configured by AmountFormatContext
Supports also custom formats (configured an accessed using
AmountFormatContext)
Building AmountFormatContext using a fluent API
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(
AmountFormatContext.of(“myCustomFormat”));
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
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
Financial Calculations & Formulas
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
- Extending RI
- RI User Guide
- JavaMoney Lib
- TCK
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
Documenting the Reference Implementation
34
Objective: Document the RI (user guide)
How:
Take a Topic
Write documentation (asciidoc)
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Adoption Areas JSR 354 – Medium Level
Helping on JavaMoney Library
35
Objective: Help on JavaMoney
How:
Financial calculations in calc need tests
Factor out Dataservice Layer
All Modules require check on JavaDocs, Tests
Enhance APIs with Java 8 features (e.g. 310 types)
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 – Medium Level
Help on the TCK
36
Objective: Help finalizing the TCK
How:
Write TCK tests (only a few missing)
Check Test Failure Messages
Check Test Semantics
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Adoption Areas JSR 354 – Medium Level
Helping on the TCK (continued)
37
/**
* Test successful conversion for possible currency pairs.<br/>
* Hint: you may only check for rate factory, when using a hardcoded
* ExchangeRateProvider, such a provider
* must be also implemented and registered as an SPI.
*/
@Test @SpecAssertion(id = "432-A1", section="4.3.2")
public void testConversion(){
Assert.fail();
}
Describes the test
very briefly
References the according
section in the spec
Add your test code here.
Hint 1: if you are unsure first write a story line
Hint 2: some aspects may require to implement multiple
tests, just ensure the annotations are on all tests
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Adoption Areas JSR 354 – The Hard Way
Analyze and Improve Performance
38
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
39
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
40
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
41
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Setup
42
• 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
43
Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014
Go for it!
44

More Related Content

PDF
Lazy vs. Eager Loading Strategies in JPA 2.1
PDF
Second Level Cache in JPA Explained
PPTX
Thinking Beyond ORM in JPA
PPTX
Thinking Beyond ORM in JPA
PDF
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
PDF
JavaCro 2014 Scala and Java EE 7 Development Experiences
PDF
BOF2644 Developing Java EE 7 Scala apps
PDF
JAX RS and CDI bike the reactive bridge
Lazy vs. Eager Loading Strategies in JPA 2.1
Second Level Cache in JPA Explained
Thinking Beyond ORM in JPA
Thinking Beyond ORM in JPA
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
JavaCro 2014 Scala and Java EE 7 Development Experiences
BOF2644 Developing Java EE 7 Scala apps
JAX RS and CDI bike the reactive bridge

What's hot (20)

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

Viewers also liked (6)

PDF
Wie Monolithen für die Zukuft trimmen
PPTX
Manuel ponce
PDF
Configuration with Apache Tamaya
PDF
Configure Your Projects with Apache Tamaya
PDF
Configure once, run everywhere 2016
PDF
Going Resilient...
Wie Monolithen für die Zukuft trimmen
Manuel ponce
Configuration with Apache Tamaya
Configure Your Projects with Apache Tamaya
Configure once, run everywhere 2016
Going Resilient...

Similar to JSR 354 LJC-Hackday (20)

PDF
JSR 354 Hackday - What you can do...
PDF
Adopt JSR 354
PDF
Go for the Money - JSR 354
PPTX
JSR 354: Money and Currency API - Short Overview
PDF
JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !
PDF
Adopting F# at SBTech
PPT
Week 8
PPTX
Introduction to JSR 354 (Currency and Money) by Anatole Tresch
PPTX
JSR 354 - Money and Currency API
PPTX
Vertical Recommendation Using Collaborative Filtering
PPTX
JSR354 Utrecht JUG 20171027
PDF
WebNet Conference 2012 - Designing complex applications using html5 and knock...
PDF
Migrating from Struts 1 to Struts 2
PPTX
Reactive programming every day
PPTX
Spstc2011 managed metadata real world
PPTX
Spstc2011 managed metadata real world
PDF
Groovy On The Trading Desk
ODP
Ruslan Platonov - Transactions
PPTX
F# And Silverlight
PPTX
How to perform debounce in react
JSR 354 Hackday - What you can do...
Adopt JSR 354
Go for the Money - JSR 354
JSR 354: Money and Currency API - Short Overview
JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !
Adopting F# at SBTech
Week 8
Introduction to JSR 354 (Currency and Money) by Anatole Tresch
JSR 354 - Money and Currency API
Vertical Recommendation Using Collaborative Filtering
JSR354 Utrecht JUG 20171027
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Migrating from Struts 1 to Struts 2
Reactive programming every day
Spstc2011 managed metadata real world
Spstc2011 managed metadata real world
Groovy On The Trading Desk
Ruslan Platonov - Transactions
F# And Silverlight
How to perform debounce in react

More from Anatole Tresch (12)

PDF
Jsr382: Konfiguration in Java
PDF
Wie man Applikationen nicht bauen sollte...
PDF
The Gib Five - Modern IT Architecture
PDF
The Big Five - IT Architektur Heute
PDF
Microservices in Java
PDF
Disruption is Change is Future
PDF
Configuration with Microprofile and Apache Tamaya
PDF
Configuration beyond Java EE 8
PDF
Alles Docker oder Was ?
PPTX
Legacy Renewal of Central Framework in the Enterprise
PDF
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
PPTX
A first Draft to Java Configuration
Jsr382: Konfiguration in Java
Wie man Applikationen nicht bauen sollte...
The Gib Five - Modern IT Architecture
The Big Five - IT Architektur Heute
Microservices in Java
Disruption is Change is Future
Configuration with Microprofile and Apache Tamaya
Configuration beyond Java EE 8
Alles Docker oder Was ?
Legacy Renewal of Central Framework in the Enterprise
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
A first Draft to Java Configuration

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Modernising the Digital Integration Hub
PPTX
The various Industrial Revolutions .pptx
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
August Patch Tuesday
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
STKI Israel Market Study 2025 version august
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
NewMind AI Weekly Chronicles - August'25-Week II
Modernising the Digital Integration Hub
The various Industrial Revolutions .pptx
Developing a website for English-speaking practice to English as a foreign la...
1 - Historical Antecedents, Social Consideration.pdf
Group 1 Presentation -Planning and Decision Making .pptx
A novel scalable deep ensemble learning framework for big data classification...
August Patch Tuesday
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
DP Operators-handbook-extract for the Mautical Institute
cloud_computing_Infrastucture_as_cloud_p
Final SEM Unit 1 for mit wpu at pune .pptx
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
STKI Israel Market Study 2025 version august
OMC Textile Division Presentation 2021.pptx
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

JSR 354 LJC-Hackday

  • 1. Go for the Money JSR 354 Hackday London Java Community 2014 June 2014 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 static final class Builder{…} } public abstract class AbstractContext implements Serializable{ … public <T> T getNamedAttribute(Class<T> type, Object key, T defaultValue); public <T> T getNamedAttribute(Class<T> type, Object key); public <T> T getAttribute(Class<T> type, T defaultValue); public <T> T getAttribute(Class<T> type); public Set<Class<?>> getAttributeTypes(); } 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.getAmountFactory() .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 MonetaryContext monCtx = new MonetaryContext.Builder() .setAmountFlavor( AmountFlavor.PERFORMANT) .create(); Class<? extends MonetaryAmount> type = MonetaryAmounts.queryAmontType( monCtx); MonetaryAmountFactory<?> fact = MonetaryAmounts.queryAmountFactory( monCtx); 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 MonetaryOperator 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 ExchangeRate rate = provider.getExchangeRate("EUR", "CHF", ConversionContext.of( System.currentTimeMillis() + 2000L) ); 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 Configured by AmountFormatContext Supports also custom formats (configured an accessed using AmountFormatContext) Building AmountFormatContext using a fluent API 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( AmountFormatContext.of(“myCustomFormat”)); 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 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 Financial Calculations & Formulas 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 - Extending RI - RI User Guide - JavaMoney Lib - TCK 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 Documenting the Reference Implementation 34 Objective: Document the RI (user guide) How: Take a Topic Write documentation (asciidoc)
  • 35. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – Medium Level Helping on JavaMoney Library 35 Objective: Help on JavaMoney How: Financial calculations in calc need tests Factor out Dataservice Layer All Modules require check on JavaDocs, Tests Enhance APIs with Java 8 features (e.g. 310 types) Write/enhance user guide (asciidoc) New functionalities, ideas?
  • 36. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – Medium Level Help on the TCK 36 Objective: Help finalizing the TCK How: Write TCK tests (only a few missing) Check Test Failure Messages Check Test Semantics
  • 37. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – Medium Level Helping on the TCK (continued) 37 /** * Test successful conversion for possible currency pairs.<br/> * Hint: you may only check for rate factory, when using a hardcoded * ExchangeRateProvider, such a provider * must be also implemented and registered as an SPI. */ @Test @SpecAssertion(id = "432-A1", section="4.3.2") public void testConversion(){ Assert.fail(); } Describes the test very briefly References the according section in the spec Add your test code here. Hint 1: if you are unsure first write a story line Hint 2: some aspects may require to implement multiple tests, just ensure the annotations are on all tests
  • 38. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – The Hard Way Analyze and Improve Performance 38 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
  • 39. 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 39 Objective: Implement a Deployable Example Application How: Define Application Storyline Define Screens etc. Implement everything needed Deploy on CloudBees ?
  • 40. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Adoption Areas JSR 354 – The Hard Way Write an Implementation 40 Objective: Ensure Specification / API Quality How: Implement whole or parts of the specification Check the implementation against the TCK
  • 41. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Setup 41
  • 42. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Setup 42 • 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
  • 43. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Q & A 43
  • 44. Go for the money - JSR 354 - http://java.net/projects/javamoney March 2014 Go for it! 44