Mastering The Faster Web with PHP, MySQL, and JavaScript
Develop state-of-the-art web applications using the latest web technologies
Andrew Caya
- 278 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Mastering The Faster Web with PHP, MySQL, and JavaScript
Develop state-of-the-art web applications using the latest web technologies
Andrew Caya
About This Book
Make web applications run faster by using advanced PHP, SQL and JavaScript techniques
Key Features
- Use a customized PHP stack to create efficient data-driven web applications
- Ensure seamless implementation of a JavaScript & HTML 5 CSS based frontend and PHP based backend.
- Learn about problem identification, best strategies, and UI design patterns as well to build a clean, fast web application
Book Description
This book will get you started with the latest benchmarking, profiling and monitoring tools for PHP, MySQL and JavaScript using Docker-based technologies. From optimizing PHP 7 code to learning asynchronous programming, from implementing Modern SQL solutions to discovering Functional JavaScript techniques, this book covers all the latest developments in Faster Web technologies. You will not only learn to determine the best optimization strategies, but also how to implement them.
Along the way, you will learn how to profile your PHP scripts with Blackfire.io, monitor your Web applications, measure database performance, optimize SQL queries, explore Functional JavaScript, boost Web server performance in general and optimize applications when there is nothing left to optimize by going beyond performance.
After reading this book, you will know how to boost the performance of any Web application and make it part of what has come to be known as the Faster Web.
What you will learn
- Install, confgure, and use profling and benchmarking testing tools
- Understand how to recognize optimizable data structures and functions to effectively optimize a PHP7 application
- Diagnose bad SQL query performance and discover ways to optimize it
- Grasp modern SQL techniques to optimize complex SQL queries
- Identify and simplify overly complex JavaScript code
- Explore and implement UI design principles that effectively enhance the performance
- Combine web technologies to boost web server performance
Who this book is for
The audience for this book would be PHP developers who have some basic knowledge of PHP programming and Web technologies. JavaScript programming knowledge is not necessary.
Frequently asked questions
Information
Continuous Profiling and Monitoring
- Installing and configuring the Blackfire.io agent, client and PHP extension
- Integrating the Blackfire.io client with Google Chrome
- Integrating the Blackfire.io client with a known CI tool like Travis
- Installing and configuring a complete TICK Stack with Grafana
What is Blackfire.io?
Installing and configuring Blackfire.io
# rm /srv/www
# ln -s /srv/fasterweb/chapter_2 /srv/www
# cd /srv/www # wget -O blackfire-agent https://packages.blackfire.io/binaries/blackfire-agent/1.17.0/blackfire-agent-linux_static_amd64
# mv blackfire-agent /usr/local/bin/ # chmod +x /usr/local/bin/blackfire-agent
# mkdir -p /etc/blackfire # cp agent /etc/blackfire/
[blackfire] ; ; setting: ca-cert ; desc : Sets the PEM encoded certificates ; default: ca-cert= ; ; setting: collector ; desc : Sets the URL of Blackfire's data collector ; default: https://blackfire.io collector=https://blackfire.io/ ; ; setting: log-file ; desc : Sets the path of the log file. Use stderr to log to stderr ; default: stderr log-file=stderr ; ; setting: log-level ; desc : log verbosity level (4: debug, 3: info, 2: warning, 1: error) ; default: 1 log-level=1 ; ; setting: server-id ; desc : Sets the server id used to authenticate with Blackfire API ; default: server-id= ; ; setting: server-token ; desc : Sets the server token used to authenticate with Blackfire API. It is unsafe to set this from the command line ; default: server-token= ; ; setting: socket ; desc : Sets the socket the agent should read traces from. Possible value can be a unix socket or a TCP address ; default: unix:///var/run/blackfire/agent.sock on Linux, unix:///usr/local/var/run/blackfire-agent.sock on MacOSX, and tcp://127.0.0.1:8307 on Windows. socket=unix:///var/run/blackfire/agent.sock ; ; setting: spec ; desc : Sets the path to the json specifications file ; default: spec=
# mkdir -p /var/run/blackfire # touch /var/run/blackfire/agent.sock
# blackfire-agent -register
# blackfire-agent start &
# wget -O blackfire https://packages.blackfire.io/binaries/blackfire-agent/1.17.0/blackfire-cli-linux_static_amd64
# mv blackfire /usr/local/bin/ # chmod +x /usr/local/bin/blackfire # blackfire config
# wget -O blackfire.so https://packages.blackfire.io/binaries/blackfire-php/1.20.0/blackfire-php-linux_amd64-php-71.so