Beautiful Development ブレイクスルー体験記
Upcoming SlideShare
Loading in...5
×
 

Beautiful Development ブレイクスルー体験記

on

  • 5,275 views

 

Statistics

Views

Total Views
5,275
Views on SlideShare
1,894
Embed Views
3,381

Actions

Likes
2
Downloads
35
Comments
3

21 Embeds 3,381

http://forza.cocolog-nifty.com 2512
http://hibituredure.blogspot.com 315
http://hibituredure.blogspot.jp 277
http://app.m-cocolog.jp 243
http://hibituredure.blogspot.de 10
http://www.slideshare.net 4
url_unknown 3
http://hibituredure.blogspot.fr 3
http://webcache.googleusercontent.com 2
http://hibituredure.blogspot.it 1
http://translate.googleusercontent.com 1
http://cache.yahoofs.jp 1
http://hibituredure.blogspot.gr 1
http://app.cocolog-nifty.com 1
http://hibituredure.blogspot.com.au 1
http://hibituredure.blogspot.ro 1
http://hibituredure.blogspot.sg 1
http://www.hibituredure.blogspot.de 1
http://hibituredure.blogspot.com.br 1
http://twitter.com 1
http://hibituredure.blogspot.ie 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

13 of 3 Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Beautiful Development ブレイクスルー体験記 Beautiful Development ブレイクスルー体験記 Presentation Transcript

  • PARTⅢ http://www.flickr.com/photos/penguinbush/2768719983/
  • (kentaro714)JavaEE ClojureIT
  • Agenda• PartⅢ••• DDD
  • PartⅢ
  • Part1PartⅡ ParⅢ
  • 1000
  • 20% … 100030% 50%
  • 500×0.2=100500 000 500 500 500×0.3=150 500×0.5=250
  • 800300 300 500 200
  • *+ $%&() *+#!"# ,-.(/#) 01.(/#) 2+ *+782+34 /*+#2+56
  • 200 :%&()* :+, !"# = 1000$ +,# = 200$12A0,:0, -+,./0,12 = A120,34 = 20% +,# = 40$12B0,:0, -+,./0,12 = B120,34 = 30% +,# = 60$12C0,:0, -+,./0,12 = C120,34 = 50% +,# = 100$
  • …500 500×0.2-50=50 50 200 700 500×0.3 500×0.5+50 =150 =300
  • ,-./01 23!"# 23#$%&($%(, $%), *+) 45&(6#) 78&(6#) 93 23<= 93:; /23# 93*+ 23$% 23#
  • :%&()* :+, !"# = 1000$ +,# = 700$12A0,:0, -+,./0,12 = A120,34 = 20% +,# = 90$12B0,:0, -+,560,12 = B120,34 = 30% +,# = 150$12C0,:0, -+,./0,12 = C120,34 = 50% +,# = 400$
  • Application Servicepublic class SyndicateService { private FacilityRepository facilityRepository; private LoanRepository loanRepository; public void drawDownWithAdjustment(long facilityId, BigDecimal amount, Map<String, BigDecimal> adjustment) { Facility facility = facilityRepository.get(facilityId); Loan loan = facility.getLoan(); for (Investment investment : facility.getInvestments()) { if (adjustment.containsKey(investment.getInvestor().getName())) { BigDecimal share = BigDecimal.valueOf(investment.getPercentage()); BigDecimal variance = adjustment.get(investment.getInvestor() .getName()); LoanAdjustment loanAdjustment = new LoanAdjustment( Money.yen(amount.multiply(share).add(variance))); loan.addLoanInvestment(loanAdjustment); } } loanRepository.save(loan); }
  • 500×90/700=64.28..500 500 300 800 500×210/700 500×400/700 =150 =285.714...
  • Application Servicepublic class SyndicateService { private FacilityRepository facilityRepository; private LoanRepository loanRepository; public void processPrincipalPayment(long facilityId, BigDecimal amount) { Facility facility = facilityRepository.get(facilityId); Loan loan = facility.getLoan(); for (LoanInvestment investment : loan.getLoanInvestments()) { BigDecimal share = investment.getAmount().divide(loan.getAmount()); Money newAmount = Money.yen(amount.multiply(share)); LoanAdjustment loanAdjustment = new LoanAdjustment(investment .getAmount().minus(newAmount)); loan.addLoanInvestment(loanAdjustment); } loanRepository.save(loan); }
  • 2 …
  • ,-./01 23!"# 23#$%&($%(, $%), *+) 45&(6#) 78&(6#) 93 23<= 93:; /23# 93*+ 23$% 23#
  • :1000 100 20% ¥20 50%100 ¥30 ¥50 30%
  • ¥70 ¥50¥20 ¥50 ¥150 ¥180¥30 ¥300 ¥350100 500 600
  • +,-./ +,- * !"#$(%&) 0121 (#$((), (*, %&) +,-3 7+,-./45+,-./ 6#(7+,-./) 89:7+,-./;
  • 78 ,-./01 78+)*+!"#$(!"%, !"&, () 23#(4+) 56#(4+) (.9:;< =.9:;< * * .9: .9: >?@? >?@? .9:A .9:A
  • Application Servicepublic class SyndicateService { private FacilityRepository facilityRepository; private LoanRepository loanRepository; public void drawDownWithAdjustment(long facilityId, BigDecimal amount, Map<String, BigDecimal> adjustment) { Facility facility = facilityRepository.get(facilityId); Loan loan = facility.getLoan(); AmountPie drawDownSharePie = facility.getPie().prorate(amount); AmountPie adjustSharePie = AmountPie.createFrom(adjustment); loan.setPie(drawDownSharePie.plus(adjustSharePie)); loanRepository.save(loan); } public void processPrincipalPayment(long facilityId, BigDecimal amount) { Facility facility = facilityRepository.get(facilityId); Loan loan = facility.getLoan(); SharePie principalSharePie = loan.getPie().prorate(amount); loan.setPie(loan.getPie().minus(principalSharePie)); loanRepository.save(loan); }
  • #&() !"#$% 12 3#&() *+#,-. /0 *+#,-. :;<=> BCDE 40 *+#,-. 2789 ?@A<=> 5612 AP
  • Application Servicepublic void drawDownWithAdjustment(long facilityId, BigDecimal amount, Map<String, BigDecimal> adjustment) { Facility facility = facilityRepository.findById(facilityId); Loan loan = facility.getLoan(); SharePie drawDownSharePie = facility.getSharePie().prorate(amount); SharePie adjustSharePie = AmountPie.createFrom(adjustment); Transaction drawDown = new DrawDown(loan, drawDownSharePie.plus(adjustSharePie)); loan.apply(drawDown); loanRepository.save(loan);}public void processPrincipalPayment(long facilityId, BigDecimal amount) { Facility facility = facilityRepository.get(facilityId); Loan loan = facility.getLoan(); SharePie principalSharePie = loan.getPie().prorate(amount); Transaction principalPayment = new PrincipalPayment(loan, principalSharePie); loan.apply(principalPayment); loanRepository.save(loan);}
  • public class DrawDown extends Transaction { public DrawDown(Position position, SharePie sharePie) { super(position, sharePie); } @Override public void execute() { SharePie newSharePie = position.getPie().plus(this.sharePie); position.setPie(newSharePie); }}
  • #&() !"#$% * 12 3#&() *+#,-. /0 *+#,-. :;<=> BCDE 40
  • http://www.flickr.com/photos/94379417@N00/4808475862/in/photostream/
  • http://www.flickr.com/photos/dmclear/5418495331/
  • http://www.flickr.com/photos/spcbrass/5451894896/
  • DDD