Scala and its Ecosystem
-
Upload
petr-hosek -
Category
Technology
-
view
1.539 -
download
0
description
Transcript of Scala and its Ecosystem
![Page 1: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/1.jpg)
Scala and its Ecosystem
Petr Hošek @petrh
CZJUG, September 2010
![Page 2: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/2.jpg)
What is language ecosystem?
![Page 3: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/3.jpg)
Tools, libraries, frameworks, community, etc.
Language is useless without its ecosystem.
![Page 4: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/4.jpg)
Why Scala ecosystem?
![Page 5: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/5.jpg)
With growing usage grows the need.
Java ecosystem is not enough.
![Page 6: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/6.jpg)
Scala CompilerMost important part of the Scala ecosystem.
![Page 7: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/7.jpg)
Compiler overview
Version 2.8 released in July.Contains many new features.
Second generation of Scala compiler.Oficially named NSC (New Scala Compiler).
Entirely developed in Scala itself.Self-hosted compiler.
![Page 8: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/8.jpg)
Compiler usage
Compiler can be used in several ways: Standalone compiler. Interactive interpreter.
Usually called REPL (Read-Evaluate-Print Loop).
Part of Scala application.Instance of compiler class, either batch or interactive.
![Page 9: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/9.jpg)
DemoCompiler usage
![Page 10: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/10.jpg)
Compiler architecture
Compiles Scala directly into Java bytecode.Compilation consists of several phases.
Each phases transforms the syntax tree.
Compiler is developed in entirely modular way.Designed to be completely re-entrant.
Can be instantiated as any other class.
Usage of advanced Scala language constructs.
![Page 11: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/11.jpg)
Compiler plugins
Provide way to easily extend compiler.Without modifying its source code.
Can be inserted in all phases of compilation.
Allows code transformations, analysis, etc.
Used for some experimental language constructs.
Continuations, etc.
![Page 12: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/12.jpg)
DemoCompiler plugins
![Page 13: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/13.jpg)
Scala tools and frameworksBasis of the Scala ecosystem.
![Page 14: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/14.jpg)
![Page 15: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/15.jpg)
simple-build-tool
Simple but powerful build tool for Scala.Configuration is written in Scala.
Provides interactive and batch mode.Dependency management support.
Based on Apache Ivy dependency manager.
Support for other Scala tools.Many customizations and extensions exists.
![Page 16: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/16.jpg)
Demosimple-build-tool usage
![Page 17: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/17.jpg)
Specs
Behaviour-driven design framework for Scala.Simple and typed language for specifications.
Benefits from Scala expressive syntax.
Integration with testing tools and frameworks.
JUnit, ScalaCheck, Mockito, etc.
![Page 18: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/18.jpg)
Demospecs usage
![Page 19: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/19.jpg)
Lift web framework
Expressive and elegant web framework.Benefiting from Scala language features.
Embraces View-First approach to MVC.View-Driven Development paradigm.
Importance of scalability and security.Without loss of performance or maintainability.
Native support for Ajax a Comet.
![Page 20: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/20.jpg)
DemoLift usage
![Page 21: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/21.jpg)
Well-known Scala tools and libraries: sbaz
Package sharing tool. ScalaCheck
Tool for automatic test case generation. Akka framework
Concurrent, scalable applications development.
ConfiggyLibrary for handling configuration and logging.
scalaz, scalaxExtensions to the standard Scala library.
![Page 22: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/22.jpg)
Many more tools and libraries do exists.
New ones are coming up to Scala ecosystem every day..
![Page 23: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/23.jpg)
Collaborative ScaladocNewest addition to Scala ecosystem.
![Page 24: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/24.jpg)
Project overview
Development of Scala project documentation.
Using the concepts of social collaboration.
Contribute without digging into source code.Try to embrace new approach of source-code documentation authoring.
![Page 25: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/25.jpg)
Scaladoc
Analogy of Javadoc for Scala.Second generation of Scaladoc is a part of Scala 2.8.
Contains new sleek and modern interface.Provides improved comment syntax.
Supports wiki-like syntax in the source comments.
![Page 26: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/26.jpg)
Colladoc application
Allows to edit Scala symbols documentation.Lift web application running the Scala compiler.Developed as a Google SoC 2010 project.
Now being developed as open-source project.
Based heavily upon Scaladoc 2 functionality.„Do not reinvent the wheel.“
![Page 27: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/27.jpg)
Mergedoc application
Allows to merge changes into the source-code.Simple command-line utility.
More features planned for the future.
Not yet officially released.Reimplementation of scaladoc-merge tool.
![Page 28: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/28.jpg)
DemoColladoc and Mergedoc usage
![Page 29: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/29.jpg)
Project status
The idea already prooved to be viable.Comments are being propagated to standard library.
Project needs more popularisation.There are many ideas waiting to be implemented.
Most them originated in the community.
![Page 30: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/30.jpg)
We need you!Project is looking for collaborators.
![Page 31: Scala and its Ecosystem](https://reader036.fdocuments.us/reader036/viewer/2022062405/554f72c9b4c905bb178b52fe/html5/thumbnails/31.jpg)
Learn more athttp://petrhosek.name/