Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Yii2 By Example

You're reading from   Yii2 By Example Develop complete web applications from scratch through practical examples and tips for beginners and more advanced users

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781785287411
Length 344 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
 Caldarelli Caldarelli
Author Profile Icon Caldarelli
Caldarelli
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Yii2 By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Starting with Yii2 FREE CHAPTER 2. Creating a Simple News Reader 3. Making Pretty URLs 4. Creating a Room through Forms 5. Developing a Reservation System 6. Using a Grid for Data and Relations 7. Working on the User Interface 8. Log in to the App 9. Frontend to Display Rooms to Everyone 10. Localize the App 11. Creating an API for Use in a Mobile App 12. Create a Console Application to Automate the Periodic Task 13. Final Refactoring Index

Configuring a REST app in the advanced template


Before using the advanced template, it is advisable to configure RESTful Web Services, since, as you saw in previous chapters, this configuration allows you to easily add a new application in the same project.

Yii provides many built-in features to create RESTful Web Services and it reduces the code needed to implement it that is always structured with models, controllers, and actions.

These are its main features:

  • Default actions (index, view, create, update, delete, and options) in yii\rest\ActiveController, which is the base controller suggested to override

  • A response format selectable from input

  • Customized authentication and authorization

  • Caching and rate limiting

Yii applies well-established knowledge about RESTful Web Services creation, such as how to present metadata in the response output. So, it is advisable that we follow the framework guidelines as far as possible; in this way, we will write commonly manageable REST APIs.

The first thing...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images