Yii Application Development Cookbook - Second Edition


Yii Application Development Cookbook - Second Edition
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Learn how to use Yii even more efficiently
  • Full of practically useful solutions and concepts you can use in your application
  • Both important Yii concept descriptions and practical recipes are inside

Book Details

Language : English
Paperback : 408 pages [ 235mm x 191mm ]
Release Date : April 2013
ISBN : 1782163107
ISBN 13 : 9781782163107
Author(s) : Alexander Makarov
Topics and Technologies : All Books, Web Development

Table of Contents

Preface
Chapter 1: Under the Hood
Chapter 2: Router, Controller, and Views
Chapter 3: AJAX and jQuery
Chapter 4: Working with Forms
Chapter 5: Testing Your Application
Chapter 6: Database, Active Record, and Model Tricks
Chapter 7: Using Zii Components
Chapter 8: Extending Yii
Chapter 9: Error Handling, Debugging, and Logging
Chapter 10: Security
Chapter 11: Performance Tuning
Chapter 12: Using External Code
Chapter 13: Deployment
Index
  • Chapter 1: Under the Hood
    • Introduction
    • Using getters and setters
    • Using Yii events
    • Using import and autoloading
    • Using exceptions
    • Configuring components
    • Configuring widget defaults
    • Using Yii core collections
    • Working with requests
    • Chapter 2: Router, Controller, and Views
      • Introduction
      • Configuring URL rules
      • Generating URLs by path
      • Using regular expressions in URL rules
      • Creating URL rules for static pages
      • Providing your own URL rules at runtime
      • Using a base controller
      • Using external actions
      • Displaying static pages with CViewAction
      • Using flash messages
      • Using the controller context in a view
      • Reusing views with partials
      • Using clips
      • Using decorators
      • Defining multiple layouts
      • Paginating and sorting data
      • Chapter 3: AJAX and jQuery
        • Introduction
        • Loading a block through AJAX
        • Managing assets
        • Including resources in the page
        • Working with JSON
        • Passing configuration from PHP to JavaScript
        • Handling variable number of inputs
        • Rendering content at the client side
        • Chapter 4: Working with Forms
          • Introduction
          • Writing your own validators
          • Uploading files
          • Adding CAPTCHA
          • Customizing CAPTCHA
          • Creating a custom input widget with CInputWidget
          • Chapter 5: Testing Your Application
            • Introduction
            • Setting up the testing environment
            • Writing and running unit tests
            • Using fixtures
            • Testing the application with functional tests
            • Generating code coverage reports
            • Chapter 6: Database, Active Record, and Model Tricks
              • Introduction
              • Getting data from a database
              • Defining and using multiple DB connections
              • Using scopes to get models for different languages
              • Processing model fields with AR event-like methods
              • Applying markdown and HTML
              • Highlighting code with Yii
              • Automating timestamps
              • Setting up an author automatically
              • Implementing single table inheritance
              • Using CDbCriteria
                • Chapter 8: Extending Yii
                  • Introduction
                  • Creating model behaviors
                  • Creating components
                  • Creating reusable controller actions
                  • Creating reusable controllers
                  • Creating a widget
                  • Creating CLI commands
                  • Creating filters
                  • Creating modules
                  • Creating a custom view renderer
                  • Making extensions distribution-ready
                    • Chapter 10: Security
                      • Introduction
                      • Using controller filters
                      • Using CHtml and CHtmlPurifier to prevent XSS
                      • Preventing SQL injections
                      • Preventing CSRF
                      • Using RBAC
                      • Chapter 11: Performance Tuning
                        • Introduction
                        • Following best practices
                        • Speeding up session handling
                        • Using cache dependencies and chains
                        • Profiling an application with Yii
                        • Leveraging HTTP caching
                        • Chapter 12: Using External Code
                          • Introduction
                          • Using Zend Framework from Yii
                          • Customizing the Yii autoloader
                          • Using Kohana inside Yii
                          • Using PEAR inside Yii
                          • Using Composer with Yii
                          • Chapter 13: Deployment
                            • Introduction
                            • Changing the Yii directory layout
                            • Moving an application out of webroot
                            • Sharing the framework directory
                            • Moving configuration parts into separate files
                            • Using multiple configurations to simplify the deployment
                            • Implementing and executing cron jobs
                            • Maintenance mode

                            Alexander Makarov

                            Alexander Makarav is an experienced engineer from Russia and has been a Yii framework core team member since 2010. Before joining the Yii core team, he participated in the CodeIgniter community growth in Russia. In 2009, he finished the Russian translation of the framework documentation and created the Russian community website. In 2012, he released the Russian version of the book along with Russian community members. In the same year, he was the technical reviewer for three more books:

                            • The Yii Book: Developing Web Applications Using the Yii PHP Framework, Larry Ullman
                            • Web Application Development with Yii and PHP, Jeff Winesett
                            • Yii Rapid Application Development Hotshot, Lauren O'Meara and James Hamilton

                            In his free time, Alexander writes technical blog at http://rmcreative.ru/, speaks at conferences, and enjoys movies, music, traveling, photography, and languages. He currently resides in Voronezh, Russia with his beloved wife and daughter.

                            Sorry, we don't have any reviews for this title yet.

                            Submit Errata

                            Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

                            Sample chapters

                            You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                            Frequently bought together

                            Yii Application Development Cookbook - Second Edition +    Oracle CRM On Demand Administration Essentials =
                            50% Off
                            the second eBook
                            Price for both: $39.00

                            Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                            What you will learn from this book

                            • Make use of internal Yii features, such as events and collections
                            • Get the maximum out of your controller and views and make them reusable
                            • Work with jQuery, JavaScript, and AJAX the Yii way
                            • Make your application error-free using TDD approach
                            • Use Active Record efficiently
                            • Utilize Zii components such as grids and data providers
                            • Implement, package, and share your code as a reusable extension
                            • Tune your application for better performance and also learn general performance principles and Yii-related settings

                            In Detail

                            The Yii framework is a rapidly growing PHP5 MVC framework often referred to as Rails for PHP. It has already become a solid base for many exciting web applications such as Stay.com and can be a good base for your developments, too. This book will help you to learn Yii quickly and in more depth for use in for your developments.

                            "Yii Application Development Cookbook" will show you how to use Yii efficiently. You will learn about taking shortcuts using core features, creating your own reusable code base, using test driven development, and many more topics that will give you a lot of experience in a moderate amount of time.

                            The second edition fixes all errata found in the first edition and also features new recipes on the client side, HTTP caching, and using Composer with Yii.

                            The chapters of the book are generally independent and since this book’s goal is to enhance a practical approach to Yii development, you can start reading from the chapter you need most, be it Ajax and jQuery, Database, Active Record, and Model Tricks, or Extending Yii.

                            "Yii Application Development Cookbook" will help you to learn more about the Yii framework and application development practices in general, showing shortcuts and dangerous things you shouldn’t do.

                            With all the recipes grouped in 13 chapters, you will write your applications more efficiently using shortcuts and using Yii core functionality in a good way. The most interesting topics are; Yii application deployment, a guide to writing your own extensions, advanced error handling, debugging and logging, application security, performance tuning, and much more.

                            "Yii Application Development Cookbook" will help you to learn more about the Yii framework and application development practices in general. You will write your applications more efficiently using shortcuts and using Yii core functionality in a good way.

                            Approach

                            This book is a collection of Yii recipes with chapters generally independent of each other. It is full of practically useful solutions and concepts explained with code and relevant screenshots and diagrams.

                            Who this book is for

                            This book is for developers with good PHP5 knowledge who have tried to develop applications using Yii. An object-oriented approach and MVC knowledge will be a great advantage as Yii uses these extensively.

                            Code Download and Errata
                            Packt Anytime, Anywhere
                            Register Books
                            Print Upgrades
                            eBook Downloads
                            Video Support
                            Contact Us
                            Awards Voting Nominations Previous Winners
                            Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                            Resources
                            Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software