Top Banner
Globus Scala Laboratory. Iteration #1
16
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Scala laboratory. Globus. iteration #1

GlobusScala Laboratory. Iteration #1

Page 2: Scala laboratory. Globus. 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)

Page 3: Scala laboratory. Globus. iteration #1

Topics Covered

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

Page 4: Scala laboratory. Globus. iteration #1

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

Page 5: Scala laboratory. Globus. iteration #1

Globus: chart of PODs

Page 6: Scala laboratory. Globus. iteration #1

Globus: POD

Page 7: Scala laboratory. Globus. iteration #1

Globus: employee profile

Page 8: Scala laboratory. Globus. iteration #1

Globus: list of employees

Page 9: Scala laboratory. Globus. iteration #1

Model

Page 10: Scala laboratory. Globus. iteration #1

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/

Page 11: Scala laboratory. Globus. iteration #1

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

Page 12: Scala laboratory. Globus. iteration #1

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

Page 13: Scala laboratory. Globus. iteration #1

Building the project

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

Page 14: Scala laboratory. Globus. iteration #1

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

Page 15: Scala laboratory. Globus. iteration #1

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

Page 16: Scala laboratory. Globus. iteration #1

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