Instant Yii 1.1 Application Development Starter
Instant Yii 1.1 Application Development Starter
Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2013
Production Reference: 1300513
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78216-168-4
www.packtpub.com
Authors
Jacob Mumm
Mark Safronov
Reviewer
Sergey Malyshev
Acquisition Editor
Andrew Duckworth
Kunal Parikh
Commissioning Editor
Harsha Bharwani
Technical Editor
Varun Pius Rodrigues
Project Coordinator
Deenar Satam
Proofreader
Paul Hindle
Graphics
Abhinash Sahu
Production Coordinator
Prachali Bhiwandkar
Cover Work
Prachali Bhiwandkar
Cover Image
Conidon Miranda
Jacob Mumm is a web developer from Upstate New York specializing in PHP and JavaScript web applications. He has worked for non-profit organizations, advertising companies, and schools using tools such as Drupal, jQuery (including UI and Mobile), AngularJS, and the Yii Framework. His interests range from outdoor activities such as hiking, camping, and kayaking, to organic food and gardening as part of a holistic, sustainable lifestyle, all the while staying up to date with the latest gadgets, gizmos, and web application technologies.
One of the things he deeply enjoys is talking to people about the things for which he has the most passion. He likes to share his knowledge and experience with others. Even when incomplete, Jacob finds the act of consolidating his thoughts on a subject a great way to solidify his own understanding or to discover places where he needs to investigate further.
Mark Safronov is a professional web application developer from the Russian Federation with experience and interest in a wide range of programming languages and technologies. He has built and participated in building different types of web applications, from purely computational ones to full-blown e-commerce sites. He is also a proponent of following the current best practices for test-first development and clean and maintainable code.
He is currently employed at Clevertech, and is working on Yii-based PHP web applications and maintaining a quite popular YiiBooster open source extension.
Back in 2008, he translated the book Visual Prolog 7.1 for Tyros by Eduardo Costa in to Russian.
Sergey Malyshev is an IT specialist from Ukraine. He has been working in the IT industry for more than 15 years, 8 years of which he has devoted to the development of web applications. Out of conviction that it's impossible to become a great specialist in all areas at the same time, he has chosen for himself PHP, MySQL, and JavaScript as top priority directions. During his career, Sergey took part in developing dozens of different websites, social networks, CMS, CRM, and ERP systems. He was not only a developer, but also an architect, a project manager, and a technical consultant. Apart from participating in the realization of some technical projects, he also organized various advanced training courses for IT specialists in the companies where he was employed. As he has a degree in management, Sergey took part in the business process automation of companies specializing in software development.
At present, Sergey holds the position of a software engineer in the company SugarCRM and deals with the development of one of the most popular customer relationship management systems in the world. Before that, he worked on the development of applications based on Yii Framework. These include the search engine for real estate company livingthere.com and the corporate CMS system WebModulite for New York design agency Blue Fountain Media. Participation in these projects and also work on his own extension for debugging Yii applications, YiiDebugToolbar, has helped Sergey get vast experience and expert knowledge of Yii Framework.
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at
www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
<[email protected]>
for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
- Fully searchable across every book published by Packt
- Copy and paste, print and bookmark content
- On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Chapter 1. Instant Yii 1.1 Application Development Starter
Welcome to Instant Yii 1.1 Application Development Starter. This book has been designed as a crash course in web application development with the Yii Framework. You will learn a step-by-step approach to building database-driven websites utilizing the features and extensions available in Yii.
This book contains the following sections:
So, what is Yii? – In this section, we'll start with a short review of what the Yii framework is, how it got started, and the overall benefits you'll get when you start using it.
Installation – In this section, we'll install Yii Framework and kickstart your first "Hello World" application with it.
Quick start – Given the automatically-generated example application, we extend it to be a rudimentary blog according to the blog example from the Yii website, while also learning a lot of the most important concepts in Yii along the way.
Top 5 features you need to know about – In this section, we continue the practical examples and we explore some not so obvious details and tricks of the framework, which can really help you in developing your application.
People and places – Lastly, we'll see where to seek help and how to get to know the quite vast Yii community.
Yii is an open source framework for web applications built with the PHP scripting language. It was first released late in 2008 to a world bustling with frameworks vying for market share. Although it entered the game somewhat late, this turned out to be an advantage as its creator, Qiang Xue, was able to include some of the best features of existing products in Yii. Also, the lessons he learned as a developer for the Prado framework helped him to build a superior solution. Today, Yii is widely heralded as one of the top PHP web frameworks. You can read more about it at http://www.yiiframework.com.
As opposed to the Content Management Systems (CMS), it is not a complete skeleton of your website, which is configurable by some sort of graphical user interface. You have probably heard the names Joomla! and Drupal, which are particularly f...