SlideShare a Scribd company logo
Your First Scala Web Application
using Play! Framework
By Matthew Barlocker
The Barlocker
● Chief Architect at Lucid
Software Inc
● Learned Scala and Play!
“the hard way”.
● Graduated with Bachelors
Degree in Computer Science
from BYU in 2008.
● Developed software for the
following industries:
– Network Security
– Social Gaming
– Financial
– Productivity
Time is Scarce!
Write your questions down
and ask me after the session.
Quick Assessment
● Languages
– Scala
– Java
– PHP
– Ruby
● MVC Frameworks
● Build Tools
– sbt
– maven
– ivy
Get it Running
● Requires Java >= 6 to run
● You need a terminal.
● Add play-2.1.4 directory to PATH
– Linux
● `export PATH=$PATH:/path/play-2.1.4`
● `chmod +x /path/play-2.1.4/play`
– Windows
● Add path to global environment variables
● Don't use a path with spaces
Get it Running
● `cd /parent/dir/for/new/project`
● `play new strangeloop`
● `cd strangeloop`
● `git init` - suggested
● `play [debug]`
– `run [port=9000]`
● Go to http://localhost:9000
Scala Intro
● The current version is 2.10.2.
● Open your cheat sheet for code samples.
● Runs on the JVM.
● 100% inter-operable with Java code (jars).
● Functions are first-class citizens.
● Typed, compiled language.
● Semicolons are inferred.
● Functional language that supports procedural.
Scala Intro - Variables
● val
– immutable
– good for multi-threading
– recommended type of variable
● var
– mutable
– good for procedural code
Scala Intro - Typing
● Colon-postfix notation for typing.
● All variables and functions can be explicitly
typed.
● Some variables and functions can be implicitly
typed.
Scala Intro - Looping
● Most looping is done over lists, arrays, maps,
and other data structures using .foreach() or
.map().
● for (i <- 0 until 10)
– Looping criteria (in parens) is calculated exactly
once.
– Can be used to 'yield' results.
● [do …] while (i < 10)
Scala Intro – Control Structures
● if (condition) … else …
– Returns a value.
– Use instead of a ternary operator.
● match statement
– Similar to a switch, but much more flexible.
– Can match regular expressions, interfaces,
classes, and other extractors.
Scala Intro - Functions
● 'public' is the default access modifier.
● The last value computed is returned.
● Function names can include operators.
– '+' is a function on strings and numbers.
● Parameters must be typed.
● Return value can be inferred.
● Multiple parameter lists are allowed. Not the
same as currying.
Scala Intro - Collections
● Tuples have a length and each element has a
type.
– val a = (5, 2.0, “hello”)
● Maps are key -> value pairs
– val b = Map(1 -> “a”, 2 -> “b”)
● Arrays are mutable
– val c = Array(4, 5, 6)
● Lists are immutable
– val d = List(7, 8, 9)
Scala Intro - Classes
● Case classes get the following for free:
– 'equals', 'toString', 'hashCode', 'copy' functions.
– every class argument is a public val unless
specified otherwise.
● Objects are singleton classes.
– Must be used for static methods.
● Traits are abstract classes.
– No class arguments.
– Used for multiple inheritance or interfaces.
Scala Intro – Console Example
● Variables
● Functions
● Classes
● Options
● Matching
● Lists, Maps
● Iterating
● Function parameters
● Parameter Lists
● Conditionals
Scala Resources
● http://www.scala-lang.org/
● http://www.scala-lang.org/documentation/
● https://groups.google.com/d/forum/scala-user
● irc://irc.freenode.net/scala
● http://www.scala-lang.org/community/
● https://github.com/scala/scala
Play! Intro
● Current version is 2.1.4.
● Play Framework makes it easy to build web
applications with Java & Scala.
● Play is based on a lightweight, stateless, web-
friendly architecture.
● Make your changes and simply hit refresh! All
you need is a browser and a text editor.
Play! Features
● Rebuilds the project when you change files and
refresh the page.
● IDE support for IntelliJ, Eclipse, Sublime, and
more.
● Asset compiler for LESS, CoffeeScript, and
more.
● JSON is a first-class citizen.
Who Uses Play!
Play! Resources
● http://www.playframework.com/
● https://github.com/playframework/playframework
● https://groups.google.com/group/play-framework
● http://www.playframework.com/documentation
● http://twitter.com/playframework
Let's Build It!
Topics
● Request Handling
– URLs
– Controllers
– Actions
– Responses
– HTTP
● Views
– Templates
– Encoding
– Assets
● Forms
– Validation
– Submission
Topics (cont.)
● Database
– Evolutions
– Connections
– Models
– Queries
● Build System
– Dependencies
– Deployment
– Testing
● Application Global
– Request Handling
– Error Handling
– Application Hooks
● I18n
– Strings
– Views
– Configuration
Topics (cont.)
● Testing
– Fake Application
– Fake Requests
– Fake DB
– Patterns
Reminder:
Write your questions down
Request Handling - Terminology
● Route – Mapping of URL/HTTP Method to an
action
● Action – Function that takes a request and
returns a result
● Controller – Action generator
● Request – HTTP headers and body
● Result – HTTP status code, headers, and body
Request Handling - Exercise
● Create a new home page
● Create a page that redirects to the new home page
● Set content type on home page
● Create a page to set, and a page to get:
– Headers
– Cookies
– Session
– Flash
● Create a TODO page
● Use URL parameters and action to send 404
SimpleResults
● Ok
● Created
● Accepted
● MovedPermanently
● Found
● SeeOther
● NotModified
● TemporaryRedirect
● BadRequest
● Unauthorized
● Forbidden
● NotFound
● InternalServerError
● ...
Routes
● Every route has HTTP method, URL, and
action to call.
● URL can include parameters, which are passed
to the action.
● These parameters can be validated and
converted as part of the matching.
● First matching route wins.
Views
● '@' is the magical operator.
● No special functions, it's just embedded Scala code.
● Each view is just a function that can be called from
anywhere.
● Views set the content type automatically.
Views - Exercise
● Create view for URL parameter page.
● Create view for the home page.
● Create template, use it in the home page view.
● Add links to template
● Display flash messages in layout.
● Use implicit request.
Views
● Files are named package/myview.scala.html.
● Views are referenced views.html.package.myview.
● All values are HTML encoded for you.
● Views are not intended to handle big data.
● If broken, play with the whitespace.
Forms - Exercise
● Create a contact form.
● Create a login form. On submit, set a fake user
id in the session.
Forms
● Form.bindFromRequest will use GET and
POST variables.
● There are many constraints and data types.
Explore to find them.
Database - Exercise
● Configure a database connection.
● Create a database evolution for users table.
● Create page and model to register users.
● Update login to check against user list.
● Create page to show current user.
Build System
● Reload play after changing dependencies.
● Find dependencies at http://mvnrepository.com/
● Try a deployment
– `play stage`
– `./target/start -Dhttp.port=9000`
● To deploy, copy target/start and target/staged
to the target system, and run 'start'
I18n - Exercise
● Replace all messages in the layout.
● Add language files
● Configure another language
● Try it in the browser
Testing - Exercise
● Inspect and modify existing tests.
● Run tests from command line.
Time Permitting
● Advanced Request Handling
– EssentialAction
– RequestHeader
– Iteratees
– Filters
● Application Global
Thank you for your time.
Any Questions?
Lucid Software Inc
● Building the next generation of collaborative web
applications
● VC funded, high growth, profitable
● Graduates from Harvard, MIT, Stanford
● Team has worked at Google, Amazon, Microsoft
https://www.lucidchart.com/jobs

