Building a Web Application with PHP and MariaDB: A Reference Guide
eBook - ePub

Building a Web Application with PHP and MariaDB: A Reference Guide

  1. 200 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Building a Web Application with PHP and MariaDB: A Reference Guide

Book details
Book preview
Table of contents
Citations

About This Book

In Detail

Starting with a quick refresher of the PHP language and MariaDB database, readers will explore concepts such as unit testing, session authentication and management, permissions engine, caching, security, and performance optimization. Building a Web Application with PHP and MariaDB: A Reference Guide begins with basic and advanced programming techniques in both PHP and MariaDB, followed by specialized operations such as working with files and directories. Next, you will be introduced to the concept of REST, and how principles of REST are applied to host XML and JSON feeds for others to consume. This book will show readers how to build a web application that will be an online book store. This would leverage a logging system that keeps a track of the activity that is going on in the application.

This book will help a beginner to learn the basics of object-oriented programming with PHP and help a seasoned expert to understand the intricacies of securing and speeding up their web applications.

Approach

This is a step-by-step, tutorial guide designed to help readers transition from beginners to more experienced developers using clear explanations. The variety of examples will help readers build, secure, and host real-time web applications.

Who this book is for

If you are a developer who wants to use PHP and MariaDB to build web applications, this book is ideal for you. Beginners can use this book to start with the basics and learn how to build and host web applications. Seasoned PHP Developers can use this book to get familiar with the new features of PHP 5.4 and 5.5, unit testing, caching, security, and performance optimization.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Building a Web Application with PHP and MariaDB: A Reference Guide by Sai Srinivas Sriparasa in PDF and/or ePUB format, as well as other popular books in Informatique & Programmation Open Source. We have over one million books available in our catalogue for you to explore.

Information

Year
2014
ISBN
9781783981625

Building a Web Application with PHP and MariaDB: A Reference Guide


Table of Contents

Building a Web Application with PHP and MariaDB: A Reference Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. CRUD Operations, Sorting, Filtering, and Joins
String datatypes
Number datatypes
Date datatypes
The students table
The courses table
The students_courses table
Inserting data
Retrieving data
Sorting data
Filtering data
Updating data
Deleting data
Joins
Summary
2. Advanced Programming with MariaDB
Enhancing the existing tables
Working with stored procedures
Working with stored routines
Working with triggers
Summary
3. Advanced Programming with PHP
New features in PHP 5.4 and 5.5
Updated array declaration
The array dereferencing function
The list() function in the foreach statement
Availability of $this in closures
Class member access on instantiation
Generators
Traits
Addition of the finally block to exception handling
Unit testing
Installing PHPUnit
Working with MariaDB
PHP – mysqli
PHP – PDO
Summary
4. Setting Up Student Portal
Setting up the nuts and bolts of our application
Setting up URL rewrite
Setting up MVC
Adding a student
Listing all students
Adding a course
Listing all courses
Registering a student to a course
Viewing all registrations
Summary
5. Working with Files and Directories
Data imports
Data exports
Logging
Summary
6. Authentication and Access Control
Authentication
Access controls
User roles
Summary
7. Caching
Introduction to caching
Caching in the database
Caching in the application
Advanced caching techniques
Summary
8. REST API
What is REST?
Generating XML feeds
Generating JSON feeds
Summary
9. Security
Securing the Apache web server
Hiding server information
Server configuration limits
Securing MariaDB
Password-protected access
Building views to restrict access
Creating users and granting access
Securing PHP
Summary
10. Performance Optimization
Performance optimization for the Apache web server
Disabling unused modules
Using compression
Caching
Performance optimization for MariaDB
Best practices for data retrieval
Understanding query execution
Query optimization and indexing
Performance optimization for PHP
CDN, reverse proxy, and database replication
Summary
Index

Building a Web Application with PHP and MariaDB: A Reference Guide

Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2014
Production Reference: 1090614
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-162-5
www.packtpub.com
Cover Image by Artie Ng ()

Credits

Author
Sai Srinivas Sriparasa
Reviewers
Dario Grd
Nikolai Lifanov
Esteban De La Fuente Rubio
Commissioning Editor
Kunal Parikh
Acquisition Editor
Mohammad Rizvi
Content Development Editor
Shaon Basu
Technical Editors
Mrunmayee Patil
Aman Preet Singh
Copy Editors
Janbal Dharmaraj
Sayanee Mukherjee
Project Coordinator
Sageer Parkar
Proofreaders
Simran Bhogal
Stephen Copestake
Indexers
Hemangini Bari
Mariammal Chettiyar
Mehreen Deshmukh
Tejal Soni
Production Coordinator
Nitesh Thakur
Cover Work
Nitesh Thakur

About the Author

Sai Srinivas Sriparasa is a web developer and an open-source evangelist living in the Atlanta area. He was the lead developer for building Dr. Oz's website and currently works on predictive analysis algorithms for News Distribution Network (NDN). He has previously led teams for companies such as Sprint Nextel, West Interactive, Apple, and SAC Capital. His repertoire includes PHP, Python, MySQL, MariaDB, MongoDB, Hadoop, JavaScript, HTML5, Responsive Web Development, ASP.NET, C#, Silverlight, and so on. He has worked on books such as JavaScript and JSON Essentials, Packt Publishing.

About the Reviewers

Dario Grd is a web developer with 7 years of experience in various technologies. He works with programming languages such as PHP, Java, Groovy, and .NET. He loves working with frameworks such as Symfony, Grails, jQuery, and Bootstrap.
He finished his master's degree in Informatics at the Faculty of Organization and Informatics, University of Zagreb. After getting the degree, he started working as a programmer at a company specialized in developing banking information systems, where he became a web team leader. Currently, he is working at the Faculty of Organization and Informatics as an expert assistant in Higher Education and Sc...

Table of contents

  1. Building a Web Application with PHP and MariaDB: A Reference Guide