SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
SCALA
FOR
JAVA DEVELOPERS
Java Day Istanbul 2017
BARIS DERE
AGENDA
• About Me
• Introduction to Scala
• Development Tools
• Scala Frameworks
• CI / CD Tools and Integration
• Adoption of Scala for Java teams
• Scala cons/pros
ABOUT ME
• Software Architect
• Tech Lead Java / Scala
• Online Trainer
• 15 years Java experience
• 2 years Scala experience
• Certification: OCPJEA 6, OCPJP, OCPJD, OCPWCD,
OCPJBCD, Scrum, RUP
INTRODUCTION TO SCALA
• Released early 2004
• Created by Martin Odersky and his team
• Scalable Language
• Functional programming
• Object Oriented programming
• Strong Static Type system
• Runs on JVM
• Compatible with Java (Java to Scala) (Scala to Java)
INSTALLATION & REPL
• Install Java 8
• https://www.scala-lang.org/download/
• Download and extract
• REPL (Read Evaluate Print Loop)
• Evaluate expressions
• scala – java
• scalac - javac
EVERYTHING IS AN OBJECT
• No operators (Operator methods)
• No primitives (Int, Long, etc)
• No arrays (object Array)
IMMUTABLE
• Unchangeable
• Thread safe (Concurrency friendly)
• without synchronized
TYPE INFERENCE
• Compiler deduces type
FUNCTIONS
• Functional programming
• Define functions
• Return values
• Lambdas
• Function parameters
• Infix style
CLASSES
• Class
• Case class
• Object
• Trait
IMPLICITS
• Parameters
• Conversions
• Methods
PATTERN MATCHING
• It allows to match on any sort of data with a first-match
policy
• case class support
OPTION / SOME / NONE
• No null pointer exceptions
• Support for optional values
DEVELOPMENT TOOLS
• IntelliJ (JetBrains Scala Plugin)
• Scala IDE for Eclipse (http://scala-ide.org )
• Netbeans IDE with Scala Plugin
• SBT (Simple Build Tool) (Maven)
SCALA FRAMEWORKS /
TOOLS
• Testing
• ScalaTest
• Specs2
• ScalaCheck
• Database
• Slick
• Web
• Play Framework
• Finatra
• Scalatra
• Scala.js
CREATED WITH SCALA
• Apache Kafka
• Apacke Spark
• Akka
• https://github.com/lauris/awesome-scala
CI/CD TOOLS & INTEGRATION
• Jenkins
• Apache Maven (scala-maven-plugin)
• http://docs.scala-lang.org/tutorials/scala-with-maven.html
PROS & CONS
• Pros
• Runs on JVM & Use Java libraries
• OO & Functional Programming
• Higher productivity (Fun)
• Higher quality
• Cons
• Learning curve
• Slow compile
• More things to do
• Implicit, type inference, macro expansion, etc
• Limited backward compatibility
JAVA TO SCALA
• Training
• Functional Programming
• Learning curve
• Multi module projects
• Step by step refactoring

Contenu connexe

Tendances

WPP Hackday presentation - YQL
WPP Hackday presentation - YQLWPP Hackday presentation - YQL
WPP Hackday presentation - YQL
sriramiyer2007
 
End to End Testing with nightwatchjs
End to End  Testing with nightwatchjsEnd to End  Testing with nightwatchjs
End to End Testing with nightwatchjs
Srikanth Madduri
 

Tendances (20)

Adi Polak - Light up the Spark in Catalyst by avoiding UDFs - Codemotion Berl...
Adi Polak - Light up the Spark in Catalyst by avoiding UDFs - Codemotion Berl...Adi Polak - Light up the Spark in Catalyst by avoiding UDFs - Codemotion Berl...
Adi Polak - Light up the Spark in Catalyst by avoiding UDFs - Codemotion Berl...
 
Scala adoption by enterprises
Scala adoption by enterprisesScala adoption by enterprises
Scala adoption by enterprises
 
Spark UDFs are EviL, Catalyst to the rEsCue!
Spark UDFs are EviL, Catalyst to the rEsCue!Spark UDFs are EviL, Catalyst to the rEsCue!
Spark UDFs are EviL, Catalyst to the rEsCue!
 
Architecture - why so serious?
Architecture - why so serious?Architecture - why so serious?
Architecture - why so serious?
 
Sbt, idea and eclipse
Sbt, idea and eclipseSbt, idea and eclipse
Sbt, idea and eclipse
 
Akkurate Akka
Akkurate AkkaAkkurate Akka
Akkurate Akka
 
Evolving IGN’s New APIs with Scala
 Evolving IGN’s New APIs with Scala Evolving IGN’s New APIs with Scala
Evolving IGN’s New APIs with Scala
 
Scala Introduction - Meetup Scaladores RJ
Scala Introduction - Meetup Scaladores RJScala Introduction - Meetup Scaladores RJ
Scala Introduction - Meetup Scaladores RJ
 
Serverless On Stage - Serverless URL Shortener
Serverless On Stage - Serverless URL ShortenerServerless On Stage - Serverless URL Shortener
Serverless On Stage - Serverless URL Shortener
 
Java SE 7 New Features and Enhancements
Java SE 7 New Features and EnhancementsJava SE 7 New Features and Enhancements
Java SE 7 New Features and Enhancements
 
Developing Cross-Platform Web Apps with ASP.NET Core1.0
Developing Cross-Platform Web Apps with ASP.NET Core1.0Developing Cross-Platform Web Apps with ASP.NET Core1.0
Developing Cross-Platform Web Apps with ASP.NET Core1.0
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6
 
WPP Hackday presentation - YQL
WPP Hackday presentation - YQLWPP Hackday presentation - YQL
WPP Hackday presentation - YQL
 
20161103 Serverless Italy Meetup
20161103   Serverless Italy Meetup20161103   Serverless Italy Meetup
20161103 Serverless Italy Meetup
 
SQL Server 2016 What's New For Developers
SQL Server 2016  What's New For DevelopersSQL Server 2016  What's New For Developers
SQL Server 2016 What's New For Developers
 
AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
AtlasCamp 2014: Preparing Your Plugin for JIRA Data CenterAtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
 
A tale of 3 databases
A tale of 3 databasesA tale of 3 databases
A tale of 3 databases
 
End to End Testing with nightwatchjs
End to End  Testing with nightwatchjsEnd to End  Testing with nightwatchjs
End to End Testing with nightwatchjs
 
Reactive meetup 0 copy
Reactive meetup 0 copyReactive meetup 0 copy
Reactive meetup 0 copy
 
JIRA Data Center Implementation at Pitney Bowes - Peter Strickland
JIRA Data Center Implementation at Pitney Bowes - Peter StricklandJIRA Data Center Implementation at Pitney Bowes - Peter Strickland
JIRA Data Center Implementation at Pitney Bowes - Peter Strickland
 

Similaire à Scala for java developers 6 may 2017 - yeni

Rapid application development with spring roo j-fall 2010 - baris dere
Rapid application development with spring roo   j-fall 2010 - baris dereRapid application development with spring roo   j-fall 2010 - baris dere
Rapid application development with spring roo j-fall 2010 - baris dere
Baris Dere
 
An Introduction to Scala
An Introduction to ScalaAn Introduction to Scala
An Introduction to Scala
Brent Lemons
 
Scalding by Adform Research, Alex Gryzlov
Scalding by Adform Research, Alex GryzlovScalding by Adform Research, Alex Gryzlov
Scalding by Adform Research, Alex Gryzlov
Vasil Remeniuk
 

Similaire à Scala for java developers 6 may 2017 - yeni (20)

From java to scala at crowd mix
From java to scala at crowd mixFrom java to scala at crowd mix
From java to scala at crowd mix
 
Scala and Spark are Ideal for Big Data - Data Science Pop-up Seattle
Scala and Spark are Ideal for Big Data - Data Science Pop-up SeattleScala and Spark are Ideal for Big Data - Data Science Pop-up Seattle
Scala and Spark are Ideal for Big Data - Data Science Pop-up Seattle
 
Scala and Spark are Ideal for Big Data
Scala and Spark are Ideal for Big DataScala and Spark are Ideal for Big Data
Scala and Spark are Ideal for Big Data
 
Scala & Spark Online Training
Scala & Spark Online TrainingScala & Spark Online Training
Scala & Spark Online Training
 
Rapid application development with spring roo j-fall 2010 - baris dere
Rapid application development with spring roo   j-fall 2010 - baris dereRapid application development with spring roo   j-fall 2010 - baris dere
Rapid application development with spring roo j-fall 2010 - baris dere
 
Scala at Treasure Data
Scala at Treasure DataScala at Treasure Data
Scala at Treasure Data
 
Testing-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdfTesting-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdf
 
Selenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdfSelenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdf
 
Selenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdfSelenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdf
 
An Introduction to Scala
An Introduction to ScalaAn Introduction to Scala
An Introduction to Scala
 
Transitioning from Java to Scala for Spark - March 13, 2019
Transitioning from Java to Scala for Spark - March 13, 2019Transitioning from Java to Scala for Spark - March 13, 2019
Transitioning from Java to Scala for Spark - March 13, 2019
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
QA / Testing Tools, Automation Testing, Online & Classroom Training
QA / Testing Tools, Automation Testing, Online & Classroom Training QA / Testing Tools, Automation Testing, Online & Classroom Training
QA / Testing Tools, Automation Testing, Online & Classroom Training
 
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
 
Building machine learning applications locally with spark
Building machine learning applications locally with sparkBuilding machine learning applications locally with spark
Building machine learning applications locally with spark
 
Scala,a practicle approach
Scala,a practicle approachScala,a practicle approach
Scala,a practicle approach
 
Scalding by Adform Research, Alex Gryzlov
Scalding by Adform Research, Alex GryzlovScalding by Adform Research, Alex Gryzlov
Scalding by Adform Research, Alex Gryzlov
 
Whitepages Practical Experience Converting from Ruby to Reactive
Whitepages Practical Experience Converting from Ruby to ReactiveWhitepages Practical Experience Converting from Ruby to Reactive
Whitepages Practical Experience Converting from Ruby to Reactive
 
ow.ppt
ow.pptow.ppt
ow.ppt
 
ow.ppt
ow.pptow.ppt
ow.ppt
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Scala for java developers 6 may 2017 - yeni

  • 1. SCALA FOR JAVA DEVELOPERS Java Day Istanbul 2017 BARIS DERE
  • 2. AGENDA • About Me • Introduction to Scala • Development Tools • Scala Frameworks • CI / CD Tools and Integration • Adoption of Scala for Java teams • Scala cons/pros
  • 3. ABOUT ME • Software Architect • Tech Lead Java / Scala • Online Trainer • 15 years Java experience • 2 years Scala experience • Certification: OCPJEA 6, OCPJP, OCPJD, OCPWCD, OCPJBCD, Scrum, RUP
  • 4. INTRODUCTION TO SCALA • Released early 2004 • Created by Martin Odersky and his team • Scalable Language • Functional programming • Object Oriented programming • Strong Static Type system • Runs on JVM • Compatible with Java (Java to Scala) (Scala to Java)
  • 5. INSTALLATION & REPL • Install Java 8 • https://www.scala-lang.org/download/ • Download and extract • REPL (Read Evaluate Print Loop) • Evaluate expressions • scala – java • scalac - javac
  • 6. EVERYTHING IS AN OBJECT • No operators (Operator methods) • No primitives (Int, Long, etc) • No arrays (object Array)
  • 7. IMMUTABLE • Unchangeable • Thread safe (Concurrency friendly) • without synchronized
  • 9. FUNCTIONS • Functional programming • Define functions • Return values • Lambdas • Function parameters • Infix style
  • 10. CLASSES • Class • Case class • Object • Trait
  • 12. PATTERN MATCHING • It allows to match on any sort of data with a first-match policy • case class support
  • 13. OPTION / SOME / NONE • No null pointer exceptions • Support for optional values
  • 14. DEVELOPMENT TOOLS • IntelliJ (JetBrains Scala Plugin) • Scala IDE for Eclipse (http://scala-ide.org ) • Netbeans IDE with Scala Plugin • SBT (Simple Build Tool) (Maven)
  • 15. SCALA FRAMEWORKS / TOOLS • Testing • ScalaTest • Specs2 • ScalaCheck • Database • Slick • Web • Play Framework • Finatra • Scalatra • Scala.js
  • 16. CREATED WITH SCALA • Apache Kafka • Apacke Spark • Akka • https://github.com/lauris/awesome-scala
  • 17. CI/CD TOOLS & INTEGRATION • Jenkins • Apache Maven (scala-maven-plugin) • http://docs.scala-lang.org/tutorials/scala-with-maven.html
  • 18. PROS & CONS • Pros • Runs on JVM & Use Java libraries • OO & Functional Programming • Higher productivity (Fun) • Higher quality • Cons • Learning curve • Slow compile • More things to do • Implicit, type inference, macro expansion, etc • Limited backward compatibility
  • 19. JAVA TO SCALA • Training • Functional Programming • Learning curve • Multi module projects • Step by step refactoring