More Related Content

What's hot

AWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On GuideAWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On Guide
Manas Mondal
 
Building a Data Science as a Service Platform in Azure with Databricks
Building a Data Science as a Service Platform in Azure with DatabricksBuilding a Data Science as a Service Platform in Azure with Databricks
Building a Data Science as a Service Platform in Azure with Databricks
Databricks
 
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...
Amazon Web Services
 
Data modeling star schema
Data modeling star schemaData modeling star schema
Data modeling star schema
Sayed Ahmed
 
아마존닷컴처럼 Amazon Forecast로 시계열 예측하기 - 강지양 솔루션즈 아키텍트, AWS / 강태욱 매니저, GSSHOP :: A...
아마존닷컴처럼 Amazon Forecast로 시계열 예측하기 - 강지양 솔루션즈 아키텍트, AWS / 강태욱 매니저, GSSHOP :: A...아마존닷컴처럼 Amazon Forecast로 시계열 예측하기 - 강지양 솔루션즈 아키텍트, AWS / 강태욱 매니저, GSSHOP :: A...
아마존닷컴처럼 Amazon Forecast로 시계열 예측하기 - 강지양 솔루션즈 아키텍트, AWS / 강태욱 매니저, GSSHOP :: A...
Amazon Web Services Korea
 
Build a Recommendation Engine using Amazon Machine Learning in Real-time
Build a Recommendation Engine using Amazon Machine Learning in Real-timeBuild a Recommendation Engine using Amazon Machine Learning in Real-time
Build a Recommendation Engine using Amazon Machine Learning in Real-time
Amazon Web Services
 
AWSome Day 2016 - Module 1: AWS Introduction and History
AWSome Day 2016 - Module 1: AWS Introduction and HistoryAWSome Day 2016 - Module 1: AWS Introduction and History
AWSome Day 2016 - Module 1: AWS Introduction and History
Amazon Web Services
 
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018Amazon Web Services Korea
 
