Review: Yii 1.1 Application Development Cookbook

Well, It’s been a complete month since I started reading the Yii 1.1 Application Development Cookbook, written by Alexandar Makarov. I wrote a preview of the book a month back, which can be found here (Book Preview: Yii Application Development Cookbook).

There are 13 chapters in the book, covering majority of the important features and aspects of Yii Framework, including topics like URL Routes, AJAX and jQuery, Database & Active Record, Forms, Modules, Components, Widgets, and also some Testing, Performance, and Security related examples, which are ready-to-use in PHP-based web-applications.

The cookbook is all about examples, demonstrating various features of Yii Framework. As I mentioned in my previous Preview post, this book will benefit those developers who have a basic knowledge about Yii, and have a limited amount of time to work on their projects, as it’ll provide you with a large number of quick solutions which are very generic and practical. And the best thing is, the examples can be applied to your projects in a matter of seconds. You may download the source-code of all the examples found in the book from the publisher’s website on buying the book.

The Yii Framework official documentation is generally not considered to be very good, due to lack of many such examples. Yii is relatively new web-application framework in the PHP scripting line, and due to this reason, the documentation is still going through a lot of changes. This book completes it by providing a large variety of examples on almost every feature in Yii.

Although it’s a good read, I won’t recommend it to the beginners who are starting to learn Yii or PHP. As I just mentioned, the book emphasize on real-time examples, not the basic theory part. However, I would consider the combination of Yii Definitive Guide, and this coobook to be perfect for every aspiring Yii developer. The definitive guide will walk you through the basics of Yii, explaining most of it’s features and provide some basic examples. And the cookbook will sharpen your knowledge by providing more straight-forward examples, which are easy to understand and apply in our day-to-day work.

Another thing I like about this book is that, it provide references to every topic after examples, for further reading, and understanding the concept completely.

I also learnt some cool new Yii tricks, which I find very useful, and rarely available on the Internet, hence making it a worthwhile experience for me. :)

I rate this book 4 on a scale of 5, and I highly recommend that every Yii developer should buy it, and read. It’ll come very handy in tight situations when it’s difficult to find quick solutions to your web-development related queries. You can buy an electronic version of the book from the Packt publisher’s website.

Book Preview: Yii Application Development Cookbook

It’s been a long time since I’ve written something here due to my stringent schedule. Fresh Start!

Earlier, I wrote about a web-application project which I was working on, based on a PHP-based framework called “Yii”. That was my first project developed on a core PHP framework, apart from WordPress and Joomla who have already established themselves as high-end Content Management Systems (CMS). Since then, it’s been a very intriguing experience for me.

The moment I installed Yii Framework and started working on it, I was so very amazed about how easy and time-saving it was to develop a web-application with Yii as it’s beating heart. Yii provided all such features I desired in my application, some of which are:

  1. High-performance with less loading time.
  2. Easy jQuery & AJAX integration for Form validation, updating page elements dynamically without refreshing, etc.
  3. Customized Themes, and Modules/Widgets integration.
  4. User-friendly interface, and debugging system.

For more details on the platform & it’s features from a practical point of view, please refer to my earlier blog post “Yii Framework (PHP) Explained: A Practical Approach”.

Yii Application Development CookbookRecently, I received a review copy of the Yii 1.1 Application Development Cookbook by Alexander Makarov from it’s publishers, Packt. The best thing about the book is that it already have some ready-to-use solutions to general day-to-day problems, people usually face while developing their projects. It’s not just for the beginners who are willing to learn Yii, but also for the regular Yii developers as it’ll prove out to be a very handy guide.

I’ll be going through the entire book in the next few days, and will post a review here. For more details, Table of Contents and Sample Chapter, please refer to the official webpage of the book on PacktPub.com.

There haven’t been too many books published on Yii Framework in the past. Being a relatively new framework, Yii is gaining popularity at a rapid rate, and currently stands at a challenging position with other PHP Frameworks like Zend, CodeIgnitor, CakePHP, Kohana, Symfony, etc. for the top spot.

Yii is truly a very fascinating platform for PHP developers, and I highly recommend it’s usage for the development of a wide-variety of websites and web-applications.

Yii Framework (PHP) Explained – A Practical Approach

Hey Folks, unfortunately, I don’t get much time to write articles these days, as I’m working on a very critical project which requires more attention. The project is actually a website which I’m developing to handle Online Programming Contests. Its not a full-fledged Online Judge system, but rather much like Google Code Jam in the way it works. Its still in the development stage, but I’m planning to extend it into a full-fledged system, after the Online C/C++ Programming contest, which I’m managing, finishes on April 1, 2011. So, I thought why not discuss a bit about it, and tools I’m using to develop it.

I’m familiar with PHP/MySQL only, as far as the development part of the data-driven dynamic websites are concerned. So, before I started working on this new project, I was looking for a perfect PHP framework to start with, as I was low on time, and had to develop it real quick. In case if you’re confused about the term Framework, it is basically a structure, a backbone on which the websites are developed. It provides certain set of inbuilt files, rules, methods, classes etc. which we can easily use in our website. Using a framework makes it a lot easier to develop websites, and saves a lot of development time coding each and every part of the website starting from scratch.

I usually develop websites on WordPress, and Joomla but that’s about normal websites. This project is much rather a complete Application. And if you’re developing a Application, you have to keep few things in mind – High Performance with Less Overall Size (including Database, Files etc.). I could have easily opted for Joomla or WordPress, but I was sure that I won’t be using much of their core functions and files, and that would add a tremendous amount of extra bulk to my website (Large Overall Size, with Low Performance). So, I started researching about other PHP basic frameworks, and my research came to an end with two frameworks as the end result – CodeIgniter, and Yii. Though there are many other frameworks like Zend, CakePHP, Symfony, Kohana etc. but I was also looking for one which is Powerful, has a Short Learning Curve, and a very Thorough & Good Documentation available . That’s why I stick to both CodeIgniter and Yii at first.

