Yii2 Application Development Cookbook

Front Cover
Packt Publishing Ltd, Nov 9, 2016 - Computers - 584 pages

Discover 100 useful recipes that will bring the best out of the Yii2 framework and be on the bleeding edge of web development today

About This BookLearn how to use Yii2 efficiently through clear examples and core features, and see how to use tests, create reusable code snippets, core widgets, deployment, and moreThis book provides you with a wide space for practice approaches and helps you to learn about the new Yii2 framework.Understand the difference between the Yii 1.x.x versions using useful examples from real web applicationsWho This Book Is For

This book is for developers with good PHP5 knowledge and MVC-frameworks who have tried to develop applications using the Yii 1.x.x version. This book will very useful for all those who would like to try Yii2, or those who are afraid to move from Yii 1.x.x. to Yii2. If you have still not tried Yii2, this book is definitely for you!

What You Will LearnSee the new version of the Yii2 framework and application development practicesWrite your applications more efficiently using shortcuts, Yii's core functionality, and the best practices in Web 2.0Get data from a database, and deal with Active Record, migrations, widgets, and core featuresEasily update your skills from the previous version of the frameworkExplore how to use Yii with different JavaScript frameworks and libraries such as WebSockets, Angular, Ember, Backbone and ReactLearn how to keep your application secure according to the general web application security principle "filter input, escape output.Write RESTfull Web Services using Yii2 and built-in featuresCorrectly install and use official extensions in your projectsEffectively create and implement your own Yii extension, and also ensure your extension is reusable and useful for the communityIn Detail

Yii is a free, open source web application development framework written in PHP5 that promotes clean DRY design and encourages rapid development. It works to streamline your application development time and helps to ensure an extremely efficient, extensible, and maintainable end product. Being extremely performance optimized, Yii is a perfect choice for any size project. However, it has been built with sophisticated, enterprise applications in mind. You have full control over the configuration from head-to-toe (presentation-to-persistence) to conform to your enterprise development guidelines. It comes packaged with tools to help test and debug your application, and has clear and comprehensive documentation.

This book is a collection of Yii2 recipes. Each recipe is represented as a full and independent item, which showcases solutions from real web-applications. So you can easily reproduce them in your environment and learn Yii2 fast and without tears. All recipes are explained with step-by-step code examples and clear screenshots.

Yii2 is like a suit that looks great off the rack, but is also very easy to tailor to fit your needs. Virtually every component of the framework is extensible. This book will show how to use official extensions, extend any component, or write a new one.

This book will help you create modern web applications quickly, and make sure they perform well using examples and business logic from real life. You will deal with the Yii command line, migrations, and assets. You will learn about role-based access, security, and deployment. We'll show you how to easily get started, configure your environment, and be ready to write web applications efficiently and quickly.

Style and approach

The chapters of this book are independent and offer a practical approach to Yii development. You can start reading from the chapter you need most, be it Ajax and jQuery, RESTful Web Services, Database, Active Record, or Official Extensions

 

Contents

Fundamentals
1
Routing Controllers and Views
45
ActiveRecord Model and Database
101
Forms
149
Security
201
RESTful Web Services
249
Official Extensions
271
Extending Yii
315
Performance Tuning
379
Deployment
425
Testing
457
Debugging Logging and Error Handling
527
Index
555
Copyright

Common terms and phrases

About the author (2016)

Andrew Bogdanov is a seasoned web developer from Yekaterinburg, Russia with more than six years of experience in industrial development. Since 2010 he has been interested in Yii and MVC frameworks. He has taken part in projects written in Yii such as a work aggregator for a UK company, high-load projects, real-estate projects, and development of private projects for the government. He has worked on various CMS and frameworks using PHP and MySQL, which includes Yii, Kohana, Symphony, Joomla, WordPress, CakePHP, and so on. Also, having good hands in integrating third-party APIs such as Payment gateways (Paypal, Facebook, Twitter, and LinkedIn), he is very good in slicing and frontend. So he can provide full information about Yii framework. He is also well-versed in PHP/MYSQL, Yii 1.x.x, Yii 2.x.x, Ajax, JQuery, MVC frameworks, Python, LAMP, HTML/CSS, Mercurial, Git, AngularJs, and adaptive markup. You can also visit his blog http://jehkinen.com. In his free time he likes to visit and talk with new people and discuss web development problems. He is currently working with professionals http://2amigos.us.

Bibliographic information