AWS as a Data Platform
AWS as a Data PlatformAWS as a Data Platform
AWS as a Data Platform
Amazon Web Services
 
AWS Summit Seoul 2023 | 모두를 위한 BI, QuickSight
AWS Summit Seoul 2023 | 모두를 위한 BI, QuickSightAWS Summit Seoul 2023 | 모두를 위한 BI, QuickSight
AWS Summit Seoul 2023 | 모두를 위한 BI, QuickSight
Amazon Web Services Korea
 
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon Web Services Korea
 
Module 1: Introduction to the AWS Cloud - AWSome Day Online Conference 2019
Module 1: Introduction to the AWS Cloud - AWSome Day Online Conference 2019Module 1: Introduction to the AWS Cloud - AWSome Day Online Conference 2019
Module 1: Introduction to the AWS Cloud - AWSome Day Online Conference 2019
Amazon Web Services
 
AWS Cloud Watch
AWS Cloud WatchAWS Cloud Watch
AWS Cloud Watch
zekeLabs Technologies
 
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018
Amazon Web Services
 
Building Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS GlueBuilding Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS Glue
Amazon Web Services
 
Power BI: Introduction with a use case and solution
Power BI: Introduction with a use case and solutionPower BI: Introduction with a use case and solution
Power BI: Introduction with a use case and solution
Alvina Verghis
 
AWS Smart Factory - 이세현, 조이정, 정현아, 김대근, 정창호, 김지선, AWS 솔루션즈 아키텍트 :: AWS Summit...
AWS Smart Factory - 이세현, 조이정, 정현아, 김대근, 정창호, 김지선, AWS 솔루션즈 아키텍트 :: AWS Summit...AWS Smart Factory - 이세현, 조이정, 정현아, 김대근, 정창호, 김지선, AWS 솔루션즈 아키텍트 :: AWS Summit...
AWS Smart Factory - 이세현, 조이정, 정현아, 김대근, 정창호, 김지선, AWS 솔루션즈 아키텍트 :: AWS Summit...
Amazon Web Services Korea
 
AWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best PracticesAWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best PracticesAmazon Web Services
 
Data Catalog & ETL - Glue & Athena
Data Catalog & ETL - Glue & AthenaData Catalog & ETL - Glue & Athena
Data Catalog & ETL - Glue & Athena
Amazon Web Services
 
AWS Partner Network 2019 and Beyond (GPSBUS207) - AWS re:Invent 2018
AWS Partner Network 2019 and Beyond (GPSBUS207) - AWS re:Invent 2018AWS Partner Network 2019 and Beyond (GPSBUS207) - AWS re:Invent 2018
AWS Partner Network 2019 and Beyond (GPSBUS207) - AWS re:Invent 2018
Amazon Web Services
 

What's hot (20)

AWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On GuideAWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On Guide
 
Building a Data Science as a Service Platform in Azure with Databricks
Building a Data Science as a Service Platform in Azure with DatabricksBuilding a Data Science as a Service Platform in Azure with Databricks
Building a Data Science as a Service Platform in Azure with Databricks
 
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...
 
Data modeling star schema
Data modeling star schemaData modeling star schema
Data modeling star schema
 
아마존닷컴처럼 Amazon Forecast로 시계열 예측하기 - 강지양 솔루션즈 아키텍트, AWS / 강태욱 매니저, GSSHOP :: A...
아마존닷컴처럼 Amazon Forecast로 시계열 예측하기 - 강지양 솔루션즈 아키텍트, AWS / 강태욱 매니저, GSSHOP :: A...아마존닷컴처럼 Amazon Forecast로 시계열 예측하기 - 강지양 솔루션즈 아키텍트, AWS / 강태욱 매니저, GSSHOP :: A...
아마존닷컴처럼 Amazon Forecast로 시계열 예측하기 - 강지양 솔루션즈 아키텍트, AWS / 강태욱 매니저, GSSHOP :: A...
 
Build a Recommendation Engine using Amazon Machine Learning in Real-time
Build a Recommendation Engine using Amazon Machine Learning in Real-timeBuild a Recommendation Engine using Amazon Machine Learning in Real-time
Build a Recommendation Engine using Amazon Machine Learning in Real-time
 
AWSome Day 2016 - Module 1: AWS Introduction and History
AWSome Day 2016 - Module 1: AWS Introduction and HistoryAWSome Day 2016 - Module 1: AWS Introduction and History
AWSome Day 2016 - Module 1: AWS Introduction and History
 
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018
 
AWS as a Data Platform
AWS as a Data PlatformAWS as a Data Platform
AWS as a Data Platform
 
