Why Scala?
                           Introducing Scala to your boss




                                João Bernardino
                                   December 2011
Thursday, December 1, 11
“If I were to pick a language to use today other than Java, it
             would be Scala”

                                                  James Gosling, creator of Java



             “If someone had shown me the ‘Programming in Scala’ book
             back in 2003, I’d probably have never created Groovy”

                                              James Strachan, creator of Groovy



             “No other language on the JVM seems as capable of being a
             ‘replacement for Java’ as Scala, and the momentum behind Scala
             is now unquestionable.”

                                             Charles Nutter, co-creator of JRuby

Thursday, December 1, 11
History


             Scala was designed from 2001 by Martin Odersky, creator of:

                           javac (Sun’s Java compiler)

                           Java 5 Generics

             First released in late 2003 / early 2004

             Current version: 2.9.1



Thursday, December 1, 11
One Slider
             Scala incorporates and unifies the best features from many
             previous languages

             Scala’s central drive is to make life easier and more productive for
             the developer

                   It cuts down boilerplate

                   It adds expressiveness (Object Oriented + Functional
                   Programming)

                   It protects existing investments by running on the Java Virtual
                   Machine and interoperating seamlessly with Java

Thursday, December 1, 11
Scala is...



Thursday, December 1, 11
Scala is...
        a general purposed programming language

             Some uses of Scala:

                   Scripting

                   Web Applications

                   Messaging

                   Highly scalable and performing backends

                   Mobile (android) Applications

                   DSLs

                   Graphical User Interfaces

Thursday, December 1, 11
Scala is...
        both Object-Oriented and Functional
             Developers coming from Java can apply familiar design patterns
             with Scala, while leveraging powerful new object-oriented features

                   ➡ Easy transition from Java

             Inspired by the long tradition of functional programming, Scala
             makes it easy to develop for modern multi-core CPUs and
             distributed cloud computing workloads that require concurrency
             and parallelism

                   ➡ Ideal to solve today’s challenges in building large enterprise
                           and Internet applications


Thursday, December 1, 11
Scala is...
        scalable and extensible

             Scala emphasizes scalability - up to large development teams,
             large codebases and large number of CPU cores

             Scala makes it easy to add new language constructs in form of
             libraries, or to create domain-specific languages (DSLs)

                   ➡ Reduce integration costs

                   ➡ Rapid prototyping



Thursday, December 1, 11
Scala is...
        Productive
             Scala is a concise and pragmatic language

             Scala programs are 1/2 to 1/3 of their Java equivalents

             Developers can write more functionality with less code, in
             less time

             Testing, review and maintenance is cheaper

        ➡ Productivity and quality increase

        ➡ Shorter time-to-market


Thursday, December 1, 11
Scala is...
        interoperable with Java
             Scala protects your investment in existing Java libraries, tools and developer skills

             Scala runs on the extremely mature Java Virtual Machine and has performance on
             par with Java

             Scala interoperates flawlessly with Java. Scala classes can call and be called by any
             Java class

        ➡ Allows incremental adoption, using existing Java code as is

        ➡ The development team will work on their familiar tools, but writing shorter, faster
             and more scalable code

        ➡ The operations team won’t see the difference, while using their well-understood
             deployment techniques


Thursday, December 1, 11
Scala in the Enterprise



Thursday, December 1, 11
Scala is...
        used by the world’s leading companies




             The number of leading companies that are successfully using Scala for critical
             business applications has grown enormously (and continues to grow)

             As a consequence, demand for Scala developers has grown dramatically while at the
             same time Scala has matured and spawned a solid support ecosystem


Thursday, December 1, 11
Twitter

             Twitter ported most of it’s back-end infrastructure, services
             and APIs to Scala

             The majority of users’ interactions with Twitter are Scala-
             powered

             “Scala played a critical role in improving the scalability and
             reliability of Twitter’s back-end services”

                                 Alex Payne, former Platform lead at Twitter


Thursday, December 1, 11
LinkedIn
             They created Norbert, a framework written in Scala that makes it fast
             and easy to write asynchronous, cluster aware, message based client/
             server applications

             They use it to power their People Search Engine (250 queries per
             second, 100 tokens per query), using a scatter-gather approach across
             a large server farm

             “Scala has been a powerful tool for LinkedIn and has offered
             greater scalability and efficiency towards our programming efforts”

                                   Chris Conrad, Engeneering manager at LinkedIn


