舉報

會員
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.
最新章節(jié)
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Summary
- Aggregating streaming transactions
- Drawing a scatter chart
- Writing to an in-memory sink
品牌:中圖公司
上架時間:2021-07-23 15:41:08
出版社:Packt Publishing
本書數(shù)字版權(quán)由中圖公司提供,并由其授權(quán)上海閱文信息技術(shù)有限公司制作發(fā)行
- Leave a review - let other readers know what you think 更新時間:2021-07-23 16:26:11
- Other Books You May Enjoy
- Summary
- Aggregating streaming transactions
- Drawing a scatter chart
- Writing to an in-memory sink
- Reading transactions from Kafka
- Analyzing streaming transactions with Zeppelin
- Introducing Spark Streaming
- Running StreamingProducerApp
- Putting it all together
- Converting to transaction and serializing
- Deserializing live transactions
- Subscribing with Pusher
- Streaming transactions to Kafka
- Connecting to Kafka
- Offset management
- Consumer group
- Consuming data from Kafka
- Producing data into Kafka
- Topics partitions and offsets
- Introducing Apache Kafka
- Drawing more charts
- Drawing our first chart
- Analyzing transactions with Zeppelin
- Drawing charts
- Writing a paragraph
- Structure of a notebook
- Testing Zeppelin
- Starting Zeppelin
- Installing Zeppelin
- Introduction to Zeppelin
- Batch and Streaming Analytics
- Summary
- Running spark-submit
- Packaging the assembly JAR
- Installing Apache Spark
- Running the application with spark-submit
- Implementing BatchProducerApp
- Implementing processRepeatedly
- Implementing processOneBatch
- Testing processOneBatch
- Putting it all together
- Using the IO Monad
- Writing transactions in Parquet
- Introducing the Parquet format
- Saving transactions
- Implementing httpToDomainTransactions
- Unit testing httpToDomainTransactions
- Implementing jsonToHttpTransaction
- Unit testing jsonToHttpTransaction
- Parsing the JSON response
- Calling the Bitstamp REST API
- Implementing the transaction batch producer
- Execution model
- Transforming rows using select
- Transforming rows using map
- Exploring the Spark API with the Scala console
- Dataset
- Dataframe
- Spark SQL
- RDD DataFrame and Dataset
- Understanding Apache Spark
- Setting up the project
- Fetching and Persisting Bitcoin Market Data
- Summary
- Extending jQuery
- Notifying the user
- Adding the web socket
- Implementing the client side
- A diagram of Actors
- Handling WebSocket
- Implementing BrowserManager
- Creating the web socket route
- Implementing the server side
- Setting up
- Actors
- Interactive Browser
- Summary
- Debugging the interface
- Deploying the user interface
- Updating the quantity
- Removing a product from the cart
- Adding a product to the cart
- Implementing UI actions
- Initializing the user interface
- Setting the main method
- Calling our API
- Adding jQuery to our project
- Introducing the UI manager
- Cart panel
- Product list panel
- Main layout
- Building the page
- Creating the layout
- Defining the layout
- Setting up
- Learning objectives
- Online Shopping - User Interface
- Summary
- Deploying on Heroku
- Cart endpoints
- List of products
- Login
- Running the application
- Declaring endpoints
- Installing Swagger
- Swagger
- Listing products in cart
- Passing the cookie
- Implementation
- Unit test
- Logging in
- Completing the cart test
- Adding a product
- Action definition
- Encoding JSON with Circe
- Product list
- Implementing the product API
- Completing the product tests
- Implementing the API with persistence
- Checking the API
- Running the test
- Defining the routes
- Writing the tests
- The REST API
- Online Shopping - REST API
- Summary
- Heroku configuration
- Deploying your application
- Setting up an account
- Deploying the application
- Running the test
- Data Access Object creation
- Database creation
- Rounding up Futures
- Execution context
- Using for-comprehension
- Composing Futures
- Callback
- Waiting on a Future
- Getting a concrete value
- Future
- Cart test
- Product test
- Database test
- Setting up the database
- Setting up Slick
- Persistence
- Creating the project
- Online Shopping - Persistence
- Summary
- Usage examples
- Laws
- cats.Monad
- Usage examples
- Laws
- cats.Applicative
- Usage examples
- Laws
- cats.Apply
- Usage examples
- Laws
- cats.Functor
- Higher-kinded types
- Higher-order function
- Arity
- Higher-kinded types
- Usage examples
- Laws
- cats.Monoid
- Usage examples
- Laws
- cats.Semigroup
- org.scalactic.Equality
- scala.math.Ordering
- Common type classes
- Type class recipe
- Understanding type classes
- Type Classes
- Summary
- How are implicits resolved?
- Implicit class
- Implicit conversion
- executionContext
- breakOut
- Examples in the SDK
- Passing an application context
- Passing a timeout
- Implicit parameter usage
- Implicit parameters
- Implicits
- Partially applied functions
- Currying
- Function value
- Currying and partially applied functions
- Covariance in collections
- Contravariant encoder
- CovariantDecoder
- InvariantDecoder
- Covariance and contravariance
- Lazy data structures
- By-name parameters
- lazy val
- Strict val
- Strictness and laziness
- Project setup
- Advanced Features
- Further reading
- Questions
- Summary
- Refactoring SimulatePlanApp.strMain
- Implementing SimulatePlanApp.strSimulatePlan
- Implementing parsing functions
- Adding unit tests
- Refactoring the retirement calculator to use ValidatedNel
- Introducing Validated
- Introducing NonEmptyList
- Adding the cats dependency
- Using ValidatedNel
- Refactoring SimulatePlanApp
- Refactoring simulatePlan
- Refactoring monthlyRate
- Refactoring nbOfMonthsSavings
- Refactoring the retirement calculator to use Either
- Manipulating Either
- Using Either
- Refactoring the retirement calculator to use Option
- Composing transformations with for... yield
- Manipulating instances of Option
- Using Option
- Showing how exceptions break referential transparency
- Best practices
- Defining pure functions
- Ensuring referential transparency
- Using the finally block
- Catching exceptions
- Throwing exceptions
- Using exceptions
- Setup
- Handling Errors
- Summary
- Packaging the application
- Creating the App object
- Packaging the application
- Computing real returns
- Loading inflation data
- Loading the file with Source
- Writing the unit test using the column selection mode
- Loading market data
- Refactoring simulatePlan
- Pattern matching
- Filtering returns for a specific period
- Defining an algebraic data type
- Using market rates
- Ensuring termination
- Understanding tail-recursion
- Writing the function body
- Writing a failing test for nbOfMonthsSaving
- Calculating when you can retire
- Implementing simulatePlan
- Working with tuples
- Writing a failing unit test
- Simulating a retirement plan
- Writing a test for the decumulation phase
- Refactoring the production code
- Implementing futureCapital
- Writing a unit test for the accumulation phase
- Calculating the future capital
- Project overview
- Developing a Retirement Calculator
- Summary
- Implementing the Main method
- Implementing another feature
- Writing the first unit test
- Creating the Main object
- Creating the project
- Creating my first project
- Companion object
- Case class
- Scala class hierarchy
- Trait
- Abstract class
- Overriding methods
- Subclass assignment
- Class inheritance
- Using the worksheet
- Class
- If...else expression
- Side effects
- Declaring and calling functions
- Types
- Declaring variables
- Using the Scala Console
- Using the Scala Console and Worksheet
- Running the Scala Console
- Build
- SBT synchronization
- Using the basic features
- Installing IntelliJ IDEA
- Installing the Java SDK
- Setting up your environment
- Writing Your First Program
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewer
- About the authors
- Contributors
- Packt.com
- Why subscribe?
- Packt Upsell
- Scala Programming Projects
- Copyright and Credits
- Title Page
- 封面
- 封面
- 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