AWS Summit Seoul 2023 | 모두를 위한 BI, QuickSight
AWS Summit Seoul 2023 | 모두를 위한 BI, QuickSightAWS Summit Seoul 2023 | 모두를 위한 BI, QuickSight
AWS Summit Seoul 2023 | 모두를 위한 BI, QuickSight
 
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
 
Module 1: Introduction to the AWS Cloud - AWSome Day Online Conference 2019
Module 1: Introduction to the AWS Cloud - AWSome Day Online Conference 2019Module 1: Introduction to the AWS Cloud - AWSome Day Online Conference 2019
Module 1: Introduction to the AWS Cloud - AWSome Day Online Conference 2019
 
AWS Cloud Watch
AWS Cloud WatchAWS Cloud Watch
AWS Cloud Watch
 
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018
 
Building Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS GlueBuilding Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS Glue
 
Power BI: Introduction with a use case and solution
Power BI: Introduction with a use case and solutionPower BI: Introduction with a use case and solution
Power BI: Introduction with a use case and solution
 
AWS Smart Factory - 이세현, 조이정, 정현아, 김대근, 정창호, 김지선, AWS 솔루션즈 아키텍트 :: AWS Summit...
AWS Smart Factory - 이세현, 조이정, 정현아, 김대근, 정창호, 김지선, AWS 솔루션즈 아키텍트 :: AWS Summit...AWS Smart Factory - 이세현, 조이정, 정현아, 김대근, 정창호, 김지선, AWS 솔루션즈 아키텍트 :: AWS Summit...
AWS Smart Factory - 이세현, 조이정, 정현아, 김대근, 정창호, 김지선, AWS 솔루션즈 아키텍트 :: AWS Summit...
 
AWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best PracticesAWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best Practices
 
Data Catalog & ETL - Glue & Athena
Data Catalog & ETL - Glue & AthenaData Catalog & ETL - Glue & Athena
Data Catalog & ETL - Glue & Athena
 
AWS Partner Network 2019 and Beyond (GPSBUS207) - AWS re:Invent 2018
AWS Partner Network 2019 and Beyond (GPSBUS207) - AWS re:Invent 2018AWS Partner Network 2019 and Beyond (GPSBUS207) - AWS re:Invent 2018
AWS Partner Network 2019 and Beyond (GPSBUS207) - AWS re:Invent 2018
 

Viewers also liked

Play Framework: async I/O with Java and Scala
Play Framework: async I/O with Java and ScalaPlay Framework: async I/O with Java and Scala
Play Framework: async I/O with Java and Scala
Yevgeniy Brikman
 
Building Apis in Scala with Playframework2
Building Apis in Scala with Playframework2Building Apis in Scala with Playframework2
Building Apis in Scala with Playframework2
Manish Pandit
 
Scala, Play Framework и SBT для быстрого прототипирования и разработки веб-пр...
Scala, Play Framework и SBT для быстрого прототипирования и разработки веб-пр...Scala, Play Framework и SBT для быстрого прототипирования и разработки веб-пр...
Scala, Play Framework и SBT для быстрого прототипирования и разработки веб-пр...
Magneta AI
 
[Start] Playing
[Start] Playing[Start] Playing
[Start] Playing
佑介 九岡
 
Playing with Scala
Playing with ScalaPlaying with Scala
Playing with Scala
Tamer Abdul-Radi
 
DUMP-2015: «Распределенная обработка миллионов документов на Scala и Akka» Ст...
DUMP-2015: «Распределенная обработка миллионов документов на Scala и Akka» Ст...DUMP-2015: «Распределенная обработка миллионов документов на Scala и Akka» Ст...
DUMP-2015: «Распределенная обработка миллионов документов на Scala и Akka» Ст...
it-people
 
Play Template Engine Based On Scala
Play Template Engine Based On ScalaPlay Template Engine Based On Scala
Play Template Engine Based On Scala
Knoldus Inc.
 
Designing Reactive Systems with Akka
Designing Reactive Systems with AkkaDesigning Reactive Systems with Akka
Designing Reactive Systems with Akka
Thomas Lockney
 
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011
Matt Raible
 
Play framework And Google Cloud Platform GCP.
Play framework And Google Cloud Platform GCP.Play framework And Google Cloud Platform GCP.
Play framework And Google Cloud Platform GCP.
Eng Chrispinus Onyancha
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Manuel Bernhardt
 
Введение в Akka
Введение в AkkaВведение в Akka
Введение в AkkaZheka Kozlov
 
Reactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysReactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDays
Manuel Bernhardt
 
Akka-http
Akka-httpAkka-http
Akka-http
Iosif Itkin
 
Lagom in Practice
Lagom in PracticeLagom in Practice
Lagom in Practice
JWORKS powered by Ordina
 
Spring Scala : 스프링이 스칼라를 만났을 때
Spring Scala : 스프링이 스칼라를 만났을 때Spring Scala : 스프링이 스칼라를 만났을 때
Spring Scala : 스프링이 스칼라를 만났을 때
JeongHun Byeon
 
