Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering The Faster Web with PHP, MySQL, and JavaScript

You're reading from   Mastering The Faster Web with PHP, MySQL, and JavaScript Develop state-of-the-art web applications using the latest web technologies

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781788392211
Length 278 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Andrew Caya Andrew Caya
Author Profile Icon Andrew Caya
Andrew Caya
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Faster Web – Getting Started 2. Continuous Profiling and Monitoring FREE CHAPTER 3. Harnessing the Power of PHP 7 Data Structures and Functions 4. Envisioning the Future with Asynchronous PHP 5. Measuring and Optimizing Database Performance 6. Querying a Modern SQL Database Efficiently 7. JavaScript and Danger-Driven Development 8. Functional JavaScript 9. Boosting a Web Server's Performance 10. Going Beyond Performance 11. Other Books You May Enjoy

More upcoming JavaScript features


Many other features will soon be added to JavaScript that will push the language further down the road of functional and asynchronous programming. Let's have a look at a few of them.

Async functions

Because of asynchronous programming, the need for FP will be felt even more when generators will be used to do so and when avoiding race conditions will become even more important than it is now.

Indeed, ES2017 introduced async / await functions. These functions will allow us to easily create an event loop and make asynchronous I/O calls from within the loop in order to obtain non-blocking code. There will be many practical applications of this, including the possibility of speeding up web page loading times by asynchronously downloading complimentary JavaScript files after rendering is completed. Here is a code example using these types of functions:

async function createEntity(req, res) {
    try {
        const urlResponse = await fetch(req.body.url)
        const...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image