Both Clojure and Scala target enterprise-sized challenges, but the development styles are very different. We will live-code a small webapp in both languages, on two projectors, while demonstrating how each language influences our thought process, and the toolchain and library best practices. We will discuss how Scala makes you think in types, how Clojure’s interactive development lets you code without restarting your app, Scala’s query DSLs, plus Clojure’s secret weapon: Datomic.
Habits help you manage the complexity of code. You apply existing skill and knowledge automatically to the detail while focusing on the bigger picture. But because you acquire habits largely by imitation, and rarely question them, how do you know your habits are effective? Many of the habits that programmers have for naming, formatting, commenting and unit testing do not stand up as rational and practical on closer inspection.
This talk examines seven coding habits that are not as effective as programmers believe, and suggests alternatives.
This talk presents Slick, Typesafe’s library for accessing databases. Similar in nature to .NET’s LINQ API, Slick is a successor to the popular ScalaQuery library. With Slick, database queries can be expressed using Scala code – which is composable and more convenient than Java APIs like JPA, and safer than string-based query languages like SQL.
With a compile-time check to ensure type-safety, Slick queries allow users to interact with their database without knowing SQL, instead using function calls that fit naturally into their programming model. In this talk we’ll explore some of these functions and the functional programming model used; concepts such as map, flatMap, and group methods – and how we we can use them to query a database like an in-memory collection. If necessary, Slick users can call custom stored procedures and even fall back to raw SQL statements for cases where the Slick API won’t map to a database feature.
Slick currently offers support for many leading Relational Databases, including Microsoft’s SQL Server, MySQL, and PostgreSQL. The Slick team is working on extending support for custom datasources, such as NoSQL datastores like MongoDB.