Bookcafe

Wednesday, May 29, 2013

Yii Application In The Making

I just follow the tutorial for Yii at http://www.yiiframework.com/doc/guide/1.1/en/quickstart.first-app and the followings are the snap shots:


Please enter the password as provided in the ../protected/config/main.php and you will be directed to the following page:


I will not follow the table stated in the tutorial since I will use my own table i.e alumnidata2 table which holds my ex-student information during my time in the school a few years back.
 But before that do not forget to set the database that we are going to use in .../protected/config/main.php in my case I use database named alumni


Now choose Model Generator and enter the information required and then click Preview button and then Generate button.


After you click Preview button, the following will be displayed:


After you click Generate button, the following will be displayed:

Now I will create the CRUD code as I going to manipulate the alumnidata2 data.Choose Grud Generator and the following page will be displayed:


Click Preview button and then Generate button and the following will be displayed:


After you click Generate button the following page will be displayed:


Now I will access the CRUD page by clicking the "You may try it now"..and the following page will be displayed where the page will list down all the alumni data from the alumnidata2 table


To create a new data, click Create Alumnidata2 at the upper right corner of the page and we will be directed to the login page as shown below:


Fill the username and password field. The default value will be admin for both username and password.
After login you will be redirected to the following page and then we can begin to key in the data so that it will be inserted into the alumnidata2 table.


The login as the administrator, we can click at the Manage Alumnidata2 situated at the upper right corner of the page and this page will be displayed:


We can manipulate all the data of the Alumnidata2 at this page.
Now I come to the end of this Yii application development and what I can say is that I do not have to write any codes for the above application :)