Dependency injection in scala
Dependency injection in scalaDependency injection in scala
Dependency injection in scala
Michal Bigos
 
Akka http 2
Akka http 2Akka http 2
Akka http 2
Jean Detoeuf
 
Язык программирования Scala / Владимир Успенский (TCS Bank)
Язык программирования Scala / Владимир Успенский (TCS Bank)Язык программирования Scala / Владимир Успенский (TCS Bank)
Язык программирования Scala / Владимир Успенский (TCS Bank)Ontico
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play apps
Yevgeniy Brikman
 

Viewers also liked (20)

Play Framework: async I/O with Java and Scala
Play Framework: async I/O with Java and ScalaPlay Framework: async I/O with Java and Scala
Play Framework: async I/O with Java and Scala
 
Building Apis in Scala with Playframework2
Building Apis in Scala with Playframework2Building Apis in Scala with Playframework2
Building Apis in Scala with Playframework2
 
Scala, Play Framework и SBT для быстрого прототипирования и разработки веб-пр...
Scala, Play Framework и SBT для быстрого прототипирования и разработки веб-пр...Scala, Play Framework и SBT для быстрого прототипирования и разработки веб-пр...
Scala, Play Framework и SBT для быстрого прототипирования и разработки веб-пр...
 
[Start] Playing
[Start] Playing[Start] Playing
[Start] Playing
 
Playing with Scala
Playing with ScalaPlaying with Scala
Playing with Scala
 
DUMP-2015: «Распределенная обработка миллионов документов на Scala и Akka» Ст...
DUMP-2015: «Распределенная обработка миллионов документов на Scala и Akka» Ст...DUMP-2015: «Распределенная обработка миллионов документов на Scala и Akka» Ст...
DUMP-2015: «Распределенная обработка миллионов документов на Scala и Akka» Ст...
 
Play Template Engine Based On Scala
Play Template Engine Based On ScalaPlay Template Engine Based On Scala
Play Template Engine Based On Scala
 
Designing Reactive Systems with Akka
Designing Reactive Systems with AkkaDesigning Reactive Systems with Akka
Designing Reactive Systems with Akka
 
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011
 
Play framework And Google Cloud Platform GCP.
Play framework And Google Cloud Platform GCP.Play framework And Google Cloud Platform GCP.
Play framework And Google Cloud Platform GCP.
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
 
Введение в Akka
Введение в AkkaВведение в Akka
Введение в Akka
 
Reactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysReactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDays
 
Akka-http
Akka-httpAkka-http
Akka-http
 
Lagom in Practice
Lagom in PracticeLagom in Practice
Lagom in Practice
 
Spring Scala : 스프링이 스칼라를 만났을 때
Spring Scala : 스프링이 스칼라를 만났을 때Spring Scala : 스프링이 스칼라를 만났을 때
Spring Scala : 스프링이 스칼라를 만났을 때
 
Dependency injection in scala
Dependency injection in scalaDependency injection in scala
Dependency injection in scala
 
Akka http 2
Akka http 2Akka http 2
Akka http 2
 
Язык программирования Scala / Владимир Успенский (TCS Bank)
Язык программирования Scala / Владимир Успенский (TCS Bank)Язык программирования Scala / Владимир Успенский (TCS Bank)
Язык программирования Scala / Владимир Успенский (TCS Bank)
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play apps
 

Similar to Your First Scala Web Application using Play 2.1

Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best Pracitces
Justin Filip
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
Women in Technology Poland
 
Dust.js
Dust.jsDust.js
Introduction to rails
Introduction to railsIntroduction to rails
Introduction to rails
Go Asgard
 
Scala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadiusScala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadius
BoldRadius Solutions
 
Beyond Wordcount with spark datasets (and scalaing) - Nide PDX Jan 2018
Beyond Wordcount  with spark datasets (and scalaing) - Nide PDX Jan 2018Beyond Wordcount  with spark datasets (and scalaing) - Nide PDX Jan 2018
Beyond Wordcount with spark datasets (and scalaing) - Nide PDX Jan 2018
Holden Karau
 
Amazon DynamoDB Lessen's Learned by Beginner
Amazon DynamoDB Lessen's Learned by BeginnerAmazon DynamoDB Lessen's Learned by Beginner
Amazon DynamoDB Lessen's Learned by Beginner
Hirokazu Tokuno
 
Javascript Update May 2013
Javascript Update May 2013Javascript Update May 2013
Javascript Update May 2013
Ramesh Nair
 
Deploying Perl apps on dotCloud
Deploying Perl apps on dotCloudDeploying Perl apps on dotCloud
Deploying Perl apps on dotCloud
daoswald
 
