Kazuhiro Sera introduced several of his Scala projects including ScalikeJDBC, Skinny Framework, and AWScala. He discussed some of his philosophies for solid and sustainable development in Scala including using simplified class-based OOP with immutable data structures, avoiding overkill abstraction, writing tests without question, keeping infrastructure lightweight, and ensuring projects have no surprises for newcomers. He welcomed questions during the upcoming AMA session.
Advanced Scala reflection & runtime meta-programming. The Scala compiler toolbox. Reading Scala Annotations and overcoming type erasure with some real world use cases.
The Scala programming language has been gaining momentum recently as an alternative (and some might say successor) to Java on the JVM. This talk will start with an introduction to basic Scala syntax and concepts, then delve into some of Scala's more interesting and unique features. At the end we'll show a brief example of how Scala is used by the Lift web framework to simplify dynamic web apps.
Advanced Scala reflection & runtime meta-programming. The Scala compiler toolbox. Reading Scala Annotations and overcoming type erasure with some real world use cases.
The Scala programming language has been gaining momentum recently as an alternative (and some might say successor) to Java on the JVM. This talk will start with an introduction to basic Scala syntax and concepts, then delve into some of Scala's more interesting and unique features. At the end we'll show a brief example of how Scala is used by the Lift web framework to simplify dynamic web apps.
Scala Intro training @ Lohika, Odessa, UA.
This is a basic Scala Programming Language overview intended to evangelize the language among any-language programmers.
I used these slides for a Scala workshop that I gave. They are based on these: http://www.scala-lang.org/node/4454. Thanks to Alf Kristian Støyle and Fredrik Vraalsen for sharing!
My talk at Bangalore Java Users Group. It was meant developers who want to get them started on Scala. This talk objectives was to get started on creating a project in Scala, write some code using collections and test it using ScalaTest.
Kicking Butt on Concurrent Enterprise Application with Scala
MSC Malaysia Open Source Conference 2009 1 June 2009. Developers Track
http://www.mscmalaysia.my/opensource
http://www.mscoscon.my/
http://www.osdc,my/
more from Azrul
Lightning talk MSC Malaysia Open Source Conference 2009
3 June 2009. 5pm Bronx V
Archive
http://mscoscon.blogspot.com/2009/06/cyber-merdeka-cyber-sovereignity-by.html
Scala Intro training @ Lohika, Odessa, UA.
This is a basic Scala Programming Language overview intended to evangelize the language among any-language programmers.
I used these slides for a Scala workshop that I gave. They are based on these: http://www.scala-lang.org/node/4454. Thanks to Alf Kristian Støyle and Fredrik Vraalsen for sharing!
My talk at Bangalore Java Users Group. It was meant developers who want to get them started on Scala. This talk objectives was to get started on creating a project in Scala, write some code using collections and test it using ScalaTest.
Kicking Butt on Concurrent Enterprise Application with Scala
MSC Malaysia Open Source Conference 2009 1 June 2009. Developers Track
http://www.mscmalaysia.my/opensource
http://www.mscoscon.my/
http://www.osdc,my/
more from Azrul
Lightning talk MSC Malaysia Open Source Conference 2009
3 June 2009. 5pm Bronx V
Archive
http://mscoscon.blogspot.com/2009/06/cyber-merdeka-cyber-sovereignity-by.html
A talk on front-end developer tools including Yeoman, Grunt.js, Require.js, Bower, and SASS given at Drupal Camp LA 2013.
This talk doesn't address Drupal specifically, but it was aimed to give the audience of drupal developers a look into the state of the art.
Scala.js is a compiler that compiles Scala source code to equivalent Javascript code. It can be seen as the start of a revolution in developing web application. In this talk, I'll present Scala.js project, common libraries for having a pleasure web development (such as scalatags, autowire and upickle) and integration with well known javascript libraries such as AngularJS and React.js.
Intro to node.js - Ran Mizrahi (27/8/2014)Ran Mizrahi
Node.js is a platform built on Chrome V8 javascript runtime engine for building fast and scalable, non-blocking, real-time and network applications. In this session Ran will introduce node.js and how to develop large code bases using it. He'll cover the following aspects:
• What is node.js?
• Apache vs. Nginx performance (One thread per connection vs. event loop) and what it has to do with node.js.
• Why node was written in Javascript?
• Main tools and frameworks (Express, socket.io, mongoose etc.)
• TDD/BDD with node.js using mocha and Chai.
Ran Mizrahi, Founder of CoCycles, Passionate entrepreneur and software engineer who loves to continuously innovate and deliver meaningful products while having true fun with the right team.
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Codemotion
Scala is the only language that can be used to produce code that can be "trans/compiled" for the JVM, in Javascript and in native binary. This allows to write libraries that are usable in JVM and JS using the power of functional programming (i.e. cats, scalaz), generic programming (i.e. shapeless) and macro/scalameta available in Scala. In this talk, we will see how to write a Scala application backend and a SPA (scala.js/scala-js-react) that share the same code as a business logic, datamodels and transparent API call (JVM/JS) in Scala (via autowire/akka-http/circe).
Alfresco’s highly customizable repository can often seem overwhelming. Learn approaches for adding common customizations requests (Extending Javascript API, Content Modeling, Permission Modeling, packaging, etc.) from current and former Alfresco consulting staff. Learn where we often see the most common errors and participate in open Q&A.
Spark Job Server and Spark as a Query Engine (Spark Meetup 5/14)Evan Chan
This was a talk that Kelvin Chu and I just gave at the SF Bay Area Spark Meetup 5/14 at Palantir Technologies.
We discussed the Spark Job Server (http://github.com/ooyala/spark-jobserver), its history, example workflows, architecture, and exciting future plans to provide HA spark job contexts.
We also discussed the use case of the job server at Ooyala to facilitate fast query jobs using shared RDD and a shared job context, and how we integrate with Apache Cassandra.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Understanding Nidhi Software Pricing: A Quick Guide 🌟
Choosing the right software is vital for Nidhi companies to streamline operations. Our latest presentation covers Nidhi software pricing, key factors, costs, and negotiation tips.
📊 What You’ll Learn:
Key factors influencing Nidhi software price
Understanding the true cost beyond the initial price
Tips for negotiating the best deal
Affordable and customizable pricing options with Vector Nidhi Software
🔗 Learn more at: www.vectornidhisoftware.com/software-for-nidhi-company/
#NidhiSoftwarePrice #NidhiSoftware #VectorNidhi
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
In the ever-evolving landscape of technology, enterprise software development is undergoing a significant transformation. Traditional coding methods are being challenged by innovative no-code solutions, which promise to streamline and democratize the software development process.
This shift is particularly impactful for enterprises, which require robust, scalable, and efficient software to manage their operations. In this article, we will explore the various facets of enterprise software development with no-code solutions, examining their benefits, challenges, and the future potential they hold.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
A Sighting of filterA in Typelevel Rite of Passage
Solid and Sustainable Development in Scala
1. Solid and Sustainable
Development in Scala
Kazuhiro Sera @seratch
ScalikeJDBC / Skinny Framework
Founder & Lead Developer
2. Ask Me Later!
• 3 mags for questioners at the end of this
session! Don’t miss it!
3. Who Am I
• Kazuhiro Sera • @seratch on Twitter/GitHub • Scala enthusiast since 2010 • ScalikeJDBC, Skinny Framework, AWScala
founder & project lead • A web developer at M3, Inc (We’re a Gold
Sponsor)
5. ScalikeJDBC
• scalikejdbc.org • “Scala-like JDBC” • Provides Scala-ish APIs • Started as a better querulous / Anorm • “Just write SQL and get things done” • QueryDSL for smoothness & type-safety • Stable enough: lots of companies already
use it in production
7. Basic Usage
import scalikejdbc._!
!
ConnectionPool.singleton(!
“jdbc:h2:mem:matsuri”, !
“user”, “secret”)!
SQL statement!
(PreparedStatement)
!
DB autoCommit { implicit session =>!
Side effect !
with DB connection
sql”create table attendee (name varchar(32))”.execute.apply()!
val name = “seratch”!
sql”insert into attendee (name) values ($name)”.update.apply()!
}!
!
val names: Seq[String] = DB readOnly { implicit s =>!
sql”select name from attendee”!
.map(_.string(“name”)).list.apply()!
}
execute/update!
(JDBC operation)
Extractor
8. QueryDSL
import scalikejdbc._!
case class Attendee(name: String)!
object Attendee extends SQLSyntaxSupport[Attendee] {!
def apply(rs: WrappedResultSet, a: ResultName[Attendee]) = !
new Attendee(rs.get(a.name))
}!
!
implicit val session = AutoSession!
!
!
val a = Attendee.syntax(“a”)!
val seratch: Option[Attendee] = withSQL {!
QueryDSL!
(Mostly SQL)
Actual SQL Query
select.from(Attendee as a).where.eq(a.name, “seratch”)!
}.map(rs => new Attendee(rs, a)).single.apply()!
!
// select a.name as n_on_a from attendee a where a.name = ?
9. Skinny Framework
• skinny-framework.org • “Scala on Rails” • For Rails / Play1 lovers • 1.0.0 is out on 28th March • Already several experiences in production • Full-stack features: Web infrastructure,
Scaffold generator, ORM, DB migration,
JSON stuff, HTTP client, Mail sender, Job
workers, Assets controller, etc..
10. Boot in 2 minutes
!
// install skinny command!
brew tap skinny-framework/alt!
brew install skinny!
!
// create app and start!
skinny new my app!
cd myapp!
skinny run!
!
// access localhost:8080 from your browser!
11. Model (DAO)
import skinny.orm._!
Entity
import scalikejdbc._!
!
case class User(id: Long, name: Option[String])!
!
// companion: data mapper!
object User extends SkinnyCRUDMapper[User] {!
def defaultAlias = createAlias(“u”)!
def extract(rs: WrappedResultSet, u: ResultName[User])!
= autoConstruct(rs, u)
}!
CRUD Mapper Object!
!
(No need to be companion)
User.findById(123)!
User.count()!
User.createWithAttributes(‘name -> “Alice”)!
User.updateById(123).withAttributes(‘name -> “Bob”)!
User.deleteBy(sqls.eq(u.name, “Bob”))
Smooth APIs
12. Controller + Route
package controller!
class UsersController extends ApplicationController {!
def showUsers = {!
set(“users”, User.findAll())!
render(“/users/index”)
}
}!
!
// Routings!
object Controllers {!
Set value in request scope!
(Visible in views)
Expects “src/main/webapp/!
WEB-INF/views/users/index.html.ssp”
val users = new UsersController with Routes {!
get(“/users/”)(showUsers).as(‘showUsers)
}!
def mount(ctx: ServletContext): Unit = {!
users.mount(ctx)!
}
}
14. Web Development
• Interactive feedback loop is most
important especially when changing UI • Actually Scala compilation is so slow that
waiting view templates compilation makes
developers much stressed • Skinny doesn’t compile all the view
templates when developing (unlike Twirl)
16. My Good Parts
•Simplified Class-based OOP And
Immutable Data Structure
•Working On Problems Without
Overkill Abstraction
•Writing Tests Without Question
•Keep Infrastructure Lightweight
•No Surprises For Newcomer
18. Class-based OOP
• Already so popular (Java, Ruby, Python ..) • Old style is friendly with mutability (e.g.
setters, bang methods), but that’s not a
prerequisite • OOP can be more solid and safer by
keeping immutability and avoiding
inheritance anti-patterns
19. Scala or Java 8?
• Scala case class is simpler than Java
beans with (great) Lombok • Scala high-order functions are simpler
than Java 8 Stream API • Immutability is well-treated in Scala • Fairness: Java decisively beats Scala in
comparison with compilation speed..
20. Immutability
• Do away with mutable states • Re-assignment? No way! Don’t use `var` • Immutability makes your apps not only
scalable but also more solid • When you modify a case class, call
#copy() and return new state instead of
using setters for mutability inside
21. Immutable Entity
// entity with behaviors!
case class User(id: Long, name: Option[String])!
extends SkinnyRecord[User] {!
override def skinnyCRUDMapper = User
}!
// data mapper!
object User extends SkinnyCRUDMapper[User] {!
override def defaultAlias = createAlias(“u”)!
override def extract(rs: WrappedResultSet, u: ResultName[User])!
= autoConstruct(rs, u)
}!
!
val noNames: Seq[User] = User.where(‘name -> “”).apply()!
val anons: Seq[User] = noNames.map { user => !
user.copy(name = “Anonymous”).save()!
}
Both of “noNames” and
“anions” are immutable
22. Trait Chaos
• Mixing traits can show you terrible chaos • We should have self-discipline • Prefer `override` modifier to detect API
changes when mixing many traits • Collect the same sort of traits and place
them in same place to avoid code
duplication or unwanted complexity
23. Web Controller
package controller!
class MainController extends ApplicationController !
with concern.TimeLogging {!
def index = logElapsedTime { render(“/main/index”) }!
}!
!
// for controllers!
package controller.concern!
trait TimeLogging { self: SkinnyController with Logging =>!
The “concern” just follows Rails style.
Anyway, naming should be simple and!
easy-to-understand for anyone
def millis: Long = System.currentTimeMillis !
def logElapsedTime[A](action: => A): A = {!
val before = millis!
val result = action!
logger.debug(“Elapsed time: ${millis - before} millis”)!
result
}!
}
24. Coding Style Tips
• Use sbt-scalariform without question
(similar: go-lang’s fmt) • Don’t toss similar classes or traits into
single scala file except `sealed` pattern • Don’t place classes under different
package directory (although it’s possible) • Do you really need cake pattern? • Prefer eloquent method signature than
explaining a lot in scaladocs
26. The Real As-Is
• Abstraction often improves things, but
that’s not always the best way to solve
real-world problems • I/O issue is a typical case that we should
comprehend problems as-is • Database access / SQL is not a collection
but just an external I/O operation • Overkill abstraction makes your code
difficult to maintain for other developers
27. Don’t Hide the SQL
• “You don’t need another DSL to access
relational databases” - Anorm • You must recognize what is working
effectively in the SQL layer • Utility to write DAO easily is fine but
hiding SQL is not good • Need to grab the cause from raw queries
when dealing with troubles (comfortable
logging also can help)
28. SQL Ops As-Is
// A programmer belongs to a company and has several skills!
!
implicit val session = AutoSession!
!
val p: Option[Programmer] = withSQL {!
I believe everybody can
understand this code
select.from(Programmer as p)!
.leftJoin(Company as c).on(p.companyId, c.id)!
.leftJoin(ProgrammerSkill as ps).on(ps.programmerId, p.id)!
.leftJoin(Skill as s).on(ps.skillId, s.id)!
.where.eq(p.id, 123).and.isNull(p.deletedAt)!
}!
.one(rs => Programmer(rs, p, c))!
Extracts one-to-many
.toMany(rs => Skill.opt(rs, s))!
relationships here
.map { (programmer, skills) => programmer.copy(skills = skills) }!
.single!
.apply()
29. Skinny ORM
• ORM built on ScalikeJDBC • Highly inspired by Rails ActiveRecord • SQL queries for CRUD apps are common
enough, so it’s reasonable to avoid writing
mostly same code everywhere • Skinny ORM doesn't prevent you from
using ScaikeJDBC APIs directly • A part of Skinny Framework but you can
use it in Play apps too
31. Mappers
// entities!
case class Company(id: Long, name: String)!
case class Employee(id: Long, name: String,!
companyId: Long, company: Option[Company])!
!
// mappers!
object Company extends SkinnyCRUDMapper[Company] {!
def extract(rs: WrappedResultSet, rn: ResultName[Company]) =!
autoConstruct(rs, rn)
}!
object Employee extends SkinnyCRUDMapper[Employee] {!
def extract(rs: WrappedResultSet, rn: ResultName[Employee]) =!
autoConstruct(rs, rn, “company”)!
// simple association definition!
lazy val companyRef = belongsTo[Company](!
Company, (e, c) => e.copy(company = c))
}
32. Reasonable?
Right, these CRUD operations are not SQL-ish. However, I believe
they’re reasonable because these patterns are already common enough.
!
!
val companyId = Company.createWithAttributes(‘name -> “Sun”)!
val empId = Employee.createWithAttributes(!
‘name -> “Alice”, ‘companyId -> companyId)!
!
val emp: Option[Employee] = Employee.findById(empId)!
val empWithCompany: Option[Employee] = !
Employee.joins(companyRef).findById(123)!
!
Company.updateById(companyId).withAttributes(‘name -> “Oracle”)!
!
val e = Employee.defaultAlias!
Employee.deleteBy(sqls.eq(e.id, empId))!
Using ScalikeJBDC API!
Company.deleteById(companyId)
is also possible
34. Not Only Compiler
• It’s true that compiler helps you by
detecting mistakes in coding • Writing tests is a reasonable way to verify
your code meets requirements /
specifications as expected • You can’t skip automated tests even if
your apps are written in Scala
35. scoverage
• At this time, the only option available for
us is scoverage (SCCT inheritor) • Add the dependency into your projects
right now if you don’t use it yet
37. Avoid SBT Hacks
• sbt is not so easy for Scala newbies,
upgrading sbt is all the more so • Play depends on sbt version (e.g. Play 2.1
w/ sbt 0.12), upgrading Play is about not
Play API but sbt things • Your own sbt plugins/hacks makes your
projects difficult to maintain for a long
period and involve others • Don’t try to do everything there
38. Skinny TaskRunner
• Just want a simple and “rake”-like task
runner (no sbt plugin) • Simplistic but pragmatic idea: “mainClass”
of “task” sbt project can be dispatcher of
task runner system • Tasks are written in Scala (no sbt plugin) • Not only writing code but upgrading
scala/sbt version become pretty easy
39. Tasks
// sbt settings!
// mainClass := Some("TaskRunner")!
!
// task/src/main/scala/TaskRunner.scala!
object TaskRunner extends skinny.task.TaskLauncher {!
register("assets:precompile", (params) => {!
val buildDir = params.headOption.getOrElse(“build")!
// AssetsPrecompileTask is a Scala object!
skinny.task.AssetsPrecompileTask.main(Array(buildDir))!
})!
}!
Pure Scala function!
!
// skinny task:run assets:precompile [dir]
task name
mainClass as the dispatcher
40. Use Only Essentials
• The same issue as Ruby gems, what’s
worse, Scala’s eco-system is still so
smaller than Ruby’s one • Binary incompatibility makes existing
libraries outdated every Scala major
version release • Are you really ready to fork them? • Using Java assets (e.g. commons)
internally is also worth thinking about
42. Can Feel Welcome?
• Is joining your Scala projects easy? Can
newcomer understand overview at once? • Don’t stick to doing on the sbt, don’t
disfavor using other tools (e.g. Grunt) • Well-known style (e.g. Rails style) is
preferred for collaborative works • Is asynchronosity really required now? • Indeed, your DSL is very simple but easy
to modify them (for others)?
43. Newcomers may not
know Scala well.
Attract them to Scala!
(Don’t scare them)