Scala in the Enterprise

1,487 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,487
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Scala in the Enterprise

  1. 1. Scala in the Enterprise
  2. 2. Intro • Eric Pederson – ericacm@gmail.com / @ericacm – Background in Java, Groovy, Javascript, PHP, etc. • Consulting at NYSE – One Scala app in production, one in QA – Contract finished 1Q11
  3. 3. Platform • JDK 1.6 • Scala 2.8 – Started development in March – 2.8 was bundled with Intellij IDEA • Using lots of Java libs – Spring, Hibernate, CXF, Mule, ApacheMQ – Bouncycastle, OpenSAML, Velocity, etc, etc. • Only Scala lib currently in use is ScalaTest
  4. 4. What’s been working well • Improved productivity • Concise code • Java interop • Type inferencing • REPL (mvn scala:console) • Collections API – Especially higher ordered fns (map/filter/etc) • Lambdas / Closures – Prevents proliferation of classes
  5. 5. What’s been working well • Mixins / trait stacking – trait UserIdentifierCmd extends ApiKeyCmd {..} – trait RoleIdCmd extends ApiKeyCmd {..} – object cmd extends UserIdentifierCmd with RoleIdCmd {..} • For comprehenions / expressions • Case classes / pattern matching • Actors • Type aliases • Structural (duck) typing • Import aliases
  6. 6. Complaints • Eclipse support is weak • Lack of type inferencing in IDEA • Collections are not serializable • Cannot write classfile annotations in Scala • Would like Groovy style .? null short circuiting
  7. 7. Complaints • Someone needs to write a “FP in Scala” book – Plenty of literature using Haskell – Blog posts here and there on advanced Scala FP – scalaz is looking promising in this area – Something like “Learn you a Haskell for Great Good” plus an in-depth discussion on scalaz.
  8. 8. Currently looking at • Lift “Box” or similar – Options don’t include failure info – scalaz Validation • http://applicative-errors- scala.googlecode.com/svn/artifacts/0.6/html/index.html – http://www.milessabin.com/misc/Chain.scala • Camel – To replace Mule – Scala DSL, Akka integration • Scalate / SSP • scala-time • scalaz

×