Thursday, December 1, 11
NASA is using Scala for their jet propulsion DSL, to be used
             in shuttle and other space mission launch control operations

             Foursquare was completely ported to Scala and Lift

             The Guardian ported their real-time content searching,
             indexing and updating API from Java to Scala, in some cases
             reducing the search index build time from 20 hours to just
             one.

             “We’ve found that Scala enabled us to deliver things faster
             with less code. It’s reinvigorated the team”

                                         Graham Tackley, guardian.co.uk

Thursday, December 1, 11
Novell used Scala and Lift to developed Pulse, a cloud-based, real-
             time collaboration platform for the enterprise

             “Scala’s features saved us countless man-hours working on
             Pulse and allowed us to deliver a product into production much
             sooner than I ever would have imagined”

                                               Daniel Spiewak, Pulse developer

             At Simple all performance-sensitive components are build in Scala

             “Our team is using both Scala and Akka to build a flexible
             architecture that will scale predictably when needed”

                                                     Alex Payne, CTO of Simple


Thursday, December 1, 11
Scala’s ecosystem



Thursday, December 1, 11
Commercial Support...
             ...has taken a leap forward as Odersky (creator of Scala) and Bóner (creator of Akka)
             founded Typesafe, a new company with $3M in Series A financing led by Greylock
             Partners (Facebook, Groupon, LinkedIn, Pandora...)

             Typesafe (and it’s partners worldwide) provide,

                   Commercial support and maintenance

                   Training

                   Consulting

             Typesafe declared one of it’s top priorities the increase in quality of Scala’s developer
             tools, by:

                   Taking change of all key open source tools, such as SBT and Scala’s IDE for Eclipse

                   Committing to help improve the proprietary tools, like IntelliJ IDEA


Thursday, December 1, 11
Libraries and Frameworks
             Akka - Even-driven Middleware in Scala, ideal for building high
             performance and reliable distributed application

             Lift - The most powerful, secure and scalable web framework today

             Play - Pure Java and Scala full-stack web application framework

             Kestrel - Twitter’s open sourced message queue

             ScalaModules - DSL for OSGi development

             Many more exist and new ones are coming up to Scala ecosystem every
             day

             and also... every Java library can be used in your Scala project!

Thursday, December 1, 11
So, why Scala?



Thursday, December 1, 11
Productivity, efficiency and quality increase

             Decrease in maintenance costs

             Technology neutral (runs on the JVM, all java libraries available)

             Soft landing for Java developers

             Scala can be introduced incrementally

             Replaces scripting languages and in-house DSLs

             Excellent basis for concurrent, parallel and distributed computing

             Stable and open. Acceptance and adoption ramping up

             Advanced frameworks and powerful new technologies tailored to solve
             today’s programming challenges


Thursday, December 1, 11
</end>


                           João Bernardino
                             @JohnBernas
Thursday, December 1, 11

