Symfony2 Essentials
- Length: 158 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2015-09-08
- ISBN-10: B011V2NPPC
- Sales Rank: #1840442 (See Top 100 Books)
A fast-paced developer’s guide to using Symfony2 to make your everyday web development work more efficient
About This Book
- Build web applications with the latest features of Symfony2
- Focus on common tasks such as creating CRUD, creating an API, and providing a login
- Install and configure Symfony2 and evaluate it for your everyday needs
Who This Book Is For
This book is targeted at expert programmers, especially those experienced in a closely related technology such as Yii or Laravel, but who now wants to learn Symfony quickly. This book will also prove to be beneficial for experienced PHP developers who want to explore and evaluate new frameworks and their possibilities in day-to-day tasks.
What You Will Learn
- Familiarise yourself with the Symfony framework, its latest features, and how to install it
- Discover the concept of bundles and their application
- Handle translations within Symfony, enable translations, and learn how to handle database translations
- Understand Symfony’s security model, how to secure applications, and implement a custom authentication provider by using FOSUserBundle
- Explore the use of Twig, find best practices around its usage, and discover its common pitfalls
- Create internal commands that will handle sending e-mail reminders for your app
- Develop a plugin for the profiler to provide custom information about your application
- Deploy applications based on Symfony2 using various methods including simple FTP copying, rsync, CI deployment, and more
In Detail
Symfony is a free and open source PHP MVC web application development framework, which helps you create and maintain web applications and replace recurrent coding tasks. It integrates with an independent library, PHPUnit, to give you a rich testing framework. It is one of the best and most popular frameworks available on the market. Popular projects such as Drupal, Laravel, and phpBB also use Symfony. Its well-organized structure, clean code, and good programming practices make web development a breeze.
Symfony2 Essentials will guide you through the process of creating a sample web application with Symfony2. You will create a To-Do application, using a few of the most commonly used Symfony2 components, and discover how to perform these development tasks efficiently.
This book introduces you to the Symfony framework with a quick installation guide and a brief explanation of its key features including the MVC architecture, twig templating, dependency injection, and more. You will learn to manage dependencies, create controllers, views, and API calls, and secure your application.
Next, you will go through the steps that are common for most web applications, which include writing CRUD and AJAX, handling forms, validation, translations, and the command-line interface, and e-mail sending features. The book ends with best practices, debugging, profiling, and deployment procedures.
By the end of this book, you will have learned how to combine a Symfony2 framework with other open source code to speed up the development process.
Style and approach
A fast-paced, step-by-step guide with examples on how to write the most common pieces of code while developing typical web applications with Symfony.
Table of Contents
Chapter 1. The Symfony Framework – Installation and Configuration
Chapter 2. Your First Pages
Chapter 3. Twig Templating and Assets Handling
Chapter 4. Forms
Chapter 5. Security and Handling Users
Chapter 6. Translation
Chapter 7. AJAX
Chapter 8. Command-line Operations
Chapter 9. Symfony2 Profiler and Debugger
Chapter 10. Preparing an Application for Production