Absorbing Scala Into Java Ecosystem

2,752 views
2,664 views

Published on

Absorbing Scala In the Java Ecosystem

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,752
On SlideShare
0
From Embeds
0
Number of Embeds
69
Actions
Shares
0
Downloads
49
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Absorbing Scala Into Java Ecosystem

  1. 1. Absorbing Scala in the Java Ecosystem Eishay Smith kaChing
  2. 2. Who Am I kaChing - Rocking the inventing world ! Ex - Scala @ LinkedIn Blogging http://www.eishay.com Also today:          "A First Look at Scala on Google App Engine"
  3. 3. On the menu Getting started Scala and Java Runtime Build IDEs Test People
  4. 4. Getting started Silicon Valley Base camp '08 David Pollak, Bill Venners BASE: Bay Area Scala Enthusiasts Once a month Twitter (San Francisco) LinkedIn (Mountain View) Java Posse  Blogs and Twitter
  5. 5. Scala and Java  Different syntax and philosophy Unlike the Groovy (which we love !) you can't write Java syntax in Scala   Better interoperability Compiles to the same classes and interfaces Given a Jar its hard to tell where it came from Type safe  Easily sharing libraries, both ways Profiling, JMX, Serialization ....
  6. 6. Runtime Behave the same on runtime Your SysAdmin/Ops won't tell the diferance As fast as Java Static types, no introspection (see dynamic languages) Using primitives (though they look like objects) Better concurrency patterns (see Actors) Taking advantage of the JIT Makes the GC happy (immutability FTW)
  7. 7. Build Scalac knows how to read java code ! Needed for circular dependencies.
  8. 8. Testing Scala has some great Testing frameworks Specs, ScalaTest They do integrate nicely with existing frameworks  Can use bare bones JUnit (any version)  ANT JUnit plugin does not work with Scala Sources But does work with class files JUnit may use static suite() methods in the test class Problem: no static methods in Scala There is a solution
  9. 9. JUnit, ANT & Scala Instead of Use
  10. 10. Getting around static methods  
  11. 11. Your organization Integrating smartly with current Java project Use one way dependency Keeping the Scala illiterate IDEs happy Not everyone will jump on the wagon Take advantage on your IoC framework Spring/Guice Use Java interfaces to make the IDE happy
  12. 12. IDEs Good Support by the three big IDEs out there Eclipse, NetBeans and IDEA Healthy competition Soon to come: better IDE support Martin Ordersky is working on improving the IDE support with better compiler infrastructure Scala plugin does not come with the IDE Other team members may not install it
  13. 13. Get people interested Host a Scala BASE Invite Scala Speakers Lunchtime talks   TShirts
  14. 14. Getting started (for real this time) Scala is more then just nice syntax You may start writing Java code in Scala Start with testing Not with production code Test Java code from Scala Once way dependency Absorb Scala slowly, don't get drunk ! Your first Scala code will not be perfect It takes a while to understand the Scala philosophy
  15. 15. We Are Hiring !

×