舉報

會員
Scala Programming Projects
Scalaisatype-safeJVMlanguagethatincorporatesobject-orientedandfunctionalprogramming(OOPandFP)aspects.ThisbookgetsyoustartedwithessentialsofsoftwaredevelopmentbyguidingyouthroughvariousaspectsofScalaprogramming,helpingyoubridgethegapbetweenlearningandimplementing.YouwilllearnabouttheuniquefeaturesofScalathroughdiverseapplicationsandexperiencesimpleyetpowerfulapproachesforsoftwaredevelopment.ScalaProgrammingProjectswillhelpyoubuildanumberofapplications,beginningwithsimpleprojects,suchasafinancialindependencecalculator,andadvancingtootherprojects,suchasashoppingapplicationandaBitcointransactionanalyzer.YouwillbeabletousevariousScalafeatures,suchasitsOOPandFPcapabilities,andlearnhowtowriteconcise,reactive,andconcurrentapplicationsinatype-safemanner.Youwillalsolearnhowtousetop-notchlibrariessuchasAkkaandPlayandintegrateScalaappswithKafka,Spark,andZeppelin,alongwithdeployingapplicationsonacloudplatform.Bytheendofthebook,youwillnotonlyknowtheinsandoutsofScala,butyouwillalsobeabletoapplyittosolveavarietyofreal-worldproblems.
目錄(323章)
倒序
- 封面
- Title Page
- Copyright and Credits
- Scala Programming Projects
- Packt Upsell
- Why subscribe?
- Packt.com
- Contributors
- About the authors
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Reviews
- Writing Your First Program
- Setting up your environment
- Installing the Java SDK
- Installing IntelliJ IDEA
- Using the basic features
- SBT synchronization
- Build
- Running the Scala Console
- Using the Scala Console and Worksheet
- Using the Scala Console
- Declaring variables
- Types
- Declaring and calling functions
- Side effects
- If...else expression
- Class
- Using the worksheet
- Class inheritance
- Subclass assignment
- Overriding methods
- Abstract class
- Trait
- Scala class hierarchy
- Case class
- Companion object
- Creating my first project
- Creating the project
- Creating the Main object
- Writing the first unit test
- Implementing another feature
- Implementing the Main method
- Summary
- Developing a Retirement Calculator
- Project overview
- Calculating the future capital
- Writing a unit test for the accumulation phase
- Implementing futureCapital
- Refactoring the production code
- Writing a test for the decumulation phase
- Simulating a retirement plan
- Writing a failing unit test
- Working with tuples
- Implementing simulatePlan
- Calculating when you can retire
- Writing a failing test for nbOfMonthsSaving
- Writing the function body
- Understanding tail-recursion
- Ensuring termination
- Using market rates
- Defining an algebraic data type
- Filtering returns for a specific period
- Pattern matching
- Refactoring simulatePlan
- Loading market data
- Writing the unit test using the column selection mode
- Loading the file with Source
- Loading inflation data
- Computing real returns
- Packaging the application
- Creating the App object
- Packaging the application
- Summary
- Handling Errors
- Setup
- Using exceptions
- Throwing exceptions
- Catching exceptions
- Using the finally block
- Ensuring referential transparency
- Defining pure functions
- Best practices
- Showing how exceptions break referential transparency
- Using Option
- Manipulating instances of Option
- Composing transformations with for... yield
- Refactoring the retirement calculator to use Option
- Using Either
- Manipulating Either
- Refactoring the retirement calculator to use Either
- Refactoring nbOfMonthsSavings
- Refactoring monthlyRate
- Refactoring simulatePlan
- Refactoring SimulatePlanApp
- Using ValidatedNel
- Adding the cats dependency
- Introducing NonEmptyList
- Introducing Validated
- Refactoring the retirement calculator to use ValidatedNel
- Adding unit tests
- Implementing parsing functions
- Implementing SimulatePlanApp.strSimulatePlan
- Refactoring SimulatePlanApp.strMain
- Summary
- Questions
- Further reading
- Advanced Features
- Project setup
- Strictness and laziness
- Strict val
- lazy val
- By-name parameters
- Lazy data structures
- Covariance and contravariance
- InvariantDecoder
- CovariantDecoder
- Contravariant encoder
- Covariance in collections
- Currying and partially applied functions
- Function value
- Currying
- Partially applied functions
- Implicits
- Implicit parameters
- Implicit parameter usage
- Passing a timeout
- Passing an application context
- Examples in the SDK
- breakOut
- executionContext
- Implicit conversion
- Implicit class
- How are implicits resolved?
- Summary
- Type Classes
- Understanding type classes
- Type class recipe
- Common type classes
- scala.math.Ordering
- org.scalactic.Equality
- cats.Semigroup
- Laws
- Usage examples
- cats.Monoid
- Laws
- Usage examples
- Higher-kinded types
- Arity
- Higher-order function
- Higher-kinded types
- cats.Functor
- Laws
- Usage examples
- cats.Apply
- Laws
- Usage examples
- cats.Applicative
- Laws
- Usage examples
- cats.Monad
- Laws
- Usage examples
- Summary
- Online Shopping - Persistence
- Creating the project
- Persistence
- Setting up Slick
- Setting up the database
- Database test
- Product test
- Cart test
- Future
- Getting a concrete value
- Waiting on a Future
- Callback
- Composing Futures
- Using for-comprehension
- Execution context
- Rounding up Futures
- Database creation
- Data Access Object creation
- Running the test
- Deploying the application
- Setting up an account
- Deploying your application
- Heroku configuration
- Summary
- Online Shopping - REST API
- The REST API
- Writing the tests
- Defining the routes
- Running the test
- Checking the API
- Implementing the API with persistence
- Completing the product tests
- Implementing the product API
- Product list
- Encoding JSON with Circe
- Action definition
- Adding a product
- Completing the cart test
- Logging in
- Unit test
- Implementation
- Passing the cookie
- Listing products in cart
- Swagger
- Installing Swagger
- Declaring endpoints
- Running the application
- Login
- List of products
- Cart endpoints
- Deploying on Heroku
- Summary
- Online Shopping - User Interface
- Learning objectives
- Setting up
- Defining the layout
- Creating the layout
- Building the page
- Main layout
- Product list panel
- Cart panel
- Introducing the UI manager
- Adding jQuery to our project
- Calling our API
- Setting the main method
- Initializing the user interface
- Implementing UI actions
- Adding a product to the cart
- Removing a product from the cart
- Updating the quantity
- Deploying the user interface
- Debugging the interface
- Summary
- Interactive Browser
- Actors
- Setting up
- Implementing the server side
- Creating the web socket route
- Implementing BrowserManager
- Handling WebSocket
- A diagram of Actors
- Implementing the client side
- Adding the web socket
- Notifying the user
- Extending jQuery
- Summary
- Fetching and Persisting Bitcoin Market Data
- Setting up the project
- Understanding Apache Spark
- RDD DataFrame and Dataset
- Spark SQL
- Dataframe
- Dataset
- Exploring the Spark API with the Scala console
- Transforming rows using map
- Transforming rows using select
- Execution model
- Implementing the transaction batch producer
- Calling the Bitstamp REST API
- Parsing the JSON response
- Unit testing jsonToHttpTransaction
- Implementing jsonToHttpTransaction
- Unit testing httpToDomainTransactions
- Implementing httpToDomainTransactions
- Saving transactions
- Introducing the Parquet format
- Writing transactions in Parquet
- Using the IO Monad
- Putting it all together
- Testing processOneBatch
- Implementing processOneBatch
- Implementing processRepeatedly
- Implementing BatchProducerApp
- Running the application with spark-submit
- Installing Apache Spark
- Packaging the assembly JAR
- Running spark-submit
- Summary
- Batch and Streaming Analytics
- Introduction to Zeppelin
- Installing Zeppelin
- Starting Zeppelin
- Testing Zeppelin
- Structure of a notebook
- Writing a paragraph
- Drawing charts
- Analyzing transactions with Zeppelin
- Drawing our first chart
- Drawing more charts
- Introducing Apache Kafka
- Topics partitions and offsets
- Producing data into Kafka
- Consuming data from Kafka
- Consumer group
- Offset management
- Connecting to Kafka
- Streaming transactions to Kafka
- Subscribing with Pusher
- Deserializing live transactions
- Converting to transaction and serializing
- Putting it all together
- Running StreamingProducerApp
- Introducing Spark Streaming
- Analyzing streaming transactions with Zeppelin
- Reading transactions from Kafka
- Writing to an in-memory sink
- Drawing a scatter chart
- Aggregating streaming transactions
- Summary
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-07-23 16:26:11
推薦閱讀
- 通信網(wǎng)絡(luò)基礎(chǔ)與設(shè)備
- 智能網(wǎng)聯(lián)汽車V2X與智能網(wǎng)聯(lián)設(shè)施I2X
- 社交電商運營策略、技巧與實操
- OpenLayers Cookbook
- 通信簡史:從信鴿到6G+
- 面向云平臺的物聯(lián)網(wǎng)多源異構(gòu)信息融合方法
- Wireshark網(wǎng)絡(luò)分析就這么簡單
- Getting Started with Memcached
- 深入理解OpenStack Neutron
- 轉(zhuǎn)化:提升網(wǎng)站流量和轉(zhuǎn)化率的技巧
- 數(shù)據(jù)血緣分析原理與實踐
- 計算機網(wǎng)絡(luò)技術(shù)
- Python API Development Fundamentals
- 5G智慧交通
- ReasonML Quick Start Guide
- 無線傳感器網(wǎng)絡(luò)定位方法及應(yīng)用
- Microsoft System Center 2012 Configuration Manager:Administration Cookbook
- Hands-On Microservices:Monitoring and Testing
- 互聯(lián)網(wǎng)心理學(xué):新心理與行為研究的興起
- 移動應(yīng)用開發(fā)技術(shù)
- 一板成功:高速電路研發(fā)與設(shè)計典型故障案例解析
- 中小型局域網(wǎng)搭建與管理實訓(xùn)教程
- 工業(yè)互聯(lián)網(wǎng)創(chuàng)新實戰(zhàn):技術(shù)、產(chǎn)業(yè)融合、案例分析全案
- 邊做邊學(xué)物聯(lián)網(wǎng)技術(shù)
- 企業(yè)云計算:原理、架構(gòu)與實踐指南
- 物聯(lián)網(wǎng)全棧開發(fā)原理與實戰(zhàn)
- Web Application Development with R Using Shiny(Third Edition)
- Flutter技術(shù)入門與實戰(zhàn)
- Data-Centric Applications with Vaadin 8
- Apache Solr 4 Cookbook