Scala Development Tools
-
Upload
hiraq-citra-m -
Category
Technology
-
view
123 -
download
0
description
Transcript of Scala Development Tools
Development Tools In ScalaIncrease Programmer’s Productivity
Me
https://facebook.com/hiraqhttps://twitter.com/_hiraq @_hiraq
Scala Programmer Levels
A1 : Beginning Application ProgrammerA2 : Intermediate Application ProgrammerA3 : Expert Application ProgrammerL1 : Junior Library DesignerL2 : Senior Library DesignerL3 : Expert Library Designer
Disclaimer
1. My Level -> A1 (Wannabe)2. Research > Coding
Why I Choose Scala ?
1. Twitter: From ruby to scala (backend)2. Foursquare: From php to scala (all)3. Mindtalk : From python to scala
from dynamic typing to static typing
Problem With Scala
1. Internet Connection2. Compile3. SABAR
Companies Using Scala
1. Twitter2. Foursquare3. Netflix4. Ebay5. Tumblr6. AirBnB7. Mindtalk8. …………...Apple?
Scala’s Frameworks
1. Lift2. Play (hello world)3. Scalatra4. Finatra (proved)5. Splay (toolkit)
Scala Web Server
1. Finagle (Twitter) -> Finatra2. Socko3. spray-can
Scala NoSQL Framework
1. Casbah (Mongodb) -> proved2. ReactiveMongo : Asynchronous Mongodb3. Sandra : Apache cassandra & Scala4. Scala-redis5. Gizzard
Scala Unit Test
1. Scalatest -> proved2. Scalacheck -> property based unit test3. Spec2 -> bdd
For Development
1. sbt (plugins: assembly / pack)2. conscript3. g8
SBT - (not so)Simple Build Tools
1. Scala2. Java3. c++
SBT - What’s for
1. Choose Scala Version2. Library dependency management3. Compile & package
SBT - Plugins
1. Assembly - Fat jar (Finatra)2. Pack - compile, packaging + installing
(support unix (linux) & windows), support versioning
https://github.com/sbt/sbt-assemblyhttps://github.com/xerial/sbt-pack
Conscript & g8
conscript : install & updateg8 : generate files & directories from templates published in github
g8 example template
1. fayimora/basic-scala-project : simple scala project + scala test2. pmandera/basic-scala-project : simple scala project + spec23. scalatra/scalatra-sbt : basic scalatra template
Installation - Conscript
curl https://raw.githubusercontent.com/n8han/conscript/master/setup.sh | sh
Installation - g8
curl https://raw.githubusercontent.com/n8han/conscript/master/setup.sh | sh
Command line
1. g8 fayimora/basic-scala-project2. sbt
Setup sbt pack
packSettings
packMain := Map("shorten" -> "api.hiraq.google.shortenurl.Shorten")
Demo - Google ShortenURL API
1. g8 -> fayimora/basic-scala-project2. Basic scala project3. Scalatest4. sbt pack
https://github.com/hiraq-scala/google-shorten-url