I tried installing both on my local machine with LAMP installed, with Yii first. It just took me 2 steps to be able log into my new project from Web-browser i.e. 2 step installation before you can start working on an application. First, I extracted the files to /var/www, and Second, I used a command line tool provided with Yii (Yiic) to install the basic structure of my project. That’s it, and I was very impressed. Then, I tried installing CodeIgniter. I extracted the files, and tried to open it from my Web-browser but it showed up 503 error, even though everything was perfect – Apache, File Permissions etc. And I found a few more posts on the Internet related to the same error on localhost. So, I had no other option but to start working on Yii, as I didn’t have much time to research about the CodeIgniter problem, and Yii looked quite impressive at first. I don’t criticize CodeIgniter in any way, and there are a lot of developers happily using it, but Yii diverted my attention away from it. If you want a Detailed Comparison between CodeIgniter and Yii, refer to this article.

I’m using Yii Framework for quite a few days now, and things which I found impressive about Yii framework are:

  1. Easy 2-step Installation.
  2. Clean and thorough Tutorials and Documentation with large Community base. In fact, if you’re willing to start using Yii, follow this tutorial by Larry Ulman – The best I found so far, on the Internet, from a beginner’s perspective.
  3. Uses MVC (Model-View-Controller) Framework structure, which is very popular these days among Web applications. I’ll be explaining MVC in a separate post later on.
  4. It generates Model, View, and Controller files for your application project by just accessing the database. So, after the installation, the next step you need to do is to create a Database schema for your application, and use the Gii tool provided with Yii Framework files, to generate those files from the Database schema –  The part I liked most about Yii. Thus, most of the basic frame of your application is generated by Yii within minutes, without requiring your assistance in writing a single bit of PHP code. Other things it generate by default, are a Captcha enabled Contact form, and a Simple Login system, which can be customized as per your requirements.
  5. Yii also provides built-in jQuery support, and supports AJAX for many operations such as Form validation, File Upload, dynamically updating page portion, etc.
  6. Supports extensions to enhance the functionality of your application. There are increasingly number of extensions available on the Yii Framework’s website.

Revolutionizing Information Technology with Cloud Computing

“Cloud Computing” We hear that term quite often these days, and many of us wonder what exactly it means. How exactly is it bringing the revolution to modern day computing? Is it really beneficial?

Well, to be frank, initially even I was pretty much confused about the real meaning of it, and I was really searching for the right answers to these questions. On the Internet, when you type in the term “Cloud Computing” on your Google Search Engine, Bing, Yahoo, or whatever you use, you’ll find many articles, and ‘wiki’ pages on it, with almost all of them either too complex to understand, or too different in terms of approaches being considered in order to explain its real meaning. Whatever it was, certainly took me some time to understand and formulate the real meaning of it.

Cloud Computing can be defined as the advancement in the concept of delivering of hosted service on the Internet. These services could be Software-as-a-Service (SaaS)Infrastructure-as-a-Service (IaaS), and Platform-as-a-Service (Paas). The term ‘Cloud’ here is actually used as a ‘metaphor’, usually used to represent the ever-growing size of the Internet, and multiple servers connected in a network. 

There are several benefits of Cloud Computing:

  1. The power of computing can be increased by increasing the size of the cloud (i.e. by adding more virtual servers temporarily to the cloud present within a network), at any instant of time to fulfill the urgent demand of bandwidth, and can be removed easily as soon as the demand is fulfilled. Hence, there’s no need to buy too many servers or other hardware devices, thus, making it a cost-effective solution.
  2. Its cost-effectiveness, and low-power usage also makes it a ‘Green’ solution. As most of the hosted services would require only a minimal number of servers to fulfill the average bandwidth demand, and further demand can be fulfilled with cloud power, the power-usage for those extra servers can be saved, as they don’t need to be switched on all the time, but only in certain situations when the demand is high.
  3. Cloud computing makes it easier to backup, and maintain data, and services hosted on the servers. Examples could be GMail, Hotmail, Google App Engine, Google Docs, Salesforce, Amazon etc. All big organizations are switching to cloud computing due to its multiple advantages.
  4. From’s the users or client-side perspective, the cost for running heavy applications, which required high-end hardware devices, and software licenses, can be saved. Even a standard computer with a web-browser installed in it, can effectively use the services hosted on cloud powered sites/servers, as if they were installed on that particular system locally. The examples, as mentioned above, are Email services like GMail, Hotmail, Yahoo, and Office-applications like Google Docs, etc.

Below is a video I find really helpful in understanding the concept of cloud computing, from a beginner’s point of view. The way with which it was explained, was the best I found on the Internet till date. I really admire the creativity of the person who developed that video, with lots of unique ideas flowing. I do recommend to watch this video at least once, and I bet you’re gonna enjoy this for sure.

[vsw id="QJncFirhjPg" source="youtube" width="480" height="270" autoplay="no"]

Video Source Link: http://www.youtube.com/watch?v=QJncFirhjPg

However, despite all its advantages, a doubt certainly arises about the reliability factor of cloud technology. Recently, there was a situation where the email accounts of a small percentage of GMail,  and Hotmail users, were totally wiped out, as if they were newly created. Google, though, stated that it was because of some software glitch, and they are taking initiatives to recover all the wiped accounts. But, this certainly puts a question mark on its reliability, as all the user’s data is stored and handled on remote servers, and storage of important and critical data on those servers is certainly not risk-free. I’d surely like to know your opinion about it.