Revealing ALLSTOCKER
Revealing ALLSTOCKERRevealing ALLSTOCKER
Revealing ALLSTOCKER
Masashi Umezawa
 
Develop realtime web with Scala and Xitrum
Develop realtime web with Scala and XitrumDevelop realtime web with Scala and Xitrum
Develop realtime web with Scala and Xitrum
Ngoc Dao
 
Dart the Better JavaScript
Dart the Better JavaScriptDart the Better JavaScript
Dart the Better JavaScript
Jorg Janke
 
Angular basicschat
Angular basicschatAngular basicschat
Angular basicschatYu Jin
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User Interfaces
Jumping Bean
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
Eugene Yokota
 
Java on Google App engine
Java on Google App engineJava on Google App engine
Java on Google App engine
Michael Parker
 
Android training day 4
Android training day 4Android training day 4
Android training day 4
Vivek Bhusal
 
PHP BASIC PRESENTATION
PHP BASIC PRESENTATIONPHP BASIC PRESENTATION
PHP BASIC PRESENTATION
krutitrivedi
 
Andriy Shalaenko - GO security tips
Andriy Shalaenko - GO security tipsAndriy Shalaenko - GO security tips
Andriy Shalaenko - GO security tips
OWASP Kyiv
 

Similar to Your First Scala Web Application using Play 2.1 (20)

Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best Pracitces
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
Dust.js
Dust.jsDust.js
Dust.js
 
Introduction to rails
Introduction to railsIntroduction to rails
Introduction to rails
 
Scala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadiusScala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadius
 
Beyond Wordcount with spark datasets (and scalaing) - Nide PDX Jan 2018
Beyond Wordcount  with spark datasets (and scalaing) - Nide PDX Jan 2018Beyond Wordcount  with spark datasets (and scalaing) - Nide PDX Jan 2018
Beyond Wordcount with spark datasets (and scalaing) - Nide PDX Jan 2018
 
Amazon DynamoDB Lessen's Learned by Beginner
Amazon DynamoDB Lessen's Learned by BeginnerAmazon DynamoDB Lessen's Learned by Beginner
Amazon DynamoDB Lessen's Learned by Beginner
 
Javascript Update May 2013
Javascript Update May 2013Javascript Update May 2013
Javascript Update May 2013
 
Deploying Perl apps on dotCloud
Deploying Perl apps on dotCloudDeploying Perl apps on dotCloud
Deploying Perl apps on dotCloud
 
Revealing ALLSTOCKER
Revealing ALLSTOCKERRevealing ALLSTOCKER
Revealing ALLSTOCKER
 
Develop realtime web with Scala and Xitrum
Develop realtime web with Scala and XitrumDevelop realtime web with Scala and Xitrum
Develop realtime web with Scala and Xitrum
 
Dart the Better JavaScript
Dart the Better JavaScriptDart the Better JavaScript
Dart the Better JavaScript
 
Angular basicschat
Angular basicschatAngular basicschat
Angular basicschat
 
Mustache
MustacheMustache
Mustache
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User Interfaces
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 
Java on Google App engine
Java on Google App engineJava on Google App engine
Java on Google App engine
 
Android training day 4
Android training day 4Android training day 4
Android training day 4
 
PHP BASIC PRESENTATION
PHP BASIC PRESENTATIONPHP BASIC PRESENTATION
PHP BASIC PRESENTATION
 
Andriy Shalaenko - GO security tips
Andriy Shalaenko - GO security tipsAndriy Shalaenko - GO security tips
Andriy Shalaenko - GO security tips
 

More from Matthew Barlocker

Getting Started on Amazon EKS
Getting Started on Amazon EKSGetting Started on Amazon EKS
Getting Started on Amazon EKS
Matthew Barlocker
 
Optimizing Uptime in SOA
Optimizing Uptime in SOAOptimizing Uptime in SOA
Optimizing Uptime in SOA
Matthew Barlocker
 
Relate
RelateRelate
Highly Available Graphite
Highly Available GraphiteHighly Available Graphite
Highly Available Graphite
Matthew Barlocker
 
Nark: Steroids for Graphite
Nark: Steroids for GraphiteNark: Steroids for Graphite
Nark: Steroids for Graphite
Matthew Barlocker
 
ORM or SQL? A Better Way to Query in MySQL
ORM or SQL? A Better Way to Query in MySQLORM or SQL? A Better Way to Query in MySQL
ORM or SQL? A Better Way to Query in MySQL
Matthew Barlocker
 
Amazon EC2 to Amazon VPC: A case study
Amazon EC2 to Amazon VPC: A case studyAmazon EC2 to Amazon VPC: A case study
Amazon EC2 to Amazon VPC: A case study
Matthew Barlocker
 
Case Study: Lucidchart's Migration to VPC
Case Study: Lucidchart's Migration to VPCCase Study: Lucidchart's Migration to VPC
Case Study: Lucidchart's Migration to VPC
Matthew Barlocker
 
