Free Sample
+ Collection

Zend Framework 2 Cookbook

Josephus Callaars

If you are pretty handy with PHP, this book is the perfect way to access and understand the features of Zend Framework 2. You can dip into the recipes as you wish and learn at your own pace.
RRP $29.99
RRP $49.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849694841
Paperback340 pages

About This Book

  • Recipes to help you create, test, and optimize your applications
  • A useful guide for PHP developers wanting to broaden their horizons
  • Helps you understand how MVC works and how to make it work for you

Who This Book Is For

'Zend Framework 2 Cookbook" is for PHP developers who are fairly advanced in programming in PHP. It will also be useful for developers who have a keen interest in expanding their knowledge outside the boundaries of simply scripting pages together. As unit testing and MVC will be discussed, it is beneficial for the reader to know what these technologies are, although experience with developing applications is not necessarily essential.

Table of Contents

Chapter 1: Zend Framework 2 Basics
Setting up a Zend Framework 2 project
Handling routines
Understanding dependency injection
Using configurations to your benefit
The EventManager and Bootstrap classes
Chapter 2: Translating and Mail Handling
Translating your application
Localizing your application
Sending mail
Receiving mail
Chapter 3: Handling and Decorating Forms
Creating forms
Using form view helpers
Creating a custom form element and form view helper
Chapter 4: Using View
Working with View
Creating a global layout template
Creating reusable Views
Using view strategies/renderers
Using context switching for a different output
Writing a custom view strategy/renderer
Chapter 5: Configuring and Using Databases
Connecting to a database
Executing simple queries
Executing queries using TableGateway
Optimizating with a DB profiler
Creating a Database Access Object
Chapter 6: Modules, Models, and Services
Creating a new module
Using modules as a widget
A Model and a Hydrator
A basic service
Chapter 7: Handling Authentication
Understanding Authentication methods
Setting up a simple database Authentication
Writing a custom Authentication method
Chapter 8: Optimizing Performance
Caching and when to Cache
Understanding and using storage plugins
Setting up a caching system
Chapter 9: Catching Bugs
Handling Exceptions – your partner in crime
Logging and how it makes your life easier
Unit testing – why would you do it
Setting up and using unit testing

What You Will Learn

  • Set up Zend Framework 2 on a Linux web server
  • Make your application accessible in other countries and languages
  • Choose and create custom output display renderings
  • Set up modules and use them as widgets
  • Connect and query different types of databases
  • Create the best authentication method
  • Optimize framework applications
  • Debug and test framework applications

In Detail

Zend Framework 2 is the latest creation of World Wide Web infrastructure company Zend Technologies Ltd. This new PHP framework comes with tons of features and an attractive way of creating applications. Not only is the overall usability of the technology much better, but it also makes your applications more testable, something that is often overlooked.

"Zend Framework 2 Cookbook" will show you how applications are set up in Zend Framework 2 and how you can develop successfully in this massive framework. You will master features like Modules, Views, Controllers, and Authentication. The book also discusses the Event Manager, unit testing, and how to optimize your application.

The book begins with a discussion about setting up Zend Framework 2, and you will also look at how the framework itself works. By the end of this book, you will be able to create entire secure applications on your own and make sure they are tested and optimized for performance as well.

You will learn about sending and receiving e-mails, translation and localization of the application, and how to set up the framework on a Linux web server. You will also learn how to display data from the application to the user by using different display strategies and renderings. The creation of modules will also be discussed. Then, you will move on to look at how to authenticate users and make sure the developer knows how to pick the best method available. Unit testing, debugging, and enhancing the performance will also be covered in this book.

"Zend Framework 2 Cookbook" is a perfect book for anyone who wants to start developing with Zend Framework 2.


Read More