Details

Professional Scala


Professional Scala


1. Aufl.

von: Janek Bogucki, Alessandro Lacava, Aliaksandr Bedrytski, Matthew de Detrich, Benjamin Neil

40,99 €

Verlag: Wiley
Format: PDF
Veröffentl.: 06.06.2016
ISBN/EAN: 9781119267256
Sprache: englisch
Anzahl Seiten: 215

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<p><i>Professional Scala</i> provides experienced programmers with fast track coverage aimed at supporting the use of Scala in professional production applications. Skipping over the basics and fundamentals of programming, the discussion launches directly into practical Scala topics with the most up-to-date coverage of the rapidly-expanding language and related tools. Scala bridges the gap between functional and object-oriented programming, and this book details that link with clear a discussion on both Java compatibility and the read-eval-print loop used in functional programming. You'll learn the details of tooling for build and static analysis. You’ll cover unit testing with ScalaTest, documentation with Scaladoc<b>, </b>how to handle concurrency, and much more as you build the in-demand skill set required to use Scala in a real-world production environment.</p> <p>Java-compliant with functional programming properties, Scala's popularity is growing quickly—especially in the rapidly expanding areas of big data and cluster computing. This book explains everything professional programmers need to start using Scala and its main tools quickly and effectively.</p> <p> Master Scala syntax, the SBT interactive build tool, and the REPL workflow</p> <ul> <li>Explore functional design patterns, concurrency, and testing</li> <li>Work effectively with Maven, Scaladoc, Scala.js, and more</li> <li>Dive into the advanced type system</li> <li>Find out about Scala.js</li> </ul> <p>A working knowledge of Scala puts you in demand. As both the language and applications expand, so do the opportunities for experienced Scala programmers—and many positions are going unfilled. Twitter, Comcast, Netflix, and other major enterprises across industries are using Scala every day, in a number of different applications and capacities. <i>Professional Scala</i> helps you update your skills quickly to start advancing your career.</p>
INTRODUCTION xv <p><b>CHAPTER 1: LANGUAGE FEATURES 1</b></p> <p>Static Types and Type Inference 2</p> <p>Implicit Parameters, Conversions, and Their Resolution 3</p> <p>Case Class, Tuples, and Case Object 5</p> <p>Abstract Class, Traits, and Sealed 6</p> <p>Pattern Matching 8</p> <p>Statements Are Expressions 9</p> <p>String Interpolation 9</p> <p>Scala Collections, immutable and mutable 10</p> <p>For Comprehension 12</p> <p>Packages, Companion Objects, Package Objects, and Scoping 13</p> <p>AnyVal, AnyRef, Any, and the Type Hierarchy 16</p> <p>Summary 17</p> <p><b>CHAPTER 2: FUNCTIONAL PROGRAMMING 19</b></p> <p>Immutability 20</p> <p>Pure Functions 22</p> <p>Recursion 23</p> <p>Higher-Order Functions 26</p> <p>Core Collection Methods 27</p> <p>Methods Returning a Collection 29</p> <p>Methods Returning a Value 31</p> <p>Currying and Partially Applied Functions 32</p> <p>Null Handling (Option) 34</p> <p>Strict versus Non-Strict Initialization 35</p> <p>Summary 36</p> <p><b>CHAPTER 3: JAVA COMPATIBILITY 37</b></p> <p>Scala and Java Collections 37</p> <p>Interfaces and Traits 40</p> <p>Scala/Java Enumerations 42</p> <p>Summary 43</p> <p><b>CHAPTER 4: SIMPLE BUILD TOOL 45</b></p> <p>Basic Usage 46</p> <p>Project Structure 47</p> <p>Single Project 47</p> <p>Scopes 49</p> <p>Custom Tasks 50</p> <p>Dependencies 50</p> <p>Resolvers 51</p> <p>Advanced Usage 52</p> <p>Advanced Dependencies 53</p> <p>Testing in the Console 55</p> <p>Release Management 56</p> <p>Deploying to Sonatype 56</p> <p>Packaging with SBT-Native-Packager 58</p> <p>Creating a Docker Image 59</p> <p>Common SBT Commands 60</p> <p>Useful Plugins 61</p> <p>Summary 62</p> <p><b>CHAPTER 5: MAVEN 63</b></p> <p>Getting Started with Maven and Scala 64</p> <p>Introducing scala-maven-plugin 67</p> <p>Adding Library Dependencies 70</p> <p>Using the REPL 71</p> <p>Getting Help 72</p> <p>Running Tests 72</p> <p>Joint Compilation with Java 74</p> <p>Accelerating Compilation with Zinc 76</p> <p>Summary 77</p> <p><b>CHAPTER 6: SCALA STYLE/LINT 79</b></p> <p>Scala with Style 79</p> <p>Scaliform 81</p> <p>Scapegoat 82</p> <p>WartRemover 82</p> <p>Scoverage 84</p> <p>Summary 84</p> <p><b>CHAPTER 7: TESTING 85</b></p> <p>ScalaTest 86</p> <p>Unit Tests 87</p> <p>Integration Testing 87</p> <p>Data-Driven Tests 88</p> <p>Performance Testing 89</p> <p>Acceptance Testing 90</p> <p>Mocks 92</p> <p>Load Testing 93</p> <p>Summary 94</p> <p><b>CHAPTER 8: DOCUMENTING YOUR CODE WITH SCALADOC 95</b></p> <p>Why Document Your Code? 96</p> <p>Revealing the Benefi ts 96</p> <p>Bookending the Continuum 96</p> <p>Choosing What to Document 96</p> <p>Scaladoc Structure 97</p> <p>Overall Layout 97</p> <p>Index Pane 98</p> <p>Content Pane 100</p> <p>Invoking the Scaladoc Tool 106</p> <p>Wiki Syntax 108</p> <p>Formatting with Inline Wiki Syntax 108</p> <p>Structuring with Block Elements 110</p> <p>Linking 113</p> <p>Locating Scaladoc 117</p> <p>Tagging 117</p> <p>Everyday Tagging 117</p> <p>Tagging for Groups 123</p> <p>Advanced Tagging 125</p> <p>Invoking scaladoc: Additional Options 132</p> <p>Integrating Scaladoc Creation with Your Project 133</p> <p>Configuring Maven 133</p> <p>Configuring SBT 134</p> <p>Publishing Scaladoc 134</p> <p>Tables and CSS 136</p> <p>Summary 138</p> <p><b>CHAPTER 9: TYPE SYSTEM 139</b></p> <p>What Is a Type System? 140</p> <p>Static versus Dynamic Typing 140</p> <p>What Static Type Systems Are Good For 141</p> <p>What Dynamic Type Systems Are Good For 141</p> <p>Scala’s Unified Type System 141</p> <p>Value Classes 143</p> <p>Polymorphism 145</p> <p>Subtype Polymorphism 145</p> <p>Parametric Polymorphism 146</p> <p>Ad Hoc Polymorphism 146</p> <p>Bounds 149</p> <p>Context Bounds 149</p> <p>Upper and Lower Bounds 150</p> <p>Variance 151</p> <p>Other Niceties 155</p> <p>Self-Type Annotations 155</p> <p>Self-Recursive Types 158</p> <p>Abstract Type Members 159</p> <p>Dynamic Programming 161</p> <p>Structural Types 161</p> <p>Dynamic Trait 162</p> <p>Summary 164</p> <p><b>CHAPTER 10: ADVANCED FUNCTIONAL PROGRAMMING 165</b></p> <p>Higher-Kinded Types 165</p> <p>Functional Design Patterns 167</p> <p>Functor 167</p> <p>Applicative Functor 170</p> <p>Monad 172</p> <p>Semigroup 173</p> <p>Monoid 174</p> <p>Summary 176</p> <p><b>CHAPTER 11: CONCURRENCY 179</b></p> <p>Synchronize/Atomic Variables 181</p> <p>Future Composition 184</p> <p>Parallel Collections 187</p> <p>Reactive Streams 192</p> <p>STM 195</p> <p>Actors (Akka) 198</p> <p>Spark 200</p> <p>Summary 202</p> <p><b>CHAPTER 12: SCALA.JS 205</b></p> <p>Scala.js and Its Design 205</p> <p>Getting Started: Scala.js with SBT 206</p> <p>Scala.js Peculiarities 210</p> <p>Webjars and Dealing with the Frontend Ecosytem 211</p> <p>Summary 213</p> <p>INDEX 215</p>
<p><b>Aliaksandr Bedrytski</b> is a Big Data engineer at Worldline France. <p><b>Janek Bogucki</b> is a Co-Founder of Inferess Inc., and Principal Consultant (Scala and Data Science) at Combination One. <p><b>Alessandro Lacava</b> is a lead designer and developer who specializes in functional programming and Scala. <p><b>Matthew de Detrich</b> is a Software Engineer at Zalando. <p><b>Benjamin Neil</b> is a Full Stack Engineer at AppThis LLC. <p>Visit us at wrox.com where you have access to free code samples, Programmer to Programmer forums, and discussions on the latest happenings in the industry from around the world.
<p><b>A professional's guide to the robust language big data demands</b> <p>As big data and cluster computing applications expand, so too does the need for experienced programmers equipped to handle ever-increasing data requirements. Scala bridges the gap between functional and object-oriented programming, and its Java compatibility has made it an increasingly in-demand language. This book provides experienced programmers with the guidance they need to quickly become productive with Scala in professional production applications. Without wasting time on programming fundamentals, the discussion launches directly into practical Scala topics with the most up-to-date coverage of this rapidly-expanding language. Designed for professionals, by professionals, this book demonstrates the real-world skills needed to work with Scala in production settings. <p><i>Professional Scala:</i> <ul> <li>Explains syntax, the SBT interactive build tool, the REPL workflow, and the features that make Scala useful in diverse applications</li> <li>Links functional and object-oriented programming for a more thorough understanding and quick practical mastery</li> <li>Integrates Maven, Scala.js, Scaladoc, Lint, and other useful compatibilities to help expand functionality</li> <li>Explores functional design patterns, the Scala's type system, concurrency, documentation, and testing for start-to-finish reference</li> <li>Walks through Java compatibility and advanced functional programming topics to demonstrate Scala's full capabilities</li> <li>Provides the most up-to-date coverage of this expanding language, by an expert author team</li> </ul> <p><b>Wrox Professional guides</b> are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.

Diese Produkte könnten Sie auch interessieren:

Domain Architectures
Domain Architectures
von: Daniel J. Duffy
PDF ebook
31,99 €