Git essentials
Git essentialsGit essentials
Git essentials
Matthew Barlocker
 
Magic methods
Magic methodsMagic methods
Magic methods
Matthew Barlocker
 

More from Matthew Barlocker (10)

Getting Started on Amazon EKS
Getting Started on Amazon EKSGetting Started on Amazon EKS
Getting Started on Amazon EKS
 
Optimizing Uptime in SOA
Optimizing Uptime in SOAOptimizing Uptime in SOA
Optimizing Uptime in SOA
 
Relate
RelateRelate
Relate
 
Highly Available Graphite
Highly Available GraphiteHighly Available Graphite
Highly Available Graphite
 
Nark: Steroids for Graphite
Nark: Steroids for GraphiteNark: Steroids for Graphite
Nark: Steroids for Graphite
 
ORM or SQL? A Better Way to Query in MySQL
ORM or SQL? A Better Way to Query in MySQLORM or SQL? A Better Way to Query in MySQL
ORM or SQL? A Better Way to Query in MySQL
 
Amazon EC2 to Amazon VPC: A case study
Amazon EC2 to Amazon VPC: A case studyAmazon EC2 to Amazon VPC: A case study
Amazon EC2 to Amazon VPC: A case study
 
Case Study: Lucidchart's Migration to VPC
Case Study: Lucidchart's Migration to VPCCase Study: Lucidchart's Migration to VPC
Case Study: Lucidchart's Migration to VPC
 
Git essentials
Git essentialsGit essentials
Git essentials
 
Magic methods
Magic methodsMagic methods
Magic methods
 

Recently uploaded

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 

Recently uploaded (20)

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 

