16
Globus Scala Laboratory. Iteration #1

Scala laboratory. Globus. iteration #1

Embed Size (px)

Citation preview

GlobusScala Laboratory. Iteration #1

Logistics

● open-source and/or charity related projects● 1 mentor and team of 4-5 developers in the

team● 1-2 week iterations (depending on iteration

goal)

Topics Covered

● development environment● server-side development● web-development● testing● building, releasing and deploying● monitoring and troubleshooting

Project Globus. POD Framework

● many high-tech companies are organized as flat and network structures these days

● POD Framework - implementation of a network structure adopted in Adform (http://bit.ly/pod-fwk)

● Globus is a service that digitalizes PODs

Globus: chart of PODs

Globus: POD

Globus: employee profile

Globus: list of employees

Model

Development Environment

Action Item: setup development environment● download IDEA 14: Community Edition ~> https://www.

jetbrains.com/idea/download/○ it has Scala and SBT out-of-the-box

● download and setup SBT ~> http://www.scala-sbt.org/

Project Layout in SBT

Action Item: create project structure in SBT ~> https://twitter.github.io/scala_school/sbt.html

● project – project definition files○ project/build/Build.scala – the main project definition file

● src/main – your app code goes here, in a subdirectory indicating the code’s language (e.g. src/main/scala, src/main/java)

● src/main/resources – static files you want added to your jar● src/test – like src/main, but for tests

Model in Scala

Action Item: use class, trait, abstract class, case class, where appropriate, to build the model● https://twitter.github.io/scala_school/basics.html● https://twitter.github.io/scala_school/basics2.html

Building the project

Action Item: import the project in IDEA, and compile it (either in IDEA or in SBT)

Continuous Integration

Action Items:- configure travis.yml to compile Scala code- send pull-request for code-review- once pull-request is approved, make sure

that Travis CI has successfully compiled the project

Business Logic

Action Items:- in collaboration with team-mates, define business logic

layer, taking constraints into account. E.g.- admin creates users (all roles, except POD Lead)- any number of roles may be added to user, but there should be no 2

Leads or Keepers in one POD- refer to initial set of requirements ~> http://bit.ly/globus-

req

Writing Business Logic in Scala

Action Items:- define design of business model layer. Refer to

- https://twitter.github.io/scala_school/collections.html- https://twitter.github.io/scala_school/pattern-matching-and-functional-

composition.html - keep in mind that REST API will be a first-class citizen- split the work on creating business model layer into

independent parts