Details

Beginning Functional JavaScript


Beginning Functional JavaScript

Uncover the Concepts of Functional Programming with EcmaScript 8
2nd ed.

von: Anto Aravinth, Srikanth Machiraju

66,99 €

Verlag: Apress
Format: PDF
Veröffentl.: 05.12.2018
ISBN/EAN: 9781484240878
Sprache: englisch

Dieses eBook enthält ein Wasserzeichen.

Beschreibungen

<p>Understand functional programming concepts and the functional nature of the JavaScript language. Starting with an introduction to functional programming concepts, you will learn the key differences between imperative and functional programming. Diving straight into JavaScript functions, you will learn to write them with ES8. Followed by this you will move to higher order functions and learn how 'Function as Data' opens up a world of possibilities.&nbsp;</p><p>You will then build higher order functions with closures. Arrays will then be introduced, followed by a set of APIs you can use with them. You will learn how to transform one function to another using currying and partial application. The compose function will be discussed in detail, followed by functors and monads. After having an in-depth look at applicative functors, you will learn the new features offered in ES8.&nbsp;</p><p>The concluding chapters of <i>Beginning Functional JavaScript</i> will show you how to use a functional toolkit to build a small library that allows you to develop web applications, followed by tips on testing your functional code.</p><p><b>What You Will Learn&nbsp; &nbsp;</b></p><p></p><ul><li>Discover functional programming concepts such as string padding and async functions<br></li><li>Identify how functions are treated in JavaScript<br></li><li>Create a functional library that mimics Underscore.JS<br></li><li>Deep dive into ES8 functional features such as spread operators and generators<br></li><li>Create a library that works like the react-redux pattern by following the functional paradigm<br></li></ul><p></p><p><b>Who This Book Is For</b></p><p>Novice JavaScript developers.</p><p><br></p>
<b>Chapter 1: Functional Programming In Simple Terms </b><p><b>Chapter Goal: </b>Introduce to the reader the functional programming concepts in simple terms. The chapter will consist of theory and few executable JavaScript code both in imperative terms and functional terms, thus showcasing the advantages of functional programming over imperative. </p> <p><b>No of pages</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 25</p> <p><b>Sub -Topics</b></p> <p>1.&nbsp;&nbsp;&nbsp;&nbsp; What is functional programming? Why it matters?</p> <p>2.&nbsp;&nbsp;&nbsp;&nbsp; Functional programming thought process and its advantages.</p> <p>3.&nbsp;&nbsp;&nbsp;&nbsp; Talking about side effects</p> <p>4.&nbsp;&nbsp;&nbsp;&nbsp; Functions in Math and in programming</p> <p>5.&nbsp;&nbsp;&nbsp;&nbsp; Immutability leads to parallel code</p> <p>6.&nbsp;&nbsp;&nbsp;&nbsp; Testable</p> <p>7.&nbsp;&nbsp;&nbsp;&nbsp; Easy to reason about your code.</p> <p>8.&nbsp;&nbsp;&nbsp;&nbsp; Lets understand functions in JavaScript</p> <p>9.&nbsp;&nbsp;&nbsp;&nbsp; What we are going to build in this book?</p><b> Chapter 2: &nbsp;Fundamentals of JavaScript functions </b><p><b>Chapter Goal: </b>This chapter is a refresher on JavaScript functions. What they are and how they can be written in ES7/ES8&nbsp;</p> <p><b>No of pages</b>: 20<b></b></p> <p><b>Sub - Topics</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p> <p>1.&nbsp;&nbsp;&nbsp;&nbsp; JavaScript Functions</p> 2.&nbsp;&nbsp;&nbsp;&nbsp; Functions vs Methods in JavaScript<p></p> <p>3.&nbsp;&nbsp;&nbsp;&nbsp; Functions old way and ES6 way</p> <p>4.&nbsp;&nbsp;&nbsp;&nbsp; Anonymous functions or arrow functions </p> <p>5.&nbsp;&nbsp;&nbsp;&nbsp; Deep Dive. Functions Prototype. </p><b> Chapter 3: &nbsp;Higher Order Functions</b><p><b>Chapter Goal: </b>In this chapter we are going give a different thought process on how functions are treated as data in JavaScript world. We will be covering what is data and how function as data allows several things possible in JavaScript. </p> <p><b>No of pages</b>: 20<b></b></p> <p><b>Sub - Topics:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p> <p>1.&nbsp;&nbsp;&nbsp;&nbsp; Data in JavaScript</p> <p>2.&nbsp;&nbsp;&nbsp;&nbsp; Functions as Data in JavaScript</p> <p>3.&nbsp; Higher order functions</p> <p>3.&nbsp;&nbsp;&nbsp;&nbsp; Our first functional approach to “loop” problem</p><b> Chapter 4: &nbsp;Closures&nbsp;</b><div><b><br></b></div><div><b> Chapter Goal: </b>This chapter going to teach you the fundamentals of closures and how closures help to build higher order functions.<p></p> <p><b>No of pages</b>: 30</p> <p><b>Sub - Topics: </b></p> <p>1. Understanding closures.</p><p>2. How closures help in higher order functions</p><p>3. Create functional libraries using the above approaches learned.&nbsp;</p><p>4. Example problem and using the libraries that we created to show how functional programming helps them.</p><div><b>Chapter 5: Being Functional On Arrays</b><br></div><p><b>Chapter Goal: </b>This chapter introduces set of APIs’ that one can use on top of Arrays.&nbsp; </p> <p>No of pages: 20</p> <p><b>Sub - Topics: </b></p> <p>1. Arrays in JavaScript</p><p>2. How to access arrays, delete, loop them etc</p><p>3. Create functional libraries using the above approaches learned.&nbsp;</p><p>4. Example problem and using the libraries that we created to show how functional programming helps them.</p><b> Chapter 6:&nbsp;Currying and Partial&nbsp;Application</b><p><b>Chapter Goal: </b>In this chapter we are going to see how and what is partial and currying is all about. </p> <p><b>No of pages</b>: 20</p> <p><b>Sub - Topics: </b></p> <p>1. What is composition?</p><p>2. Unix philosophy – build small things well and good</p><p>3. Creating composing function</p><p>4. Currying leads to Composition.&nbsp;</p><p>5. Pipelines</p><p>6. Showing examples of how to use composition</p><p>7. Category theory</p><div><b>Chapter 7: Composition and Pipeline&nbsp;</b></div><div><b><br></b></div><div><b>Chapter Goal:&nbsp;</b>In this chapter we are going to discuss on how to compose our functions to build a larger functionality<br></div><p></p> <p><b>No of pages</b>: 20</p> <p><b>Sub - Topics: </b></p><div>1. Unix philosophy</div><div><br></div><div>2. Creating our compose function</div><div><br></div><div>3. What is pipeline being all about</div><div><br></div><div>4. Debugging using tap function.</div><div><br></div><b> Chapter 8:&nbsp;Fun with Functors</b><p><b>Chapter Goal: &nbsp;</b>In this chapter we are going to discuss on what Functors are and how they will be useful to us.</p> <p><b>No of pages</b>: 20</p> <p><b>Sub - Topics: </b></p> <p>1. A bit of algebra</p><p>2. Container Theory</p><p>3. First Functor</p><p>4. Adding Container functor code to our library</p><p>5. Showing examples of how to use the functors</p><p>6. Examples of MayBe and Either functors</p><div><b>Chapter 9:&nbsp;Monads In Depth</b><br></div><p><b>Chapter Goal:&nbsp; </b>In this chapter we are going to talk about how to create monads into our functional library. </p> <p><b>No of pages</b>: 20</p> <p><b>Sub - Topics: </b></p> <p>1. Defining the problem&nbsp;</p><p>2. Understanding nested map hell</p><p>3. Implementing join and chain</p><p>4. The use case of Monads.</p> <p><b>Chapter 10</b>:&nbsp;<b>Applicative Functors&nbsp;</b><br></p> <p><b>Chapter Goal: </b>In this chapter we are going to talk about applicative functors in depth and create them in our functional library. </p> <p><b>No of pages</b>: 20</p> <p><b>Sub </b>– <b>Topics</b>:</p> <p>1.&nbsp; What are applicative functors</p><p>2. Their use cases</p><p>3. Adding applicative to our library</p><p>4. Their Laws</p> <p><b>Chapter 11:&nbsp;</b><b>Pause, Resume with Generators</b></p> <p><b>Chapter Goal: </b>In this chapter we are going to talk about new features of ES8 called generators. We are going to see how to use it wisely to make Async sync.</p> <p><b>No of Pages</b>: 20</p> <b>Sub – Topics:</b><p></p> <p>1. What are generators?&nbsp;</p><p>2. Let’s create an indefinite lazy stream</p><p>3. Generators and EventLoop</p><p>4. Let’s understand Yield</p><p>5. Making Async sync</p><p>6. Adding the code to our library</p><p>7. Showcasing examples.&nbsp;</p><p>8. Async and Await, the new concepts of ES8!&nbsp;</p> <p><b>Chapter 12: Building a React-like library</b></p><p><b>Chapter Goal : </b>In this chapter, you will use a Functional Toolkit to build a small library. The library is used to build web applications with minimal efforts.</p><p><b>No of Pages: </b>25</p><p><b>Sub – Topics:</b></p><p>1. Defining the environment</p><p>2. Using functions throughout the codebase</p><p>3. Node APIs to speak with DOM</p><p>4. JSX and how to convert to functional calls.&nbsp;</p><p>5. Handling events</p><p>6. Handling updates</p><p>7. Recursion</p><p><b>Chapter 13: Testing and Closing Thoughts</b></p><p><b>Chapter Goal:</b> In this chapter we are going to see how testing can be a walk in the park if you follow a functional approach and also look at key points to take away from the book.</p><p><b>No of Pages: </b>10</p><p><b>Sub – Topics:</b></p><p>1. Testing imperative Code</p><p>2. Testing functional code</p><p>3. Testing made easy via Functional</p><p>4. Final thoughts</p></div>
<div>Anto Aravinth has been in the software industry for more than four years. He has developed many systems that are written in JavaScript and JavaWorld. Anto has knowledge of the fundamentals of JavaScript and how it works and has trained many people. Anto is an open source contributor to the React, Groovy, and Selenium frameworks and is co-author of React version 15.&nbsp; <br></div><div><br></div><div><p>Srikanth Machiraju has over 10 years of experience as a developer, architect, technical trainer and community speaker. He is currently working as Senior Consultant with Microsoft Hyderabad and leading a team of 100 developers and quality analysts together developing an advanced cloud-based platform for a tech giant in oil industry. With an aim to be an enterprise architect who can design hyper-scale modern applications with intelligence he constantly learns and shares modern application development tactics using cutting-edge platforms and technologies. Prior to Microsoft he was worked with BrainScale as Corporate trainer & Senior Technical Analyst on application design, development, migrations using Azure. He is a tech savvy developer and passionate about embracing new technologies and sharing his learning via blog or community engagements. He has also authored “Learned Windows Server Containers”, “Developing Bots with Microsoft Bot framework”, blogs run his own YouTube channel called “Tech Talk with Sriks” and active on LinkedIn.</p></div><div><p></p></div>
<p>Understand functional programming concepts and the functional nature of the JavaScript language. Starting with an introduction to functional programming concepts, you will learn the key differences between imperative and functional programming. Diving straight into JavaScript functions, you will learn to write them with ES8. Followed by this you will move to higher order functions and learn how 'Function as Data' opens up a world of possibilities.&nbsp;</p><p>You will then build higher order functions with closures. Arrays will then be introduced, followed by a set of APIs you can use with them. You will learn how to transform one function to another using currying and partial application. The compose function will be discussed in detail, followed by functors and monads. After having an in-depth look at applicative functors, you will learn the new features offered in ES8.&nbsp;</p><p>The concluding chapters of&nbsp;<i>Beginning Functional JavaScript</i>&nbsp;will show you how to use a functional toolkit to build a small library that allows you to develop web applications, followed by tips on testing your functional code.</p><p>You will:</p><p></p><p></p><p></p><p></p><ul><li>Discover functional programming concepts such as string padding and async functions<br></li><li>Identify how functions are treated in JavaScript<br></li><li>Create a functional library that mimics Underscore.JS<br></li><li>Deep dive into ES8 functional features such as spread operators and generators<br></li><li>Create a library that works like the react-redux pattern by following the functional paradigm</li></ul>
<p>Shows how functional APIs can be built</p><p>Builds a React-like library following functional concepts</p><p>Based on EcmaScript 8</p>
<p></p><p>Based on EcmaScript 8</p><p>Builds a React-like Library following functional concepts<br></p><p>Shows&nbsp;how functional APIs can be built</p>

Diese Produkte könnten Sie auch interessieren:

Topics in Artificial Intelligence Applied to Industry 4.0
Topics in Artificial Intelligence Applied to Industry 4.0
von: Mahmoud Ragab AL-Refaey, Amit Kumar Tyagi, Abdullah Saad AL-Malaise AL-Ghamdi, Swetta Kukreja
PDF ebook
102,99 €
Effective Vulnerability Management
Effective Vulnerability Management
von: Chris Hughes, Nikki Robinson
EPUB ebook
22,99 €