Your First Scala Web Application using Play 2.1

  • 1. Your First Scala Web Application using Play! Framework By Matthew Barlocker
  • 2. The Barlocker ● Chief Architect at Lucid Software Inc ● Learned Scala and Play! “the hard way”. ● Graduated with Bachelors Degree in Computer Science from BYU in 2008. ● Developed software for the following industries: – Network Security – Social Gaming – Financial – Productivity
  • 3. Time is Scarce! Write your questions down and ask me after the session.
  • 4. Quick Assessment ● Languages – Scala – Java – PHP – Ruby ● MVC Frameworks ● Build Tools – sbt – maven – ivy
  • 5. Get it Running ● Requires Java >= 6 to run ● You need a terminal. ● Add play-2.1.4 directory to PATH – Linux ● `export PATH=$PATH:/path/play-2.1.4` ● `chmod +x /path/play-2.1.4/play` – Windows ● Add path to global environment variables ● Don't use a path with spaces
  • 6. Get it Running ● `cd /parent/dir/for/new/project` ● `play new strangeloop` ● `cd strangeloop` ● `git init` - suggested ● `play [debug]` – `run [port=9000]` ● Go to http://localhost:9000
  • 7. Scala Intro ● The current version is 2.10.2. ● Open your cheat sheet for code samples. ● Runs on the JVM. ● 100% inter-operable with Java code (jars). ● Functions are first-class citizens. ● Typed, compiled language. ● Semicolons are inferred. ● Functional language that supports procedural.
  • 8. Scala Intro - Variables ● val – immutable – good for multi-threading – recommended type of variable ● var – mutable – good for procedural code
  • 9. Scala Intro - Typing ● Colon-postfix notation for typing. ● All variables and functions can be explicitly typed. ● Some variables and functions can be implicitly typed.
  • 10. Scala Intro - Looping ● Most looping is done over lists, arrays, maps, and other data structures using .foreach() or .map(). ● for (i <- 0 until 10) – Looping criteria (in parens) is calculated exactly once. – Can be used to 'yield' results. ● [do …] while (i < 10)
  • 11. Scala Intro – Control Structures ● if (condition) … else … – Returns a value. – Use instead of a ternary operator. ● match statement – Similar to a switch, but much more flexible. – Can match regular expressions, interfaces, classes, and other extractors.
  • 12. Scala Intro - Functions ● 'public' is the default access modifier. ● The last value computed is returned. ● Function names can include operators. – '+' is a function on strings and numbers. ● Parameters must be typed. ● Return value can be inferred. ● Multiple parameter lists are allowed. Not the same as currying.
  • 13. Scala Intro - Collections ● Tuples have a length and each element has a type. – val a = (5, 2.0, “hello”) ● Maps are key -> value pairs – val b = Map(1 -> “a”, 2 -> “b”) ● Arrays are mutable – val c = Array(4, 5, 6) ● Lists are immutable – val d = List(7, 8, 9)
  • 14. Scala Intro - Classes ● Case classes get the following for free: – 'equals', 'toString', 'hashCode', 'copy' functions. – every class argument is a public val unless specified otherwise. ● Objects are singleton classes. – Must be used for static methods. ● Traits are abstract classes. – No class arguments. – Used for multiple inheritance or interfaces.
  • 15. Scala Intro – Console Example ● Variables ● Functions ● Classes ● Options ● Matching ● Lists, Maps ● Iterating ● Function parameters ● Parameter Lists ● Conditionals
  • 16. Scala Resources ● http://www.scala-lang.org/ ● http://www.scala-lang.org/documentation/ ● https://groups.google.com/d/forum/scala-user ● irc://irc.freenode.net/scala ● http://www.scala-lang.org/community/ ● https://github.com/scala/scala
  • 17. Play! Intro ● Current version is 2.1.4. ● Play Framework makes it easy to build web applications with Java & Scala. ● Play is based on a lightweight, stateless, web- friendly architecture. ● Make your changes and simply hit refresh! All you need is a browser and a text editor.
  • 18. Play! Features ● Rebuilds the project when you change files and refresh the page. ● IDE support for IntelliJ, Eclipse, Sublime, and more. ● Asset compiler for LESS, CoffeeScript, and more. ● JSON is a first-class citizen.
  • 20. Play! Resources ● http://www.playframework.com/ ● https://github.com/playframework/playframework ● https://groups.google.com/group/play-framework ● http://www.playframework.com/documentation ● http://twitter.com/playframework
  • 22. Topics ● Request Handling – URLs – Controllers – Actions – Responses – HTTP ● Views – Templates – Encoding – Assets ● Forms – Validation – Submission
  • 23. Topics (cont.) ● Database – Evolutions – Connections – Models – Queries ● Build System – Dependencies – Deployment – Testing ● Application Global – Request Handling – Error Handling – Application Hooks ● I18n – Strings – Views – Configuration
  • 24. Topics (cont.) ● Testing – Fake Application – Fake Requests – Fake DB – Patterns
  • 26. Request Handling - Terminology ● Route – Mapping of URL/HTTP Method to an action ● Action – Function that takes a request and returns a result ● Controller – Action generator ● Request – HTTP headers and body ● Result – HTTP status code, headers, and body
  • 27. Request Handling - Exercise ● Create a new home page ● Create a page that redirects to the new home page ● Set content type on home page ● Create a page to set, and a page to get: – Headers – Cookies – Session – Flash ● Create a TODO page ● Use URL parameters and action to send 404
  • 28. SimpleResults ● Ok ● Created ● Accepted ● MovedPermanently ● Found ● SeeOther ● NotModified ● TemporaryRedirect ● BadRequest ● Unauthorized ● Forbidden ● NotFound ● InternalServerError ● ...
  • 29. Routes ● Every route has HTTP method, URL, and action to call. ● URL can include parameters, which are passed to the action. ● These parameters can be validated and converted as part of the matching. ● First matching route wins.
  • 30. Views ● '@' is the magical operator. ● No special functions, it's just embedded Scala code. ● Each view is just a function that can be called from anywhere. ● Views set the content type automatically.
  • 31. Views - Exercise ● Create view for URL parameter page. ● Create view for the home page. ● Create template, use it in the home page view. ● Add links to template ● Display flash messages in layout. ● Use implicit request.
  • 32. Views ● Files are named package/myview.scala.html. ● Views are referenced views.html.package.myview. ● All values are HTML encoded for you. ● Views are not intended to handle big data. ● If broken, play with the whitespace.
  • 33. Forms - Exercise ● Create a contact form. ● Create a login form. On submit, set a fake user id in the session.
  • 34. Forms ● Form.bindFromRequest will use GET and POST variables. ● There are many constraints and data types. Explore to find them.
  • 35. Database - Exercise ● Configure a database connection. ● Create a database evolution for users table. ● Create page and model to register users. ● Update login to check against user list. ● Create page to show current user.
  • 36. Build System ● Reload play after changing dependencies. ● Find dependencies at http://mvnrepository.com/ ● Try a deployment – `play stage` – `./target/start -Dhttp.port=9000` ● To deploy, copy target/start and target/staged to the target system, and run 'start'
  • 37. I18n - Exercise ● Replace all messages in the layout. ● Add language files ● Configure another language ● Try it in the browser
  • 38. Testing - Exercise ● Inspect and modify existing tests. ● Run tests from command line.
  • 39. Time Permitting ● Advanced Request Handling – EssentialAction – RequestHeader – Iteratees – Filters ● Application Global
  • 40. Thank you for your time. Any Questions?
  • 41. Lucid Software Inc ● Building the next generation of collaborative web applications ● VC funded, high growth, profitable ● Graduates from Harvard, MIT, Stanford ● Team has worked at Google, Amazon, Microsoft https://www.lucidchart.com/jobs