Mastering Symfony

Orchestrate the designing, development, testing, and deployment of web applications with Symfony
Preview in Mapt

Mastering Symfony

Sohail Salehi

2 customer reviews
Orchestrate the designing, development, testing, and deployment of web applications with Symfony
Mapt Subscription
FREE
โ‚ฌ29.98/m after trial
eBook
โ‚ฌ24.36
RRP โ‚ฌ34.78
Save 29%
Print + eBook
โ‚ฌ35.99
RRP โ‚ฌ35.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packtโ€™s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
โ‚ฌ0.00
โ‚ฌ24.36
โ‚ฌ35.99
โ‚ฌ29.99 p/m after trial
RRP โ‚ฌ34.78
RRP โ‚ฌ35.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Mastering Symfony Book Cover
Mastering Symfony
โ‚ฌ 34.78
โ‚ฌ 24.36
Mastering Microservices with Java 9 - Second Edition Book Cover
Mastering Microservices with Java 9 - Second Edition
โ‚ฌ 41.98
โ‚ฌ 29.40
Buy 2 for โ‚ฌ35.72
Save โ‚ฌ34.20
Add to Cart

Book Details

ISBN 139781784390310
Paperback290 pages

Book Description

In this book, you will learn some lesser known aspects of development with Symfony, and you will see how to use Symfony as a framework to create reliable and effective applications. You might have developed some impressive PHP libraries in other projects, but what is the point when your library is tied to one particular project? With Symfony, you can turn your code into a service and reuse it in other projects.

This book starts with Symfony concepts such as bundles, routing, twig, doctrine, and more, taking you through the request/response life cycle. You will then proceed to set up development, test, and deployment environments in AWS. Then you will create reliable projects using Behat and Mink, and design business logic, cover authentication, and authorization steps in a security checking process. You will be walked through concepts such as DependencyInjection, service containers, and services, and go through steps to create customized commands for Symfony's console. Finally, the book covers performance optimization and the use of Varnish and Memcached in our project, and you are treated with the creation of database agnostic bundles and best practices.

Table of Contents

Chapter 1: Installing and Configuring Symfony
Why Symfony?
Installation
Composer and Packagist
Summary
Chapter 2: The Request and Response Life Cycle
The big picture
Anatomy of a bundle
Custom bundles versus AppBundle
Creating templates with TWIG
Creating data fixtures
Dynamic templates and controllers
The big picture with MVC
Summary
Chapter 3: Setting Up the Environment
The importance of Continuous Integration
Amazon Web Services
Elastic Compute Cloud
Setting up the server
Simple Email Service
Installing PHP tools
Orchestrating the build process
Creating a new job in Jenkins
Running the first build
Do I need CI?
Summary
Chapter 4: Using Behavior-Driven Development in Symfony
Getting started with BDD
What is Behat?
Writing a scenario for the about page
The about page does not follow BDD
More about the acceptance test flow in Mink
Defining and prioritizing features
Codeception โ€“ the BDD style testing framework
Summary
Chapter 5: Business Logic
Choosing between creating a Model or entity
So where does the business logic live?
Reviewing the facts and building entity relationships
Some business logic features and scenarios
TDD and BDD with Codeception
On the CI side of the story
Summary
Chapter 6: Dashboard and Security
How security is organized in Symfony?
Handling users with FOSUserBundle
Generating automated data fixtures
The Sonata project
Integrating FOSUserBundle into the admin area
User dashboard
Generating CRUD
Summary
Chapter 7: The Presentation Layer
How assets are organized
Asset management
How templates are organized
Let's mold the clay
To navigate or not to navigate
What is Bootstrap?
MopaBootstrapBundle
Creating your first menu
The Dashboard template
Overriding templates
Changing the backend logo
Summary
Chapter 8: Project Review
The dashboard's contents
Uploading files with SonataMediaBundle
Team and team members
Adding a notification system
The notification business logic
Summary
Chapter 9: Services and Service Containers
How to create a service
How are services beneficial to our projects?
How to call a service
How to configure a service
Why is it called a Dependency Injection Container?
Why didn't we import services inside the bundle?
How to create and load services via autowiring
Organizing services with tags
Summary
Chapter 10: Custom User Commands
Creating and registering commands
Creating commands for tasks
Adding interactivity to commands
Summary
Chapter 11: More about Dev, Test and Prod Environments
Why do we need different environments?
Processing configuration files
Creating a new environment
Summary
Chapter 12: Caching in Symfony
Definition of a cache
Caches in a Symfony project
Key players in the HTTP cache header
Using the Symfony reverse proxy cache
How to mix expiration and validation strategies
Putting it all together
ESI for selective caching
Sophisticated bundles
Summary