Selling Scala to your boss

  • 1.
    Why Scala? Introducing Scala to your boss João Bernardino December 2011 Thursday, December 1, 11
  • 2.
    “If I wereto pick a language to use today other than Java, it would be Scala” James Gosling, creator of Java “If someone had shown me the ‘Programming in Scala’ book back in 2003, I’d probably have never created Groovy” James Strachan, creator of Groovy “No other language on the JVM seems as capable of being a ‘replacement for Java’ as Scala, and the momentum behind Scala is now unquestionable.” Charles Nutter, co-creator of JRuby Thursday, December 1, 11
  • 3.
    History Scala was designed from 2001 by Martin Odersky, creator of: javac (Sun’s Java compiler) Java 5 Generics First released in late 2003 / early 2004 Current version: 2.9.1 Thursday, December 1, 11
  • 4.
    One Slider Scala incorporates and unifies the best features from many previous languages Scala’s central drive is to make life easier and more productive for the developer It cuts down boilerplate It adds expressiveness (Object Oriented + Functional Programming) It protects existing investments by running on the Java Virtual Machine and interoperating seamlessly with Java Thursday, December 1, 11
  • 5.
  • 6.
    Scala is... a general purposed programming language Some uses of Scala: Scripting Web Applications Messaging Highly scalable and performing backends Mobile (android) Applications DSLs Graphical User Interfaces Thursday, December 1, 11
  • 7.
    Scala is... both Object-Oriented and Functional Developers coming from Java can apply familiar design patterns with Scala, while leveraging powerful new object-oriented features ➡ Easy transition from Java Inspired by the long tradition of functional programming, Scala makes it easy to develop for modern multi-core CPUs and distributed cloud computing workloads that require concurrency and parallelism ➡ Ideal to solve today’s challenges in building large enterprise and Internet applications Thursday, December 1, 11
  • 8.
    Scala is... scalable and extensible Scala emphasizes scalability - up to large development teams, large codebases and large number of CPU cores Scala makes it easy to add new language constructs in form of libraries, or to create domain-specific languages (DSLs) ➡ Reduce integration costs ➡ Rapid prototyping Thursday, December 1, 11
  • 9.
    Scala is... Productive Scala is a concise and pragmatic language Scala programs are 1/2 to 1/3 of their Java equivalents Developers can write more functionality with less code, in less time Testing, review and maintenance is cheaper ➡ Productivity and quality increase ➡ Shorter time-to-market Thursday, December 1, 11
  • 10.
    Scala is... interoperable with Java Scala protects your investment in existing Java libraries, tools and developer skills Scala runs on the extremely mature Java Virtual Machine and has performance on par with Java Scala interoperates flawlessly with Java. Scala classes can call and be called by any Java class ➡ Allows incremental adoption, using existing Java code as is ➡ The development team will work on their familiar tools, but writing shorter, faster and more scalable code ➡ The operations team won’t see the difference, while using their well-understood deployment techniques Thursday, December 1, 11
  • 11.
    Scala in theEnterprise Thursday, December 1, 11
  • 12.
    Scala is... used by the world’s leading companies The number of leading companies that are successfully using Scala for critical business applications has grown enormously (and continues to grow) As a consequence, demand for Scala developers has grown dramatically while at the same time Scala has matured and spawned a solid support ecosystem Thursday, December 1, 11
  • 13.
    Twitter Twitter ported most of it’s back-end infrastructure, services and APIs to Scala The majority of users’ interactions with Twitter are Scala- powered “Scala played a critical role in improving the scalability and reliability of Twitter’s back-end services” Alex Payne, former Platform lead at Twitter Thursday, December 1, 11
  • 14.
    LinkedIn They created Norbert, a framework written in Scala that makes it fast and easy to write asynchronous, cluster aware, message based client/ server applications They use it to power their People Search Engine (250 queries per second, 100 tokens per query), using a scatter-gather approach across a large server farm “Scala has been a powerful tool for LinkedIn and has offered greater scalability and efficiency towards our programming efforts” Chris Conrad, Engeneering manager at LinkedIn Thursday, December 1, 11
  • 15.
    NASA is usingScala for their jet propulsion DSL, to be used in shuttle and other space mission launch control operations Foursquare was completely ported to Scala and Lift The Guardian ported their real-time content searching, indexing and updating API from Java to Scala, in some cases reducing the search index build time from 20 hours to just one. “We’ve found that Scala enabled us to deliver things faster with less code. It’s reinvigorated the team” Graham Tackley, guardian.co.uk Thursday, December 1, 11
  • 16.
    Novell used Scalaand Lift to developed Pulse, a cloud-based, real- time collaboration platform for the enterprise “Scala’s features saved us countless man-hours working on Pulse and allowed us to deliver a product into production much sooner than I ever would have imagined” Daniel Spiewak, Pulse developer At Simple all performance-sensitive components are build in Scala “Our team is using both Scala and Akka to build a flexible architecture that will scale predictably when needed” Alex Payne, CTO of Simple Thursday, December 1, 11
  • 17.
  • 18.
    Commercial Support... ...has taken a leap forward as Odersky (creator of Scala) and Bóner (creator of Akka) founded Typesafe, a new company with $3M in Series A financing led by Greylock Partners (Facebook, Groupon, LinkedIn, Pandora...) Typesafe (and it’s partners worldwide) provide, Commercial support and maintenance Training Consulting Typesafe declared one of it’s top priorities the increase in quality of Scala’s developer tools, by: Taking change of all key open source tools, such as SBT and Scala’s IDE for Eclipse Committing to help improve the proprietary tools, like IntelliJ IDEA Thursday, December 1, 11
  • 19.
    Libraries and Frameworks Akka - Even-driven Middleware in Scala, ideal for building high performance and reliable distributed application Lift - The most powerful, secure and scalable web framework today Play - Pure Java and Scala full-stack web application framework Kestrel - Twitter’s open sourced message queue ScalaModules - DSL for OSGi development Many more exist and new ones are coming up to Scala ecosystem every day and also... every Java library can be used in your Scala project! Thursday, December 1, 11
  • 20.
  • 21.
    Productivity, efficiency andquality increase Decrease in maintenance costs Technology neutral (runs on the JVM, all java libraries available) Soft landing for Java developers Scala can be introduced incrementally Replaces scripting languages and in-house DSLs Excellent basis for concurrent, parallel and distributed computing Stable and open. Acceptance and adoption ramping up Advanced frameworks and powerful new technologies tailored to solve today’s programming challenges Thursday, December 1, 11
  • 22.
    </end> João Bernardino @JohnBernas Thursday, December 1, 11