Yii framework – super easy mvc php framework to create curds applications in secconds

First things first download the framework into your webserver: http://www.yiiframework.com/download/

At the time of this writing the version 2 was not recomended but will depend when you see this tutorial.

yii-big

 

 

First things first download the framework into your webserver: http://www.yiiframework.com/download/

At the time of this writing the version 2 was not recomended but will depend when you see this tutorial.

It is important to have access to the command line of your server because this is the beauty of yii that you can run a command line to create the skeleton application.

Once you have the framework in the server navigate to the folder you want to create the application and run the folowing command:

php YiiRoot/framework/yiic.php webapp myapp

This will create the main structure of the app.

To change the database connection go to:

WebRoot/myapp/protected/config/main.php

To change the main variables of the application go to:

WebRoot/myapp/protected/config/main.php

Add the users table to the application to start to play with de models creator to implement the curd functionality.

You can find the mySql script at:

protected/data/schema.mysql.sql<br><br>

 

We will use the GI web application included in Yii to create the models.

Go first to the config file uncomment the gi functionality and add a password.  You will need also to add your external id (google whats my ip) to avoid the 403 error when you run the gi tool:

WebRoot/myapp/protected/config/main.php

 

Now you are ready for rock and roll point the browser to:

myapp/index.php?r=gii

 

You will need to login with the password provided in the main.php

2014-08-17_19_24_21-Gii__a_Web-based_code_generator_for_Yii.png

 You now can use the model generator to create the models base in the table and then the curd generator to create the curd functionality.

more info http://www.yiiframework.com/doc/guide/1.1/en/quickstart.first-app

have fun…

 

 

About the author
Eduardo Silva was born in Buenos Aires, Argentina, and has being living in London for the past 15 years. With a background in psychology he is a IT developer and the co-founder of open-ecommerce.org, a digital content social enterprise. His passion is digital story-telling and has created short films and documentaries to help people promote there ideas.