SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
SBT Made Simple
@囚千任 - http://afoo.me
Monday, September 9, 13
Immutability
Monday, September 9, 13
Setting
• A Build File is just a sequence of Settings
• A Setting is just a transformation to key-
value pairs
• A Transformation to some key-value pair is
immutable
Monday, September 9, 13
State Transition
• Project State is volatile
• state transition is immutable
Monday, September 9, 13
Composition
Monday, September 9, 13
Task
• dependency model to composition model
• task composition to form bigger granularity
unit
Monday, September 9, 13
InputTask
• Task with input
• input validation and completion support
with parser
• parser combinator is a form of composition
Monday, September 9, 13
Command
• Special InputTask
• accept Project state and settings as input
• project state is driven by a composition of
command execution
Monday, September 9, 13
Modularity
Monday, September 9, 13
Monday, September 9, 13
Configuration
• Ivy concept similar to Maven’s Scope
• Predefined or custom Configurations setup
Modularity boundary
Monday, September 9, 13
Project
• project is another level of modularity
• multiple project build definitions have their
specific configuration
Monday, September 9, 13
Plugins
• SBT plugin mechanism is another
modularity strategy
• enhance reusability too.
Monday, September 9, 13
Consistency
One Rule To Rule Them All
Monday, September 9, 13
Same Effect?
name := {
“hello” + “sbt”
}
sbt := {
“hello” + “sbt”
}
Monday, September 9, 13
Not Really!
name := {
“hello” + “sbt”
}
sbt := {
“hello” + “sbt”
}
=> Setting[String]
=> Setting[Task[String]]
Monday, September 9, 13
Key is the key
val name = settingKey[String](“desc.”)
name := {
“hello” + “sbt”
}
val sbt = taskKey[String](“task desc”)
sbt := {
“hello” + “sbt”
}
=> Setting[String]
=> Setting[Task[String]]
Monday, September 9, 13
Key is the key
• SettingKey[T]
• TaskKey[T]
• InputKey[T]
Monday, September 9, 13
Demo Time~
Monday, September 9, 13
Monday, September 9, 13

Weitere ähnliche Inhalte

Was ist angesagt?

Velocity - NxtGen Oxford
Velocity - NxtGen OxfordVelocity - NxtGen Oxford
Velocity - NxtGen Oxford
Phil Pursglove
 
JFB Internship Presentation
JFB Internship PresentationJFB Internship Presentation
JFB Internship Presentation
Garrett Riggs
 

Was ist angesagt? (17)

Deployments... from dreaded to delightful.
Deployments... from dreaded to delightful.Deployments... from dreaded to delightful.
Deployments... from dreaded to delightful.
 
Velocity - NxtGen Oxford
Velocity - NxtGen OxfordVelocity - NxtGen Oxford
Velocity - NxtGen Oxford
 
High Performance SSRS
High Performance SSRSHigh Performance SSRS
High Performance SSRS
 
DBAs vs Developers: JSON in SQL Server
DBAs vs Developers: JSON in SQL ServerDBAs vs Developers: JSON in SQL Server
DBAs vs Developers: JSON in SQL Server
 
JSON in SQL Server 2016
JSON in SQL Server 2016JSON in SQL Server 2016
JSON in SQL Server 2016
 
The Often Useful Somewhat Annoying World of WordPress Multisite
The Often Useful Somewhat Annoying World of WordPress MultisiteThe Often Useful Somewhat Annoying World of WordPress Multisite
The Often Useful Somewhat Annoying World of WordPress Multisite
 
Json usage and performance in sql server 2016
Json usage and performance in sql server 2016Json usage and performance in sql server 2016
Json usage and performance in sql server 2016
 
extended slow parts, HTML5 meets WPO
extended slow parts, HTML5 meets WPOextended slow parts, HTML5 meets WPO
extended slow parts, HTML5 meets WPO
 
Modifying and Extending the ESB Toolkit
Modifying and Extending the ESB ToolkitModifying and Extending the ESB Toolkit
Modifying and Extending the ESB Toolkit
 
Betfair's Site Rebuild: Fast - We promise
Betfair's Site Rebuild: Fast - We promiseBetfair's Site Rebuild: Fast - We promise
Betfair's Site Rebuild: Fast - We promise
 
ReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOMReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOM
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
 
Dry-ing Magritte
Dry-ing MagritteDry-ing Magritte
Dry-ing Magritte
 
JFB Internship Presentation
JFB Internship PresentationJFB Internship Presentation
JFB Internship Presentation
 
WEBridge 4 SAP ( Windchill and SAP Integration)
WEBridge 4 SAP ( Windchill and SAP Integration)WEBridge 4 SAP ( Windchill and SAP Integration)
WEBridge 4 SAP ( Windchill and SAP Integration)
 
Introduction to flexbox
Introduction  to  flexboxIntroduction  to  flexbox
Introduction to flexbox
 
DBAs vs Developers - JSON in SQL Server
DBAs vs Developers - JSON in SQL ServerDBAs vs Developers - JSON in SQL Server
DBAs vs Developers - JSON in SQL Server
 

Andere mochten auch

Andere mochten auch (17)

SBT Crash Course
SBT Crash CourseSBT Crash Course
SBT Crash Course
 
Getting started with sbt
Getting started with sbtGetting started with sbt
Getting started with sbt
 
挖财的互联网金融技术实践与探索@upyun opentalk
挖财的互联网金融技术实践与探索@upyun opentalk挖财的互联网金融技术实践与探索@upyun opentalk
挖财的互联网金融技术实践与探索@upyun opentalk
 
Kafka简介
Kafka简介Kafka简介
Kafka简介
 
Architecture patterns and practices
Architecture patterns and practicesArchitecture patterns and practices
Architecture patterns and practices
 
Scala the-good-parts
Scala the-good-partsScala the-good-parts
Scala the-good-parts
 
More Than Java Concurrency
More Than Java ConcurrencyMore Than Java Concurrency
More Than Java Concurrency
 
Sbt tutorial
Sbt tutorialSbt tutorial
Sbt tutorial
 
A day with sbt
A day with sbtA day with sbt
A day with sbt
 
Martial arts
Martial artsMartial arts
Martial arts
 
Proof and Emacs
Proof and EmacsProof and Emacs
Proof and Emacs
 
Scala funbyexample
Scala funbyexampleScala funbyexample
Scala funbyexample
 
Gold investment types introduction
Gold investment types introductionGold investment types introduction
Gold investment types introduction
 
モナドをつくろう
モナドをつくろうモナドをつくろう
モナドをつくろう
 
Continuations in scala (incomplete version)
Continuations in scala (incomplete version)Continuations in scala (incomplete version)
Continuations in scala (incomplete version)
 
Zookeeper In Simple Words
Zookeeper In Simple WordsZookeeper In Simple Words
Zookeeper In Simple Words
 
Simple Build Tool
Simple Build ToolSimple Build Tool
Simple Build Tool
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

SBT Made Simple