Tuesday, 8 October 2013

Yii Framework Tutorial Set 1

Installing Yii:       

Installing of Yii Framework in your server is not a big thing. It is a quit simple to do. Even a person with not having web experience can also do it.

Installation involves only two steps:     

1. Download latest and stable version Yii Framework from yiiframework.com. Note this is free since it is a open source.   

2.Unzip the Yii file to a Web-accessible directory (Means in your server either local server or web-hosted server).      

That is it. You have done it. Now you can access Yii framework Since you have installed.
This insallation process does not end with just unpacking it in your sever. You have to do one more thing called Requirement checkup as below. It is mandatory to check it up because because this will let you know whether your server has satisfied all the requirements of yii framework. These requirements includes php version, database and so many other things.

to do this just paste this your in your browser.

if it is local server the http://hostname/yii/requirements/index.php
your browser will display the following thing.

all the things must be passed and should not fail. You may get some warnings but that problems wont lead to huge problems.

          Yii Framework requires PHP 5.1, so Your server must have PHP 5.1 or above version of PHP. Yii team have tested yii framework with Apache HTTP server on Windows and Linux and It may also run on other Web servers and platforms, provided with PHP 5.1 or above version of PHP as mentioned in their site.

Don't forget to view my tutorial on youtube at https://www.youtube.com/watch?v=G7_2tdZRQnE

Your First Yii Application:

           It will be easier to create basic app with yiic (command line tool) in Yii Framework. We have an another tool Gii (powerful web based code generator) to automatically create code for certain tasks like CRUD Operations.

To create basic skeleton for Yii App:

% cd WebRoot
% php YiiRoot/framework/yiic.php webapp firstapp

Webroot -> Your your web root location
php -> your php.exe location
firstapp -> the folder in which you create your app

These works are done by yiic, this is a command line tool provided by yii team.

Nice it is quit nice to do know.
  That is it you have created basic structure for yii application.


Please continue this in my next post at http://webdevelopmentcodes.blogspot.in/2014/04/yii-framework-tutorial-set-2.html and don't forget to view my video at https://www.youtube.com/watch?v=G7_2tdZRQnE