What You Will Learn

  • Install and configure Symfony and required third-party bundles to develop a task management application
  • Set up a continuous integration server to orchestrate automatic builds every time you add a new feature to your project
  • Reduce maintenance costs dramatically using Behaviour Driven Development (BDD)
  • Create a slick user interface using the Bootstrap framework
  • Design robust business logic using Doctrine
  • Build a comprehensive dashboard and secure your project using the Sonata project
  • Improve performance using Redis, Memcache, and Varnish
  • Create customized Symfony commands and add them to your console

Authors

Table of Contents

Chapter 1: Installing and Configuring Symfony
Why Symfony?
Installation
Composer and Packagist
Summary
Chapter 2: The Request and Response Life Cycle
The big picture
Anatomy of a bundle
Custom bundles versus AppBundle
Creating templates with TWIG
Creating data fixtures
Dynamic templates and controllers
The big picture with MVC
Summary
Chapter 3: Setting Up the Environment
The importance of Continuous Integration
Amazon Web Services
Elastic Compute Cloud
Setting up the server
Simple Email Service
Installing PHP tools
Orchestrating the build process
Creating a new job in Jenkins
Running the first build
Do I need CI?
Summary
Chapter 4: Using Behavior-Driven Development in Symfony
Getting started with BDD
What is Behat?
Writing a scenario for the about page
The about page does not follow BDD
More about the acceptance test flow in Mink
Defining and prioritizing features
Codeception โ€“ the BDD style testing framework
Summary
Chapter 5: Business Logic
Choosing between creating a Model or entity
So where does the business logic live?
Reviewing the facts and building entity relationships
Some business logic features and scenarios
TDD and BDD with Codeception
On the CI side of the story
Summary
Chapter 6: Dashboard and Security
How security is organized in Symfony?
Handling users with FOSUserBundle
Generating automated data fixtures
The Sonata project
Integrating FOSUserBundle into the admin area
User dashboard
Generating CRUD
Summary
Chapter 7: The Presentation Layer
How assets are organized
Asset management
How templates are organized
Let's mold the clay
To navigate or not to navigate
What is Bootstrap?
MopaBootstrapBundle
Creating your first menu
The Dashboard template
Overriding templates
Changing the backend logo
Summary
Chapter 8: Project Review
The dashboard's contents
Uploading files with SonataMediaBundle
Team and team members
Adding a notification system
The notification business logic
Summary
Chapter 9: Services and Service Containers
How to create a service
How are services beneficial to our projects?
How to call a service
How to configure a service
Why is it called a Dependency Injection Container?
Why didn't we import services inside the bundle?
How to create and load services via autowiring
Organizing services with tags
Summary
Chapter 10: Custom User Commands
Creating and registering commands
Creating commands for tasks
Adding interactivity to commands
Summary
Chapter 11: More about Dev, Test and Prod Environments
Why do we need different environments?
Processing configuration files
Creating a new environment
Summary
Chapter 12: Caching in Symfony
Definition of a cache
Caches in a Symfony project
Key players in the HTTP cache header
Using the Symfony reverse proxy cache
How to mix expiration and validation strategies
Putting it all together
ESI for selective caching
Sophisticated bundles
Summary

Book Details

ISBN 139781784390310
Paperback290 pages
Read More
From 2 reviews

Read More Reviews

Recommended for You

Symfony2 Essentials Book Cover
Symfony2 Essentials
โ‚ฌ 26.38
โ‚ฌ 18.48
PHP 7: Real World Application Development Book Cover
PHP 7: Real World Application Development
โ‚ฌ 73.18
โ‚ฌ 51.24
Learning PHP 7 Book Cover
Learning PHP 7
โ‚ฌ 43.18
โ‚ฌ 8.64
Mastering PHP Design Patterns Book Cover
Mastering PHP Design Patterns
โ‚ฌ 38.38
โ‚ฌ 26.88
Drupal 8 Development: Beginner's Guide - Second Edition Book Cover
Drupal 8 Development: Beginner's Guide - Second Edition
โ‚ฌ 38.38
โ‚ฌ 26.88
Modular Programming with PHP 7 Book Cover
Modular Programming with PHP 7
โ‚ฌ 41.98
โ‚ฌ 29.40